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:
Dean Troyer 2017-01-27 20:05:00 -06:00
parent ca763793cc
commit fab4fcc397
2 changed files with 6 additions and 0 deletions

View File

@ -93,7 +93,9 @@ def _get_attrs(client_manager, parsed_args):
parsed_args.project,
parsed_args.project_domain,
).id
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
attrs['tenant_id'] = project_id
attrs['project_id'] = project_id
# "network set" command doesn't support setting availability zone hints.
if 'availability_zone_hints' in parsed_args and \

View File

@ -185,7 +185,9 @@ class TestCreateNetworkIdentityV3(TestNetwork):
'name': self._network.name,
'shared': True,
'description': self._network.description,
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
'tenant_id': self.project.id,
'project_id': self.project.id,
'is_default': True,
'router:external': True,
'provider:network_type': 'vlan',
@ -319,7 +321,9 @@ class TestCreateNetworkIdentityV2(TestNetwork):
self.network.create_network.assert_called_once_with(**{
'admin_state_up': True,
'name': self._network.name,
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
'tenant_id': self.project.id,
'project_id': self.project.id,
})
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)