summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/network_rbac.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.networkStephen Finucane2023-05-101-64/+109
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I8048746dbc2ef0cb582f68934734db4c1153d779 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* network: Add tenant project filter for RBAC listJan Hartkopf2022-09-061-0/+15
| | | | | | | | | | | | | Implements a new parser argument "--target-project" to list RBAC policies for a specific tenant project only. This uses the already existing server-side query parameter "target_tenant". Story: 2009937 Task: 44824 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/834442 Change-Id: I83ff07041a022e8795e3c5550c6a7aabb0c0d8c8 Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
* Refactor network fakes to sdk properties PART 4Nurmatov Mamatisa2022-04-291-1/+1
| | | | | | | | | | Included resources: port network_agent network_flavor_profile network_rbac Change-Id: I2e71a3c0fefb56ddcc75865c95746550e2710aa3
* Get rid of tenant_id in the network commandsArtem Goncharov2022-01-171-2/+1
| | | | | | Finally drop tenant_id completely from the networking service. Change-Id: I5f62f2a76592eaaaed6703624e959df41a6ecc8f
* Hide location columns for network objectsDr. Jens Harbott2021-12-161-1/+6
| | | | | | | | | | | | | Network objects returned from the SDK include a location column which has a reference to the cloud to which the object belongs. We don't want to include them in CLI output where they are useless. The solution implemented in [0] was dropped as a sideeffect in [1]. [0] https://review.opendev.org/c/openstack/python-openstackclient/+/679445 [1] https://review.opendev.org/c/openstack/python-openstackclient/+/815032 Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: I9a408d9721c9c57d752afaab520cd6ee379a5184
* Remove 'get_osc_show_columns_for_sdk_resource' duplicatesStephen Finucane2021-10-211-3/+1
| | | | | | | | | | | | There were a number of 'get_osc_show_columns_for_sdk_resource' defined in-tree. However, osc-lib has provided this method for some time (since 2.2.0, June 2020 [1] - our minimum version is currently 2.3.0) so there's no need to provide our own copies. Remove them. [1] https://github.com/openstack/osc-lib/commit/29a0c5a5 Change-Id: I25695f4f9a379dd691b7eaa1e3247164668ae77e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Allow to send extra attributes in Neutron related commandsSlawek Kaplonski2021-05-261-2/+7
| | | | | | | | | | To deprecate and drop support for neutronclient CLI and use only OSC we need feature parity between OSC and neutronclient. Last missing piece here is possibility to send in POST/PUT requests unknown parameters to the Neutron server. This patch adds such possibility to the OSC. Change-Id: Iba09297c2be9fb9fa0be1b3dc65755277b79230e
* Add 'address_group' type support to rbac commandsMiguel Lavalle2021-02-101-8/+14
| | | | | Depends-On: https://review.opendev.org/c/openstack/neutron/+/772460 Change-Id: Icd5e96d180364b979d1e93fcb39f9133a41a06e5
* Revert "Format location columns in network commands"Jens Harbott (frickler)2020-06-171-8/+2
| | | | | | This reverts commit 6ee7b8d138e07bfc37c5cd887f7afa49cdabb02f. Change-Id: I5f59959ba8a01aba49e29f4cb007397467344e58
* Add 'subnetpool' type support to rbac commandsIgor Malinovskiy2020-04-091-5/+10
| | | | | | Change-Id: Id6e528ebd1bf21ca142e60052d28371f97f629ac Partial-Bug: #1862032 Depends-On: https://review.opendev.org/710755
* Add 'address_scope' type support to network rbac commandsIgor Malinovskiy2020-03-261-5/+12
| | | | | | Change-Id: I6a4b7219934805c1bbd1e88fcc670ae231d9ac37 Partial-Bug: #1862968 Depends-On: https://review.opendev.org/709122
* Format location columns in network commandsDean Troyer2019-08-301-2/+8
| | | | | | | | | | | | These return a Munch from the SDK, which can be handled exactly like a dict so do that. Note that the location column has a nested project dict in the return value, this is addressed separately in osc_lib.format_columns in https://review.opendev.org/#/c/679474/. Change-Id: I99a6d192749a4ac76777f72be8118261c0521cb0 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Add 'security_group' type support to network rbac commandsDoug Wiegley2019-03-051-4/+9
| | | | | | Partial-Bug: #1817119 Depends-On: https://review.openstack.org/635311 Change-Id: I5f132fa54714514d8dae62df8bc494f3f6476768
* Network: Add supports rbac target-all-projectsDongcan Ye2017-11-051-7/+16
| | | | | | | | | Add a boolean option "target-all-projects", which allows creating rbac policy for all projects. Change-Id: Ie3af83a1bba7dd66e83b0595bb276bf8fd105831 Closes-Bug: #1728525 Closes-Bug: #1704834
* Add '--type'and other options to network rbac listguiyanxing2016-12-211-1/+35
| | | | | | | | | This patch adds '--type','--action','--long' filtering options to network rbac list command Change-Id: I21846820ab223bb7832e89eb2d7658bbec271aec Closes-Bug: #1648307 Partially-Implements: blueprint network-commands-options
* SDK Refactor: Prepare network rbac commandsAbhishek Raut2016-11-191-12/+14
| | | | | | | | | | 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
* translate all command help strings3.4.0Steve Martinelli2016-11-171-5/+5
| | | | | | | | | | | | | | 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
* Allow input the QoS policy name in network rbac create commandHuanxuan Ao2016-10-201-5/+4
| | | | | | | | | 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
* Show "target_project_id" attribute properly for network rbac objectHuanxuan Ao2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement "network rbac set" commandHuanxuan Ao2016-08-031-0/+41
| | | | | | | | | | | | 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
* Implement network rbac create and delete commandsHuanxuan Ao2016-07-281-0/+132
| | | | | | | | | 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
* Implement rbac list and show commandting wang2016-06-271-0/+75
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