Fix network create --project
SDK 0.9.13 needs to see project_id in the attributes, not tenant_id. Closes-bug: 1659878 Change-Id: Iff7abe8bd00cbe087c07579596c40af8b0a73302
This commit is contained in:
parent
ca763793cc
commit
fab4fcc397
@ -93,7 +93,9 @@ def _get_attrs(client_manager, parsed_args):
|
|||||||
parsed_args.project,
|
parsed_args.project,
|
||||||
parsed_args.project_domain,
|
parsed_args.project_domain,
|
||||||
).id
|
).id
|
||||||
|
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
|
||||||
attrs['tenant_id'] = project_id
|
attrs['tenant_id'] = project_id
|
||||||
|
attrs['project_id'] = project_id
|
||||||
|
|
||||||
# "network set" command doesn't support setting availability zone hints.
|
# "network set" command doesn't support setting availability zone hints.
|
||||||
if 'availability_zone_hints' in parsed_args and \
|
if 'availability_zone_hints' in parsed_args and \
|
||||||
|
@ -185,7 +185,9 @@ class TestCreateNetworkIdentityV3(TestNetwork):
|
|||||||
'name': self._network.name,
|
'name': self._network.name,
|
||||||
'shared': True,
|
'shared': True,
|
||||||
'description': self._network.description,
|
'description': self._network.description,
|
||||||
|
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
|
||||||
'tenant_id': self.project.id,
|
'tenant_id': self.project.id,
|
||||||
|
'project_id': self.project.id,
|
||||||
'is_default': True,
|
'is_default': True,
|
||||||
'router:external': True,
|
'router:external': True,
|
||||||
'provider:network_type': 'vlan',
|
'provider:network_type': 'vlan',
|
||||||
@ -319,7 +321,9 @@ class TestCreateNetworkIdentityV2(TestNetwork):
|
|||||||
self.network.create_network.assert_called_once_with(**{
|
self.network.create_network.assert_called_once_with(**{
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'name': self._network.name,
|
'name': self._network.name,
|
||||||
|
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
|
||||||
'tenant_id': self.project.id,
|
'tenant_id': self.project.id,
|
||||||
|
'project_id': self.project.id,
|
||||||
})
|
})
|
||||||
self.assertEqual(self.columns, columns)
|
self.assertEqual(self.columns, columns)
|
||||||
self.assertEqual(self.data, data)
|
self.assertEqual(self.data, data)
|
||||||
|
Loading…
Reference in New Issue
Block a user