diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-08-04 11:20:44 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-08-05 10:05:58 +0800 |
| commit | 7f93d8cc888b5397614b52ebd26ffc742d6f7072 (patch) | |
| tree | af20f2c9e2398b226ac1a5717a16551ef69c002e /functional | |
| parent | 06ea24725b1331fcf840a64f558e2d1f15a3c8c6 (diff) | |
| download | python-openstackclient-7f93d8cc888b5397614b52ebd26ffc742d6f7072.tar.gz | |
Show "target_project_id" attribute properly for network rbac object
According to the code in SDK:
https://github.com/openstack/python-openstacksdk/blob/master/openstack/network/v2/rbac_policy.py#L34
we can see the conlumn of "target_tenant" should be
"targer_project_id" but not "target_project". It is
the reason why could not show the "target_project"
in OSC, so this patch fix it.
Before this change:
(openstack) network rbac show b74fd644-e057-4d44-8ae1-7ca9967ea1e1
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| action | access_as_shared |
| id | b74fd644-e057-4d44-8ae1-7ca9967ea1e1 |
| object_id | 8735b57f-606a-4f65-9902-2052a6d2a66d |
| object_type | network |
| project_id | 01c0ba43101b4080a52a5f79a55c56ff |
| target_project | |
+----------------+--------------------------------------+
After this change:
(openstack) network rbac show b74fd644-e057-4d44-8ae1-7ca9967ea1e1
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| action | access_as_shared |
| id | b74fd644-e057-4d44-8ae1-7ca9967ea1e1 |
| object_id | 8735b57f-606a-4f65-9902-2052a6d2a66d |
| object_type | network |
| project_id | 01c0ba43101b4080a52a5f79a55c56ff |
| target_project_id | c7ab4d2ea9e1487095a8ca24ea44ef38 |
+-------------------+--------------------------------------+
Change-Id: I53df127bfc3e43288c6afecdf872e6101b94a658
Closes-Bug: #1608903
Diffstat (limited to 'functional')
| -rw-r--r-- | functional/tests/network/v2/test_network_rbac.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/functional/tests/network/v2/test_network_rbac.py b/functional/tests/network/v2/test_network_rbac.py index e7e35858..1dbc246b 100644 --- a/functional/tests/network/v2/test_network_rbac.py +++ b/functional/tests/network/v2/test_network_rbac.py @@ -12,8 +12,6 @@ import uuid -import testtools - from functional.common import test @@ -57,18 +55,13 @@ class NetworkRBACTests(test.TestCase): raw_output = self.openstack('network rbac show ' + self.ID + opts) self.assertEqual(self.ID + "\n", raw_output) - # TODO(Huanxuan Ao): This test can pass after bug - # https://bugs.launchpad.net/python-openstackclient/+bug/1608903 fixed. - @testtools.skip( - 'Skip because of the bug ' - 'https://bugs.launchpad.net/python-openstackclient/+bug/1608903') def test_network_rbac_set(self): opts = self.get_opts(self.FIELDS) project_id = self.openstack( 'project create ' + self.PROJECT_NAME + opts) self.openstack('network rbac set ' + self.ID + ' --target-project ' + self.PROJECT_NAME) - opts = self.get_opts(['target_project']) + opts = self.get_opts(['target_project_id']) raw_output_rbac = self.openstack('network rbac show ' + self.ID + opts) raw_output_project = self.openstack( 'project delete ' + self.PROJECT_NAME) |
