summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/router.py
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of tenant_id in the network commandsArtem Goncharov2022-01-171-3/+1
| | | | | | Finally drop tenant_id completely from the networking service. Change-Id: I5f62f2a76592eaaaed6703624e959df41a6ecc8f
* Hide location columns for network objectsDr. Jens Harbott2021-12-161-1/+1
| | | | | | | | | | | | | 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
* Allow setting gateway when creating a routerDr. Jens Harbott2021-12-091-23/+56
| | | | | | | | These options are not only valid when modifying a router, but also when one is created initially. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: I3e12901f37cbd1639ac9dc9cc49b04114b80474c
* 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-3/+15
| | | | | | | | | | 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
* Revert "Format location columns in network commands"Jens Harbott (frickler)2020-06-171-1/+0
| | | | | | This reverts commit 6ee7b8d138e07bfc37c5cd887f7afa49cdabb02f. Change-Id: I5f59959ba8a01aba49e29f4cb007397467344e58
* Add command: router add/remove route --routeBence Romsics2020-03-301-3/+94
| | | | | | | | | | | | | | | | | | | Add commands to osc to call the two new API methods introduced by new Neutron extension: extraroute-atomic. Bump our openstacksdk requirement to >=0.38.0 which contains the corresponding sdk change. The lower-constraints of dogpile.cache and keystoneauth1 are bumped because of requirements bumps in openstacksdk. The lower-constraint of decorator is bumped because of problem already fixed by amotoki here: https://review.opendev.org/701706 Change-Id: Ia9b9c216f1d1161ebedac31594a2c464d77f4ae2 Depends-On: https://review.opendev.org/674324 Partial-Bug: #1826396 (rfe) Related-Change: https://review.opendev.org/655680 (spec)
* Switch to using osc_lib.utils.tagsMichael Johnson2020-01-141-1/+1
| | | | | | | | | | | | This patch updates the network modules to use the new osc_lib.utils.tags module and removes the in tree _tag.py version. A previous patch[1] moves the _tag.py code to osc-lib to allow other projects to leverage the code. [1] https://review.opendev.org/662859 Change-Id: Id0c34029e327de50c5fd2732bae5fbf45bbd16ee
* Fix router create/show if extraroute not supportedÉdouard Thuleau2019-12-041-1/+1
| | | | | | | If neutron does not support extraroute l3 extension, the route column formatter fails. Change-Id: I7b89c4f818865073947e0850e86c18d0d2415a51
* Format location columns in network commandsDean Troyer2019-08-301-0/+1
| | | | | | | | | | | | 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>
* Merge "Use cliff formattable columns in network commands"Zuul2019-06-221-21/+26
|\
| * Use cliff formattable columns in network commandsAkihiro Motoki2019-05-091-21/+26
| | | | | | | | | | | | | | | | | | | | | | Use cliff formattable columns not to convert complex fields into a string when a machine readable format like JSON or YAML is requested. Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I9878f327e39f56852cc0fb6e4eee9105b7141da9
* | Remove deprecated network optionsSean McGinnis2019-05-191-16/+3
|/ | | | | | | | | | | | | | | | The following were deprecated for several releases and can now be removed: * Remove ``port create|set`` options ``--device-id`` and ``--port-id`` * Remove ``router set`` option ``--clear-routes`` * Remove ``security group rule create`` options ``--src-group`` and ``--src-ip`` These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: Ieae74c14f6b3e263721a3146cf76f94a9ab792f6 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Remove str() when setting network objects namesBernard Cafarelli2019-02-131-1/+1
| | | | | | | | | | | | | Most network commands use str() on name argument, which fails on python 2 with Unicode characters. This comes from parsed arguments so does not actually need this call. Sample command failing with current code: openstack network create test_unicode™ Change-Id: Ie10b67864c912ee5c33e90b10c3d9705ee8307e7 Story: 2004356 Task: 27955
* Merge "Supports router gateway IP QoS"Zuul2018-12-121-0/+53
|\
| * Supports router gateway IP QoSLIU Yulong2018-12-101-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds --qos-policy and --no-qos-policy to `openstack router set`: --qos-policy <qos-policy> Attach QoS policy to router gateway IPs --no-qos-policy Remove QoS policy from router gateway IPs Adds --qos-policy to `openstack router unset`: --qos-policy Remove QoS policy from router gateway IPs Partially-Implements blueprint: router-gateway-ip-qos Closes-Bug: #1757044 Change-Id: Ifec3b2cf9bdb59513c8bcd7bd60305506a071192
* | Merge "Don't display router's is_ha and is_distributed attributes always"Zuul2018-12-101-5/+19
|\ \ | |/ |/|
| * Don't display router's is_ha and is_distributed attributes alwaysSławek Kapłoński2018-05-251-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case when is_ha or is_distributed attribute of Neutron's router is set to None, it means that it wasn't returned from server and should not be displayed. Otherwise it might be confusing for user is making openstack router show <router_name> call as an admin will return e.g. is_ha=True but same call done as regular user will return False or None. It might happen like that because returning of those attributes is forbidden for regular users in Neutron's policy.json Depends-On: https://review.openstack.org/567606/ Change-Id: I626b5193d9ecb308baad7b27939f9673c32b4182 Closes-Bug: #1689510 Task: 19789 Story: 2002110
* | Fix some spaces in help messagesBrian Haley2018-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | Fix some missing and not necessary trailing spaces in the network v2 API files. Also fixed one block indent that was different from all its friends. Trivialfix Change-Id: Ic6491203c2fb9085543d69f0bb5f38e5a96039da
* | Fix missing trailing spaces in network help messagesBrian Haley2018-08-031-1/+1
|/ | | | | | Trivialfix Change-Id: I1eeab576e7f50d858860a19c045f24a33449dc92
* Clean up W503 and E402 pep8 errorsSean McGinnis2018-04-151-2/+2
| | | | | | | | | | | | pycodestyle 2.40 and later enforce these rules that were not previously enforced. Rather than just skipping them, this cleans up the trivial instances of these violations. This does also include some other updates that were not triggering errors in an attempt to keep some of the style consistent. Change-Id: Id7c0a6b8f1f835e69d844b000e3ed751852ada63 Closes-bug: #1762803
* Network: Add interfaces info in router showycx2017-11-151-2/+19
| | | | | | | | | | | | Add a list of interfaces info in the output of 'openstack router show'. The information of router interface are: IP address, subnet ID and port ID. Co-Authored-By: Dongcan Ye <hellochosen@gmail.com> Change-Id: I1252986122122defffe795292b83dc4e84481c7e Closes-Bug: #1675489
* Network tag supportAkihiro Motoki2017-07-231-1/+18
| | | | | | | | | | | | | Neutron tag mechanism now supports network, subnet, port, subnetpool and router. Tag support for more resources is planned. This commit introduces a common mixin class to implement tag operation and individual resource consumes it. To support tag remove, network unset command is added. Implements blueprint neutron-client-tag Change-Id: Iad59d052f46896d27d73c22d6d4bb3df889f2352
* Network L3 Router Commands for OSCAnkur Gupta2017-07-111-1/+31
| | | | | | | Implements: blueprint network-l3-commands Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: Ia24d76227e164062e89a74c1621b8acb830b26cf
* Allow override of distributed router flagvenkata anil2017-04-061-5/+8
| | | | | | | | | | | | | When router_distributed=True is set in neutron.conf, user can't override this and create a centralized router through openstack client. Openstack client allows modifying routers from distributed to centralized after creation but not supporting centralized flag during creation. We allow centralized and distributed flags during router creation with this change. Closes-bug: #1664255 Change-Id: I75f72ca695338ad8c381cfa89fbb9d8e61ee7bc5
* Enable to create legacy routerCedric Brandily2017-03-311-2/+10
| | | | | | | | | | Some deployments create by default HA routers, this change enables to force the creation of a legacy router using: openstack router create --no-ha ... Closes-Bug: #1675514 Change-Id: I78f7dc3640a2acfdaf085e0e387b30373e8415f1
* Handle log message interpolation by the logger in network/Gábor Antal2017-02-131-2/+2
| | | | | | | | | | According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Related-Bug: #1596829 Change-Id: I17467d01420750c004fbbf2a07730fc2badd62b8
* Merge "Fix a spelling error"Jenkins2016-12-281-1/+1
|\
| * Fix a spelling errorJingLiu2016-12-261-1/+1
| | | | | | | | Change-Id: Ic14c769d99986d5c51d26fc276f4d47d6fba3265
* | Merge "Introduce overwrite functionality in ``osc router set``"Jenkins2016-12-211-12/+15
|\ \
| * | Introduce overwrite functionality in ``osc router set``Reedip2016-12-191-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | The overwrite functionality allows user to overwrite the routes of a specific router. Change-Id: I8d3cfe5cab2ffbfa046371c3adcd2cf446c91cbc partially-implements: blueprint allow-overwrite-set-options
* | | Add support for clearing router gatewayReedip2016-12-191-0/+7
|/ / | | | | | | | | | | | | | | | | This patch adds the support to clear the gateway information from a router. Change-Id: I446c556750f080a6fc21fea8f531fd71838d648a Implements: blueprint neutron-client-advanced-router Partially-Implements: blueprint network-commands-options
* | Merge "Add support for setting router gateway"Jenkins2016-12-191-4/+54
|\ \
| * | Add support for setting router gatewayReedip2016-12-171-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the support to set the gateway information for a router. Implements: blueprint neutron-client-advanced-router Partially-Implements: blueprint network-commands-options Change-Id: Ifb5a4d1965cd7e75c0c8cf2cfb677e0628b699dc Depends-On: I2bda0dd40afd64b6cecca5f64ef2326bda4fac92
* | | SDK Refactor: Prepare router commandsYan Xing'an2016-12-121-4/+17
| |/ |/| | | | | | | | | | | | | | | | | Prepare the OSC "router" commands for the SDK refactor. See [1] for details. [1] https://etherpad.openstack.org/p/osc-network-command-sdk-support Change-Id: I2fa12943a65e3981b924e6cea9ed041682ec54b2 Partially-Implements: blueprint network-command-sdk-support
* | Merge "Add '--project' and '--project-domain' options to os cmds"Jenkins2016-12-051-1/+14
|\ \
| * | Add '--project' and '--project-domain' options to os cmdsNam Nguyen Hoai2016-12-011-1/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This patch added '--project' and '--project-domain' options to filter subnets resulted by 'os subnet list', 'os floating ip create' and 'os security group list' commands. Co-Authored-By: Ha Van Tu <tuhv@vn.fujitsu.com> Change-Id: I727663d49ffa6aa042fdeb60797f18bb753b0372 Closes-Bug: #1613231 Closes-Bug: #1610909 Closes-Bug: #1613629 Partially-Implements: blueprint network-commands-options
* | Avoid duplicated project_id when show network resourcesjudy-yu2016-12-041-9/+10
|/ | | | | | | | | Project_id appear twice when show network resources. This patch check and not append if it already has one. Change-Id: I744988f3f52d4a744e397a6a82fefdc4c17eacbf Closes-Bug: #1636123 Partially-Implements: blueprint duplicated-project-id
* translate all command help strings3.4.0Steve Martinelli2016-11-171-10/+10
| | | | | | | | | | | | | | 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
* Add filtering options --name,--enable,--disable to router listYi Zhao2016-10-311-1/+28
| | | | | | Change-Id: I171b6be4501b02c3df66589c45177200919117db Closes-Bug: #1637945 Partially-Implements: blueprint network-commands-options
* Add support make a router HAReedip2016-10-161-5/+17
| | | | | | | | | | | Currently router set CLI does not provide the support make a router highly available. The following patch enables the same. Checking for setting a router as HA is left on the neutron server itself. Partially-Implements: blueprint network-commands-options Change-Id: I0d0548cf037a14e5ccb2f732918ee9d1f63f43b4 Closes-Bug:#1631492
* Fix router unset --route optionChoe, Cheng-Dae2016-10-101-2/+1
| | | | | | | | | Fix the "--route" option one the "os route unset" command. The option did not convert gateway to nexthop which results "Router does not contain route" error. Change-Id: Ia57bc7ea77ad7c6030535180a6ce42b4928c9e56 Closes-Bug: 1631471
* Add --ha option to os router create commandNam Nguyen Hoai2016-10-011-2/+8
| | | | | | | | This patch added --ha option which the 'os router create' command was missed. Change-Id: I77635fb17af32beb0d8ed9aa080ef79285719fdc Closes-Bug: #1610161
* Merge "Add --description to Neutron commands"Jenkins2016-09-231-1/+12
|\
| * Add --description to Neutron commandsAnkur Gupta2016-09-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Added simple option for floating ip description when creating a floating ip. Added option for create and set router as well. Partially Implements: blueprint neutron-client-descriptions Partially Implements: blueprint network-commands-options Change-Id: Ib8cd8af449e9ff33b980017b2527a6b196894a00
* | Use correct router add/remove interface methodsrabi2016-09-211-4/+4
|/ | | | | | | Use the correct openstacksdk method names. Change-Id: I07b463753eedf41f79c6e00e9224d0f7697a1bd3 Closes-Bug: #1625954
* router list if availability_zone ext not enabledUkesh Kumar Vasudevan2016-09-151-2/+9
| | | | | | | | | | | | | | when calling router list with --long OSC expects the availability_zone field in the response, even if this extension is not loaded: As per the document, http://developer.openstack.org/api-ref/networking/ v2/?expanded=list-routers-detail, The availability zone(s) for the router is available when router_availability_zone extension is enabled. Added testcase to test router list without availability zone Change-Id: Ic9abb06140eb310b797ade8b0463a876d8bea1b8 Closes-bug: #1622565
* Merge "Add command to unset information from Routers"Jenkins2016-06-281-0/+43
|\
| * Add command to unset information from Routersreedip2016-06-271-0/+43
| | | | | | | | | | | | | | | | This patch introduces the ``router unset`` command to clear the routing information from the routers. Implements: blueprint network-property-unset Change-Id: Iac8d32ca42fb28878805b4b58ab411b67fa6555b
* | Fix the problem of router deleteSongmingYan2016-06-241-1/+1
|/ | | | | | | Change "Remove" to "Delete" when using it in route-interface-delete. Change-Id: I9ebc38c787acbcb42d2f8efeee41f6cb943e4b9b Related-bug: #1560446