Prepare the OSC "network rbac" commands for the SDK refactor.
See [1] for details.
[1] https://etherpad.openstack.org/p/osc-network-command-sdk-support
Change-Id: I6f25e167d7f933667173b04a4b0ad55baf3c56f2
Partially-Implements: blueprint network-command-sdk-support
Leverage the new cliff command class attribute (_description)
to get the help of a command, this allows us to mark strings
for translation. We could not do this before since the help
was grabbed from the docstring.
This also depends on a new release of cliff and a bump to the
minimum level in osc's requirements.
Closes-Bug: 1636209
Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da
Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
We could input a QoS policy ID for the "rbac_object"
parameter in "network rbac create" command but not
name before. After this change, "rbac_object" parameter
can be both QoS policy name or ID.
Change-Id: I0fd6b5b5ae410074d85475ef49e5a0a9a52bf86f
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
Add "network rbac set" command which just supports
setting a target project.
Also, This patch adds the doc, unit test and functional test.
But there is a bug of showing network RBAC
https://bugs.launchpad.net/python-openstacksdk/+bug/1608903
We need to skip the functional test before this bug fixed.
Change-Id: I756f448bb333cf1098a735e57a1c5dc4edf195d4
Partially-Implements: blueprint neutron-client-rbac
Add "network rbac create" and "network rbac delete" commands
and also add unit tests, functional tests, docs and release
note for them.
Change-Id: I5fd58342f2deaa9bae7717412a942a21bbd7d045
Partially-Implements: blueprint neutron-client-rbac
1. implement "openstack network rbac list"
2. implement "openstack network rbac show"
3. also add FakeRBACPolicy to test "network rbac xxx" command
The unit test class similar to FakeRouter, which is able to
fake one or more rbac policies. It will be used by the rbac
CRUD patches.
Change-Id: I6c97bc8819698546895fd530464a2cbb347bf77d
Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
Partially-Implements: blueprint neutron-client-rbac
Depends-On: I88f409a24947b67146c0f93ec8480834cef56d2f