summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/floating_ip.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.networkStephen Finucane2023-05-101-73/+126
| | | | | | | | | | 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>
* Don't show tenant_id in network objectsDr. Jens Harbott2022-06-271-1/+1
| | | | | | | | | | | | Patch [0] dropped mapping the tenant_id attribute to project_id. However, the Neutron API still returns the tenant_id attribute in addition to the project_id and so we still need to discard it from the output. [0] I5f62f2a76592eaaaed6703624e959df41a6ecc8f Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Iba1e003bf587802f28928cb44d160b3b3fb1f840
* Get rid of tenant_id in the network commandsArtem Goncharov2022-01-171-8/+2
| | | | | | 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-2/+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-4/+11
| | | | | | | | | | 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-2/+0
| | | | | | This reverts commit 6ee7b8d138e07bfc37c5cd887f7afa49cdabb02f. Change-Id: I5f59959ba8a01aba49e29f4cb007397467344e58
* Allow setting floating IP descriptionDaniel Strong2020-03-181-0/+8
| | | | | | Change-Id: If664bfe3c9fdcb69c7046eb16c5d32602d1b3262 Story: 2007439 Task: 39094
* 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
* neutron: autogenerate docsEric Fried2019-11-011-29/+45
| | | | | | | | | | | | | | | | | | | $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
* Format location columns in network commandsDean Troyer2019-08-301-0/+2
| | | | | | | | | | | | 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 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 "Add DNS support to floating IP commands"Zuul2018-08-081-1/+28
|\
| * Add DNS support to floating IP commandsJens Harbott2018-08-061-1/+28
| | | | | | | | | | | | | | | | | | | | Add the DNS domain and name options to the ``floating ip create`` command. Also add these two columns to the output of the ``floating ip list --long`` command. Change-Id: Id4cb18b51b252f19b87b24ec5d77183771189d17 Story: 1547736 Task: 13114
* | Merge "Do not require port argument when updating floating IP"Zuul2018-07-241-5/+6
|\ \
| * | Do not require port argument when updating floating IPyanpuqing2018-06-131-5/+6
| |/ | | | | | | | | | | | | | | | | | | | | When setting floating ip other properties, port argument is force to use. The patch modifies the command, when setting floating ip other properties, like tags, no need port argument. Change-Id: I908712c8913f32d3dd5fdfefe7347277d72f66de Story: 1751431 Task: 13865
* | Merge "Format port_details field of Floating IP"Zuul2018-06-281-1/+6
|\ \
| * | Format port_details field of Floating IPHongbin Lu2018-04-271-1/+6
| |/ | | | | | | | | | | Depends-On: I31e940d2986278d2fbee6fdfea4ff15f7c07ebaa Change-Id: I115739ea253ce26e075cd3f10e719b13f18afa5b Partial-Bug: #1723026
* | Merge "Remove deprecated ip floating commands"Zuul2018-06-091-98/+0
|\ \ | |/ |/|
| * Remove deprecated ip floating commandsDongcan Ye2018-04-081-98/+0
| | | | | | | | | | | | | | We had already implemented floating ip(pool) commands more than two cycles, we can remove those deprecated commands. Change-Id: Ib98a7403a63bb0c48c03de4c79795737de2aa84c
* | Merge "Network: Add tag support for floating ip"Zuul2018-04-231-1/+22
|\ \
| * | Network: Add tag support for floating ipDongcan Ye2018-04-171-1/+22
| |/ | | | | | | | | Change-Id: I7a500a4ff6cec2442b4050df26c0b017d9f71903 Closes-Bug: #1750985
* | Fix typo in 'floating ip associate' command and docBrian Haley2018-03-151-1/+1
|/ | | | | | | | Assocaite -> Associate Trivialfix Change-Id: I432e35ddcd80ef77c865bee9a54ac2777f5b6386
* Use find_ip from openstacksdkMonty Taylor2018-01-291-60/+4
| | | | | | | The find_ip from openstacksdk started being usable by OSC back in 0.9.15 but the local method never got replaced. Change-Id: I18a334280e5f384f8bb96198cdad79c612a02290
* Add floating IP qos_policy actionsLIU Yulong2018-01-111-3/+39
| | | | | | | | | | | | | | | | | Now we can associate a qos policy to the floating IP, and dissociate it. The commands are: $ openstack floating ip create --qos-policy ... $ openstack floating ip set --qos-policy ... $ openstack floating ip set --no-qos-policy ... $ openstack floating ip unset --qos-policy These commands are based on the neutron change: I4efe9e49d268dffeb3df4de4ea1780152218633b Partially-Implements blueprint: floating-ip-rate-limit Change-Id: I932b32f78cc5a2b53926feaec1a0b392cf7e8b57
* Low-level Compute v2 API: floating ipDean Troyer2017-04-111-18/+9
| | | | | | | | | | api.compute.APIv2 floating ip functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Ic461b8d15e072e0534dcd73fff6857581d83c89b
* Merge ""floating ip set/unset port" for OSC"Jenkins2017-04-061-0/+74
|\
| * "floating ip set/unset port" for OSCSindhu Devale2017-04-051-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements Neutron feature of floating ip associate/disassociate into OpenStack Client. Previously, network.find_ip() function only supported to search floating ip by UUID. Hence, _find_floating_ip() function is used in floating_ip.py, to search fip both by UUID and ip_address. [1] adds the ability to find fip object using both UUID and ip_address. This functionality however, won't be available until the SDK is released. Hence, we continue to use _find_floating_ip() method, which was cleaned up by [2] to remove the use of ip_cache. Once, the SDK is released, we will remove all the usage of _find_floating_ip() method and instead only use network.find_ip(). [1] https://review.openstack.org/#/c/449879/2 [2] https://review.openstack.org/#/c/447938/ Change-Id: I6c5222287c46ca42365917d2deae70bdb626347 Co-Authored-By: Reedip<reedip.banerjee@nectechnologies.in> Co-Authored-By: RuiChen<chenrui.momo@gmail.com> Closes-Bug: #1560297
* | Merge "Structure FindFloatingIP() to work without ip_cache"Jenkins2017-04-041-21/+7
|\ \ | |/
| * Structure FindFloatingIP() to work without ip_cacheReedip2017-04-041-21/+7
| | | | | | | | | | | | | | | | | | | | | | Currently we have an ip_cache returned from _find_floating_ip() which is generally ignored as it is not always required. This patch removes the need of ip_cache in _find_floating_ip(). Co-Authored-By: Sindhu Devale<sindhu.devale@intel.com> Change-Id: I8b92271185f82f275fa73adad03e9dad70be70e4
* | Help/docs cleanups: marker, limit, ip-address metavarsDean Troyer2017-04-041-3/+3
|/ | | | | | | | | | | | 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
* Remove remaining uses of SDK Proxy.sessionDean Troyer2017-02-191-2/+2
| | | | | | | SDK commit Ie67c240e3caa5e100ce07db3862718195c894748 exposed lingering uses of Proxy.session in OSC. Get rid of them. Change-Id: Icab230f1897a446cf3deb0e3d0550d24e11a0ef3
* Fix floating IP delete and show by IPDean Troyer2017-01-141-2/+79
| | | | | | | | | | | The floating IP delete and show commands did not work using IP addresses as the selector, only ID. The SDK floating_ip resource does not support but OSC does, so we have to do it ourselves. Now with more SDK 0.9.10 support! Change-Id: Iea1b57cded6b16a56a06af87ab8f1fa001a3485e Closes-bug: 1656402
* Add extra filtering options to floating ip listsongminglong2016-12-091-0/+54
| | | | | | | | | | The patch adds filtering '--long', 'status', '--project', '--project-domain' and '--router' options to floating ip list command. Closes-Bug: #1614379 Partially-Implements: blueprint network-commands-options Change-Id: I2a02cf23845ff435927d8b481f77249915bd94dc
* Add '--project' and '--project-domain' options to os cmdsNam Nguyen Hoai2016-12-011-0/+16
| | | | | | | | | | | | | 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
* Merge "Add '--network' and other options to floating ip list"Jenkins2016-11-181-0/+36
|\
| * Add '--network' and other options to floating ip listsongminglong2016-11-131-0/+36
| | | | | | | | | | | | | | | | The patch adds filtering '--network', '--port', '--fixed-ip-address' options to floating ip list command Partial-Bug: #1614379 Change-Id: I82319d0985d9e864431097c90264a20bf88167cc
* | translate all command help strings3.4.0Steve Martinelli2016-11-171-8/+8
|/ | | | | | | | | | | | | | 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
* Merge "SDK refactor: Prepare floating ip commands"Jenkins2016-11-081-4/+12
|\
| * SDK refactor: Prepare floating ip commandsSindhu Devale2016-11-031-4/+12
| | | | | | | | | | | | | | Prepare the OSC "floating ip" commands for the SDK refactor. Change-Id: I02052185b3ce0b053acdcf76a0f68d49e6f7e608 Partially-Implements: blueprint network-command-sdk-support
* | Add necessary info to Floating IP listReedip2016-10-161-0/+4
|/ | | | | | | | | This patch adds the Network ID and Project ID for the listed floating IPs when Neutron is enabled for OpenstackClient. Change-Id: I823090f2e6d30acd72247d30956f48f4d7672a50 Closes-Bug:#1566090
* Add --description to Neutron commandsAnkur Gupta2016-09-231-0/+8
| | | | | | | | | | | | 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
* Transfer "ip floating CRUD" to "floating ip CRUD"Tang Chen2016-07-201-5/+104
| | | | | | | | | | | | This patch does the following things to transfer "ip floating xxx" to "floating ip xxx": * Add new command "floating ip create/delete/list/show", and doc. * Deprecate "ip floating create/delete/list/show" command. Change-Id: Ib071acaac81988431244e858bddafa7f93403df5 Implements: blueprint rework-ip-commands Closes-bug: 1555990 Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
* Support bulk deletion for commands that exist in both network and compute.Huanxuan Ao2016-06-151-8/+10
| | | | | | | | | | | | | | | Some delete commands in networkv2 are exist in both network and compute, They can use NetworkAndComputeDeleteclass to supprot bulk deletion and error handling and the codes are similar, so I change them all in this patch. The changed commands including: 1.floating ip delete 2.security group delete 3.security group rule delete Also, I update unit tests and docs for these commands in this patch. Change-Id: I6c94c3d10ba579ddd9b14d17673c821e3481fd8a Partially-Implements: blueprint multi-argument-network
* osc-lib: utilsDean Troyer2016-06-131-1/+2
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* State i18() changes and help messages improvedTang Chen2016-04-181-9/+10
| | | | | | | | Add _() to wrap help message in network commands. And also some improvement for help message. Change-Id: Ib3e498f5976ba98c44fd4eec2d1623263b3db53e Partial-bug: 1570924
* [Floating IP] Neutron support for "ip floating create" commandTang Chen2016-03-241-0/+83
| | | | | | | | | | | | This patch adds --subnet, --port, --floating-ip-address and --fixed-ip-address options only. Project related options will be added in another patch because it relates to identity v2 and v3, which will make the unit tests too complicated in one single patch. Change-Id: I3cce4404a114ff128b74e4596f0e847be2846b17 Partial-Bug: 1519502 Related-to: blueprint neutron-client
* Fix dict.keys() compatibility for python 3Tang Chen2016-03-121-1/+1
| | | | | | | | | | In Python 2, dict.keys() will return a list. But in Python 3, it will return an iterator. So we need to fix all the places that assuming dict.keys() is a list. Change-Id: I8d1cc536377b3e5c644cfaa0892e40d0bd7c11b1 Closes-Bug: #1556350
* Floating IP: Neutron support for "ip floating show" commandTang Chen2016-02-241-0/+35
| | | | | | Change-Id: I30350076621c83c758927444e5f8bcc2b7d0fc74 Partial-Bug: 1519502 Related-to: blueprint neutron-client
* Floating IP: Fix "ip floating list" in neutron networkTang Chen2016-02-191-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of "ip floating list" in the commit below is incorrect: Change-Id: I253f66f6bc64470e1a18ffea506048eb53f67d5c This is because the FloatingIP objects returned from Nova and Neutron network are different. They need different handling. This patch fixes this problem. The output for Neutron network would be: +--------------------------------------+---------------------+------------------+------+ | ID | Floating IP Address | Fixed IP Address | Port | +--------------------------------------+---------------------+------------------+------+ | 1976df86-e66a-4f96-81bd-c6ffee6407f1 | 172.24.4.3 | None | None | +--------------------------------------+---------------------+------------------+------+ The output for Neutron network would be: +----+---------------------+------------------+-----------+--------+ | ID | Floating IP Address | Fixed IP Address | Server ID | Pool | +----+---------------------+------------------+-----------+--------+ | 1 | 172.24.4.1 | None | None | public | +----+---------------------+------------------+-----------+--------+ Change-Id: I1295e922df695414511d9a07ca4a8e2428040064 Partial-Bug: 1519502 Related-to: blueprint neutron-client