Merge "Fix network create --project"

This commit is contained in:
Jenkins 2017-01-28 04:43:40 +00:00 committed by Gerrit Code Review
commit a6817d0240
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)