summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/subnet.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Format location columns in network commands"Jens Harbott (frickler)2020-06-171-1/+0
| | | | | | This reverts commit 6ee7b8d138e07bfc37c5cd887f7afa49cdabb02f. Change-Id: I5f59959ba8a01aba49e29f4cb007397467344e58
* 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
* 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
* | 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>
* Use cliff formattable columns in network commandsAkihiro Motoki2019-05-091-12/+18
| | | | | | | | | | | 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
* 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
* 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
* Add metavar for name parameter in subnet createDavid Rabel2018-09-121-0/+1
| | | | | Change-Id: I2511677006687fff3166441c51e91191492962f1 Closes-Bug: #1747731
* Fix missing trailing spaces in network help messagesBrian Haley2018-08-031-1/+1
| | | | | | Trivialfix Change-Id: I1eeab576e7f50d858860a19c045f24a33449dc92
* Fix subnet host_routes errorHuang Cheng2018-06-141-1/+1
| | | | | | | When updating subnet with "no-host-route" option, set host_routes to an empty list as neutron_lib.api.validators expected. Change-Id: I6fe039793d813758429c7a104fd40172b4f8122b Closes-Bug: #1747101
* Allow setting network-segment on subnet updateHarald Jensas2018-06-061-4/+12
| | | | | | | | | To enable the possibility to migrate a non-routed network to a routed network allow updating the segment_id of a subnet. Change-Id: I3ebae2ff28d5d4e5373ebd1f52194f8c52071b88 Partial-Bug: bug/1692490 Depends-On: I1aee29dfb59e9769ec0f1cb1f5d2933bc5dc0dc5
* Fix output for subnet showJens Harbott2017-09-121-1/+1
| | | | | | | | | The use_default_subnet_pool column is never returned by the API, it is only being used in the request to create a subnet. So make sure that we do not show it when displaying a subnet. Change-Id: Ie021149cceb8f89b779ad0f3c13ac60420509671 Related-Bug: 1668223
* Allow PD as Subnetpool during Subnet creationsReedip2017-08-171-0/+7
| | | | | | | | | | | This commit now allows user to specify 'prefix_delegation' as a Subnetpool during Subnet creation by using the new --use-prefix-delegation option so that the IPv6 prefixes can be delegated to routers set up by the cloud admins. Change-Id: I67e5d81c4155db2e3c5c41ee1df77f2d77a17689 Closes-Bug: #1513894
* Network tag supportAkihiro Motoki2017-07-231-3/+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
* Help/docs cleanups: marker, limit, ip-address metavarsDean Troyer2017-04-041-2/+2
| | | | | | | | | | | | Cleanup help strings and docs for clarity and to keep things consistent: * --limit metavar should be <num-resource> to indicate what is being counted * --marker metavar should be <resource> or <resource-id> to indicate the type of value being specified * <*-ip-address> metavars should be just <ip-address> as there is no difference in format between fixed and floating IPs * Move all occurances of '(name or ID)' to end of help text Change-Id: I2c31746ed6ded3845244e03e57d809f8bc0e6b9d
* Fix handling the use_default_subnet_pool attributeJens Rosenboom2017-03-091-2/+8
| | | | | | | | | | | | | | | The attribute formerly wasn't working because it is lacking support in the SDK. The patch to add it[1] introduced a modified spelling, so we should be matching this here. Also make sure that the attribute is not shown when displaying subnet objects, as it is meant to be invisible[2]. [1] I72c0be77d96f3891748cdd69c382211dc20dbf5e [2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/default_subnetpools.py#n23 Change-Id: Ic125b818a6082d76a1114fe89e0b1fcf4c7356b0 Partial-Bug: 1668223
* 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 "SDK Refactor: Prepare subnet commands"Jenkins2016-12-021-10/+21
|\
| * SDK Refactor: Prepare subnet commandsAbhishek Raut2016-11-191-10/+21
| | | | | | | | | | | | | | | | | | | | Prepare the OSC "subnet" commands for the SDK refactor. See [1] for details. [1] https://etherpad.openstack.org/p/osc-network-command-sdk-support Partially-Implements: blueprint network-command-sdk-support Change-Id: I5d58b189e822b2ee61c9c95ccf909113ff59de46
* | Merge "Introduce overwrite functionality in ``osc subnet set``"Jenkins2016-12-011-1/+13
|\ \ | |/ |/|
| * Introduce overwrite functionality in ``osc subnet set``Reedip2016-11-281-1/+13
| | | | | | | | | | | | | | | | The overwrite functionality allows user to overwrite the dns-nameservers of a specific subnet. Change-Id: I421808a3bdeb4565668f627b7929c4762cf40212 partially-implements: blueprint allow-overwrite-set-options partially-implements: blueprint network-commands-options
* | translate all command help strings3.4.0Steve Martinelli2016-11-171-6/+6
|/ | | | | | | | | | | | | | 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
* Reset allocation pools to [] instead of ''Carl Baldwin2016-10-191-1/+1
| | | | | | | | | | | | | the sdk expects subnet allocation pools to be reset to an empty array, not an empty string. Currently this results in an error message: "Invalid input for allocation_pools. Reason: Invalid data format for IP pool" Change-Id: I7cc84b9c8e4abdbd2c91e5d591ad31f0849c1a83 Closes-Bug: #1634672
* Remove beta label for network segment resourceRichard Theis2016-09-281-8/+7
| | | | | | | | With Ocata development opened, neutron network segments are no longer beta resources. Change-Id: I25be51c30df17c746136471b88840f64a03187b9 Partially-Implements: blueprint routed-networks
* Overwrite/Clear support for subnetsReedip2016-09-211-4/+26
| | | | | | | | This patch adds the overwrite/clear functionality for allocation-pool and host-routes in subnets. Change-Id: Idfa41173d0c054c5bfb4eda8c5f614928012555a implements: blueprint allow-overwrite-set-options
* Merge "Add 'description' option to os subnet (pool) create/set cmd"Jenkins2016-09-201-0/+12
|\
| * Add 'description' option to os subnet (pool) create/set cmdCao Xuan Hoang2016-09-201-0/+12
| | | | | | | | | | | | | | | | | | This patch adds '--description' option to the commands. Change-Id: Ifc2828670c3c48a87a0493d98686a5babf9b2ae7 Closes-Bug: #1614458 Closes-Bug: #1614823 Partially-Implements: blueprint network-commands-options
* | Add filtering options to os subnet list commandCao Xuan Hoang2016-09-191-1/+50
|/ | | | | | | | | | This patch adds the following filtering options: '--project' and '--project-domain', '--network', '--gateway', '--name', '--subnet-range' to the command. Change-Id: I575739486b9548492bd00f50130181b825534226 Partially-Implements: blueprint network-commands-options Closes-Bug: #1610883
* Doc, help and message updates for port unsetRichard Theis2016-09-141-33/+24
| | | | | | | | | Update port unset based on review comments in [1]. [1] https://review.openstack.org/#/c/306236/ Change-Id: Icae6e3869516f2d53f90ad46efc03f897c00b0e5 Implements: blueprint network-property-unset
* Add Subnet service-types to subnetsBrian Haley2016-08-191-2/+48
| | | | | | | | Add '--service-type' to subnet arguments to support Subnet service-types. Change-Id: I215d83e4d4cf53e03fa35041c5e41a328641b3a9 Partially-implements: blueprint service-subnets
* Add '--dhcp' and '--no-dhcp' options to os subnet list cmdCao Xuan Hoang2016-08-101-0/+15
| | | | | | | | This patch adds '--dhcp' and '--no-dhcp' options to filter subnets resulted by os subnet list command. Change-Id: Ib574cc54594845bc5c5afc38bf44e3b224d33b17 Partial-Bug: #1610883
* Exchange the check order for the dhcp and no-dhcpqtang2016-07-191-2/+1
| | | | | | | | | | | | The dhcp is setting with True by default and progress always jump into the first if check. So the no-dhcp option always ignored there. Check the no-dhcp option first and then the dhcp option value to avoid this. Change-Id: Ide640e2cab3936d419ca62105304ff5d4a8a2074 Closes-Bug: #1602588
* Merge "Add command to unset information from Subnets"Jenkins2016-06-291-0/+83
|\
| * Add command to unset information from Subnetsreedip2016-06-291-0/+83
| | | | | | | | | | | | | | | | | | This patch introduces the ``subnet unset`` command to clear the host-routes, allocation-pools and dns-nameservers from subnets. Implements: blueprint network-property-unset Change-Id: I31324a2423f6d2315eed27445dfdcfe863e0b550
* | Fix typo in openstackclient/network/v2Cao Xuan Hoang2016-06-231-4/+4
|/ | | | | | | | This patch adds the missing "." to some docstring/text. Trivial fix Change-Id: Iffb470dcce7200ddc9e439c465adc652a8322708
* Merge "Add "--network-segment" option to "subnet create""Jenkins2016-06-201-0/+10
|\
| * Add "--network-segment" option to "subnet create"Richard Theis2016-06-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add "--network-segment" option to the "subnet create" command. This is a beta command option and subject to change. Use global option "--os-beta-command" to enable this option. This patch set also provides a devref update for beta command options. Change-Id: I4d0fbe079b2a873307364c41c22ce9ba88e632e6 Partially-Implements: blueprint routed-networks
* | Support bulk deletion for delete commands in networkv2Huanxuan Ao2016-06-161-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | This patch support bulk deletion for delete commands below: 1.subnet delete 2.subnet pool delete Up to now, all the delete commands in networkv2 support bulk deletion. Change-Id: I63f6d1d02bad1fcc26e72b7028b53958a68ce2dc Partially-Implements: blueprint multi-argument-network Partial-Bug: #1592906
* | osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | | | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* | osc-lib: parseractionsDean Troyer2016-06-131-1/+1
| | | | | | | | | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* | osc-lib: utilsDean Troyer2016-06-131-1/+1
| | | | | | | | | | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* | osc-lib: exceptionsDean Troyer2016-06-131-1/+3
|/ | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Make set/unset commands in network return normally when nothing specifiedTang Chen2016-06-081-3/+0
| | | | | | | | | | | | | | set/unset commands should ends up normally instead of raising an exception when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens. This patch also adds a releasenote for both network, and volume commands that fix patch has been merged. Change-Id: I78c348066078decd350417a431f3b8bea8fcf9ef Partial-bug: #1588588
* Merge "Add ip version filter to subnet list"Jenkins2016-05-171-1/+13
|\
| * Add ip version filter to subnet listManjeet Singh Bhatia2016-05-161-1/+13
| | | | | | | | | | | | | | | | This patch will add argument ip-version to command subnet list Change-Id: If7458d4979e53aec7e2633c4f1779c3810f9a3f1 Closes-Bug: #1581179
* | Fix i18n support for help and error msg in networkTang Chen2016-05-161-3/+3
|/ | | Change-Id: Iab0dc489226601ac4ff123bb758f84ff16989395
* Fixed subnet command host route outputRichard Theis2016-04-201-10/+8
| | | | | | | | | | | Fixed the "os subnet create", "os subnet list" and "os subnet show" command output for host routes to improve readability and to align with the "--host-route" option on the "os subnet create" and "os subnet set" commands. Change-Id: Ida69ae1a0bdb2e1648f8b5c978fc80cf1bbe752f Closes-Bug: #1572309
* State i18() changes and help messages improvedTang Chen2016-04-181-47/+48
| | | | | | | | Add _() to wrap help message in network commands. And also some improvement for help message. Change-Id: Ib3e498f5976ba98c44fd4eec2d1623263b3db53e Partial-bug: 1570924
* Merge "Doc: Unify repeatable option comments"Jenkins2016-04-131-4/+4
|\