diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-07-24 11:27:59 -0600 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-07-24 11:27:59 -0600 |
commit | 3d6ec1eeaf70ae4e46042946f8bd35d5b5380401 (patch) | |
tree | 9d2881a2f73de6e779d266ceb6798ec3930d42ea /snaps/openstack/create_security_group.py | |
parent | feae63d11f8295a0d9327496f42949ad5b67fca4 (diff) |
Fixed problems when setting the OpenStack project ID.
There were several calls to retrieve the project ID that required
named parameters which was causing the utility function to always
return None. Additionally, when creating the dict() required by the
Neutron create API 'body' parameter key 'project_id' is not supported
and still uses 'tenant_id'.
As these problems should have been found earlier, this patch also
extends the tests for networks, subnets, ports, and security groups
to use 'tenant_id' rather than 'project_id'.
JIRA: SNAPS-143
Change-Id: Ic69e56145ea6070718d821edd22a1d0f9970995d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_security_group.py')
-rw-r--r-- | snaps/openstack/create_security_group.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/snaps/openstack/create_security_group.py b/snaps/openstack/create_security_group.py index 4291796..bde5d01 100644 --- a/snaps/openstack/create_security_group.py +++ b/snaps/openstack/create_security_group.py @@ -265,12 +265,13 @@ class SecurityGroupSettings: if self.description: out['description'] = self.description if self.project_name: - project = keystone_utils.get_project(keystone, self.project_name) + project = keystone_utils.get_project( + keystone=keystone, project_name=self.project_name) project_id = None if project: project_id = project.id if project_id: - out['project_id'] = project_id + out['tenant_id'] = project_id else: raise SecurityGroupSettingsError( 'Could not find project ID for project named - ' + |