summaryrefslogtreecommitdiff
path: root/openstackclient/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add "fields" parameter to ListSecurityGroup query"Zuul2020-03-241-1/+3
|\
| * Add "fields" parameter to ListSecurityGroup queryRodolfo Alonso Hernandez2020-03-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new query parameter will allow to send a query sending the "fields" parameter. This "fields" parameter contains the needed API fields, translated into OVO fields in Neutron server, that require to be retrieved from the DB. As commented in the related bug, the OSC "list" command only prints five parameters, none of them the security group rules. In systems with a reasonable amount of security groups, skipping the unnecessary rule load can save a lot of time. Depends-On: https://review.opendev.org/#/c/710820/ Change-Id: I16f48e292997d029d68f66365db949b9f4b5a0c8 Closes-Bug: #1865223
* | Merge "Fix network segment range "_get_ranges" function"Zuul2020-03-231-2/+1
|\ \
| * | Fix network segment range "_get_ranges" functionRodolfo Alonso Hernandez2020-03-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function should return an ordered set of ranges based on an unordered list of numbers (int or str). Change-Id: I918c8befc51236cc33d96a5c88fb6eafdd143e9c Story: 2007341 Task: 38878
* | | Allow setting floating IP descriptionDaniel Strong2020-03-181-0/+8
| |/ |/| | | | | | | | | Change-Id: If664bfe3c9fdcb69c7046eb16c5d32602d1b3262 Story: 2007439 Task: 39094
* | Disallow setting default on internal networkHongbin Lu2020-03-091-1/+6
|/ | | | | | | | | The ``--default`` option should be only used for external network. Default internal network is not currently supported so we disallow it for now. Change-Id: Ia9d39b40e1e041d7bda0f6a27d058e382b572e1a Closes-Bug: #1745658
* Switch to using osc_lib.utils.tagsMichael Johnson2020-01-148-151/+7
| | | | | | | | | | | | 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
* Merge "Add dns_publish_fixed_ip attribute to subnets"Zuul2020-01-131-0/+26
|\
| * Add dns_publish_fixed_ip attribute to subnetsJens Harbott2019-09-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the subnet_dns_publish_fixed_ip extension Neutron has added a new attribute to subnets, allowing to select whether DNS records should be published for fixed IPs from that subnet. Add support for this when creating and updating subnets. [0] https://bugs.launchpad.net/neutron/+bug/1784879 [1] https://review.opendev.org/662405 [2] https://review.opendev.org/662409 Depends-On: https://review.opendev.org/679833 Change-Id: Ia804e878acfd1f05e1f00c2ac9202c1d260827f4
* | Replace six.iteritems() with .items()lihaijing2020-01-094-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* | 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
* | neutron: autogenerate docsEric Fried2019-11-016-298/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $namespace = openstack.network.v2 The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. This one turned out to be quite involved, because we support both neutron and nova-network. When running in a real cloud, the command classes detect whether the neutron service is present, assume nova-network if that service is not found, and only add parser options relevant to the detected service. But the docs need to present both sets of options. This was easy enough when they were hardcoded, but required a bit of additional infrastructure for generated docs. Change-Id: I426261eb1d86bcc68656aabd61f10b7f082da402
* | Merge "Add floating IP Port Forwarding commands"Zuul2019-09-091-0/+371
|\ \
| * | Add floating IP Port Forwarding commandsLIU Yulong2019-08-291-0/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add following commands: floating ip port forwarding create floating ip port forwarding delete floating ip port forwarding list floating ip port forwarding set floating ip port forwarding show Closes-Bug: #1811352 Change-Id: I6a5642e8acce28fc830410d4fa3180597b862761
* | | Format location columns in network commandsDean Troyer2019-08-3022-28/+119
| |/ |/| | | | | | | | | | | | | | | | | | | | | 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 "Bump hacking version"Zuul2019-08-281-1/+1
|\ \ | |/ |/|
| * Bump hacking versionStephen Finucane2019-08-271-1/+1
| | | | | | | | | | | | | | | | Pick up newer versions of this library. Thankfully no serious changes are needed. Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "openstack port create support --extra-dhcp-option"Zuul2019-08-011-2/+28
|\ \
| * | openstack port create support --extra-dhcp-optionzhouhenglc2019-07-251-2/+28
| |/ | | | | | | | | | | | | neutron create-port API has extra_dhcp_opts parameter, this parameter can set port with special extra dhcp options. Change-Id: I199f17e95c509a33f809ac85c65f685a37acd198
* | Support IPv6 addresses betterBrian Haley2019-07-151-9/+40
|/ | | | | | | | | | | | | | | | | | | When adding a security group rule, if no IP address is given we will use '0.0.0.0/0', but if the ethertype is IPv6 we will leave it as None. Change this to be '::/0' to match what we do for IPv4 - use the "any" address. The neutron server treats them both the same when checking for duplicates. Because there are most likely entries in the DB using None for the IP, print them as '0.0.0.0/0' or '::/0' so it is more obvious what address they are actually referring to. Also change to display the Ethertype column by default instead of with --long, since easily knowing IPv4 or IPv6 is useful. Change-Id: Ic396fc23caa66b6b0034c5d30b27c6ed499de5a6 Closes-bug: #1735575
* Merge "Change default security group protocol to 'any'"Zuul2019-06-221-6/+6
|\
| * Change default security group protocol to 'any'Brian Haley2019-05-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The default protocol used to create a security rule was changed to ``tcp``, which was a regression from the neutron client. Change it back to ``any``, which skips sending the protocol to the API server entirely when using the Neutron v2 API. Users that had been creating rules without specifying a protocol and expecting ``tcp`` need to change to use ``--protocol tcp`` explicitly. Change-Id: Iedaa027240e00dced551513d8fa828564386b79f Closes-bug: #1716789
* | Merge "Use cliff formattable columns in network commands"Zuul2019-06-228-74/+110
|\ \
| * | Use cliff formattable columns in network commandsAkihiro Motoki2019-05-098-74/+110
| |/ | | | | | | | | | | | | | | | | | | | | 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-193-104/+13
|/ | | | | | | | | | | | | | | | 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>
* Ignore case in security group rule --ethertypeJim Rollenhagen2019-04-011-0/+9
| | | | | | | | | Currently, this only allows 'IPv4' or 'IPv6', but one can imagine a user frequently typing e.g. 'ipv6' and getting frustrated. Allow any case, while still keeping correct case for the choices and the value sent to Neutron. Change-Id: I70ce1f43d32aad01b174437d03c984a5b608b161
* Merge "Fix: incorrect check when no shared/private input"Zuul2019-03-161-2/+2
|\
| * Fix: incorrect check when no shared/private inputKailun Qin2019-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | When neither of "--shared" and "--private" is input, we should not allow to specify "--project". Defaulting the created network segment range to shared is expected. Therefore, "project_id" attr should only be populated on a private range creation. Change-Id: Iab345e1651dd8b7904ff64a20633f194d719bb84 Story: 2005206 Task: 29980
* | Fix service discovery in functional testsGlenn Van de Water2019-03-131-9/+10
|/ | | | | | | | | | | | | | | | | | | | | If a required service is not enabled then we skip the test. The discovery is done by tests/functional/base.py:is_service_enabled but this method is broken, credentials are not passed to the 'openstack service show' command so every call will fail and every test that relies on it will be skipped. This commit fixed that method and the issues that popped up when re-enabling tests. Network segment range: - issue where we assumed network-segment-range extension is always present - issue where we compare integers and string representations of numbers Subnet: - issue where we try to deepcopy an uncopyable object in UnsetSubnet Change-Id: Id3cc907c1ed2a25b49cf6f4a7233e0401a02383a Story: 2005169 Task: 29908
* Fix: set invalid None project_id on range creationKailun Qin2019-03-131-2/+0
| | | | | | | | | | "project_id" attribute should not be set to None on shared network segment range creation since it is not a valid string type which is required for the API. Change-Id: Ia2bab12e39b4bb7e05ff2acfffb851252c100651 Story: 2005205 Task: 29975
* Merge "Add 'security_group' type support to network rbac commands"Zuul2019-03-111-4/+9
|\
| * 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
* | Merge "Add network segment range command object"3.18.0Zuul2019-03-081-0/+458
|\ \ | |/ |/|
| * Add network segment range command objectKailun Qin2019-03-071-0/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add network segment range command object in support of network segment range management. This patch set includes documentation, unit tests and functional tests (currently skipped unit network segment range enabled in Neutron by default) for the following new commands: - "os network segment range create" - "os network segment range delete" - "os network segment range list" - "os network segment range set" - "os network segment range show" Co-authored-by: Allain Legacy <Allain.legacy@windriver.com> [depends on removed by dtroyer as those are all +W and trying to pass the gate, OSC has it's freeze dealine looming] Depends: https://review.openstack.org/624708 Depends: https://review.openstack.org/624709 Depends: https://review.openstack.org/638386 Partially-implements: blueprint network-segment-range-management Change-Id: I335692f2db5be07c1c164f09b13f1abb80b7ba33
* | Merge "Partially Revert "Add command to unset information from Subnet-pools""Zuul2019-02-271-23/+0
|\ \
| * | Partially Revert "Add command to unset information from Subnet-pools"Bernard Cafarelli2018-09-051-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not support removing a prefix from a subnet pool, only updating with a larger prefix (which is handled by the set command) This reverts commit 063c722a110031883e9615064092644de6df8da2. Change-Id: I11224fbdb94dc1caef42a8a64cbcebaf1dc542fe Story: #1670230 Task: #13697
* | | Remove str() when setting network objects namesBernard Cafarelli2019-02-137-8/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | 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
* | Add floating IP filter to floating IP list commandJohannes Kulik2019-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | Add a parameter ``--floating-ip-address`` to ``floating ip list`` because it's supported by the API and also more efficient than the current ``floating ip show``. This also works as a work-around for pagination issues ``floating ip show`` might run into with an IP parameter. Change-Id: I113e3fa2495e1e86bb553c55c44f71a3f9f49d23
* | Merge "Support enable/disable uplink status propagation"Zuul2018-12-241-0/+18
|\ \
| * | Support enable/disable uplink status propagationHongbin Lu2018-12-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add options to enable/disable uplink status propagation on creating a neutron port. Related patches: * neutron: https://review.openstack.org/#/c/571899/ * openstacksdk: https://review.openstack.org/#/c/586687/ Depends-On: https://review.openstack.org/#/c/586687/ Change-Id: I095a98fc5f5aee62d979a16b3cd79d91ec3b9ddb Related-Bug: #1722720
* | | 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
* | | Merge "Add metavar for name parameter in subnet create"Zuul2018-10-031-0/+1
|\ \ \
| * | | Add metavar for name parameter in subnet createDavid Rabel2018-09-121-0/+1
| | |/ | |/| | | | | | | | | | Change-Id: I2511677006687fff3166441c51e91191492962f1 Closes-Bug: #1747731
* | | Fix some spaces in help messagesBrian Haley2018-09-272-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 help message for subnetpool default-quota valueWenran Xiao2018-09-191-4/+6
|/ / | | | | | | | | | | | | | | | | Default pre-project quota is the number of IP addresses that can be allocated from the subnet pool. For example, with a quota of 128, I might get a 64 addresses subnet1, and 16 addresses subnet2, and still have room to allocate 48 more addresses in the future. Change-Id: Ia0ba827790b190647aed990e47347560fc9e9f0c
* | Merge "Detailed help message for QoS max-burst-kbps value"Zuul2018-08-141-1/+4
|\ \
| * | Detailed help message for QoS max-burst-kbps valueLajos Katona2018-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QoS rule type bandwidth-limit the max-burst-kbps value for ovs and linuxbridge is suggested to be 80% of the maxkbps value, let's give a detailed help message for the CLI user. For details see https://docs.openstack.org/neutron/queens/admin/ config-qos.html#user-workflow Change-Id: Ia6e38ec7052b7af64880c2f4c5e242d7cb980df5 Closes-Bug: #1777866