add command "openstack rbac list"

Bug #1584295 reported by ting.wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Undecided
ting.wang

Bug Description

This bug aim to explain how I plan to implement command 'openstack rbac list' which is a part of the bp[1].

With command "neutron rbac-list"[2], we can get the rbac information from Neutron.
But in openstackclient, we have not implemented this command yet.So,add it.

$neutron rbac-list
+--------------------------------------+-------------+--------------------------------------+
| id | object_type | object_id |
+--------------------------------------+-------------+--------------------------------------+
| 374f5ea8-9be3-4f34-a78f-450a5e275228 | network | a6511829-3e2b-4001-b457-7c223a04b20b |
| f1af9230-a959-4e4d-8e35-6c7c1b1e88c2 | network | f9d3460e-22a6-4ae2-8705-83ebafdcc0da |
+--------------------------------------+-------------+--------------------------------------+

In neutronclient, there are not any optional arguments in command 'rbac-list' although the response looks like this:
RESP BODY: {"rbac_policies": [{"target_tenant": "*", "tenant_id": "82c2afcd955e4b28ab8825ef2a61074c", "object_type": "network", "object_id": "a6511829-3e2b-4001-b457-7c223a04b20b", "action": "access_as_external", "id": "374f5ea8-9be3-4f34-a78f-450a5e275228"}, {"target_tenant": "c45eb3a281d34e3e8fa7c2809fad7a25", "tenant_id": "82c2afcd955e4b28ab8825ef2a61074c", "object_type": "network", "object_id": "f9d3460e-22a6-4ae2-8705-83ebafdcc0da", "action": "access_as_shared", "id": "f1af9230-a959-4e4d-8e35-6c7c1b1e88c2"}]}

The other arguments like "target_tenant" will be displayed when we execute command "neutron rbac show ***".

Similarly, executing command "openstack rbac list" will return result like this:
$ openstack rbac list
+--------------------------------------+-------------+--------------------------------------+
| ID | Object_type | Object_id |
+--------------------------------------+-------------+--------------------------------------+
| 374f5ea8-9be3-4f34-a78f-450a5e275228 | network | a6511829-3e2b-4001-b457-7c223a04b20b |
| f1af9230-a959-4e4d-8e35-6c7c1b1e88c2 | network | f9d3460e-22a6-4ae2-8705-83ebafdcc0da |
+--------------------------------------+-------------+--------------------------------------+
and no optional arguments supplied.

ref:
[1]bp:
https://blueprints.launchpad.net/python-openstackclient/+spec/neutron-client-rbac
[2]about rbac in neutron:
https://developer.rackspace.com/blog/A-First-Look-at-RBAC-in-the-Liberty-Release-of-Neutron/

ting.wang (bx-wang)
Changed in python-openstackclient:
assignee: nobody → ting.wang (bx-wang)
ting.wang (bx-wang)
Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Richard Theis (rtheis) wrote :

You can close this bug and track the work under the blueprint.

ting.wang (bx-wang)
Changed in python-openstackclient:
status: In Progress → New
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.