diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2017-02-16 18:43:31 +0800 |
|---|---|---|
| committer | Julie Pichon <jpichon@redhat.com> | 2017-08-15 14:04:19 +0000 |
| commit | 253a92ec8f2b7bd5d8f056210dea374f2e2ae184 (patch) | |
| tree | 78cd00080eada35d1e6c515ae7a8cb9f15761bf7 /openstackclient/tests/unit | |
| parent | 31087e42226e487099e903d05a0f5b1ff80c7be3 (diff) | |
| download | python-openstackclient-253a92ec8f2b7bd5d8f056210dea374f2e2ae184.tar.gz | |
Fix "security group list" command to display project ID properly
The "Project" column of the output of
"security group list" command is blank
since the new attribute name is "project_id"
not "tenant_id" in network resource, so change
it to display project IDs properly
Change-Id: Ie2a071afac3b5a8aaa2c6f1c50d44ae06905d916
Closes-bug: #1659967
(cherry picked from commit 888022f8c0a2911a03fc682fdbe4c68c35a27db7)
Diffstat (limited to 'openstackclient/tests/unit')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 4 | ||||
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_security_group.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index eb965339..50163342 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -978,7 +978,7 @@ class FakeSecurityGroup(object): 'id': 'security-group-id-' + uuid.uuid4().hex, 'name': 'security-group-name-' + uuid.uuid4().hex, 'description': 'security-group-description-' + uuid.uuid4().hex, - 'tenant_id': 'project-id-' + uuid.uuid4().hex, + 'project_id': 'project-id-' + uuid.uuid4().hex, 'security_group_rules': [], } @@ -990,7 +990,7 @@ class FakeSecurityGroup(object): loaded=True) # Set attributes with special mapping in OpenStack SDK. - security_group.project_id = security_group_attrs['tenant_id'] + security_group.project_id = security_group_attrs['project_id'] return security_group diff --git a/openstackclient/tests/unit/network/v2/test_security_group.py b/openstackclient/tests/unit/network/v2/test_security_group.py index 9a30267e..66d357f9 100644 --- a/openstackclient/tests/unit/network/v2/test_security_group.py +++ b/openstackclient/tests/unit/network/v2/test_security_group.py @@ -404,7 +404,7 @@ class TestListSecurityGroupNetwork(TestSecurityGroupNetwork): grp.id, grp.name, grp.description, - grp.tenant_id, + grp.project_id, )) def setUp(self): |
