summaryrefslogtreecommitdiff
path: root/openstackclient/network
Commit message (Collapse)AuthorAgeFilesLines
* Ensure endpoint type is used for network commandsStuart McLaren2017-01-171-1/+7
| | | | | | | | | | | | | | Currently OS_ENDPOINT_TYPE and --os-interface are being ignored for network commands. This means the public URL is always used. Make sure that these are picked up correctly so we hit the correct endpoint (internal/admin/etc.) for commands such as: $ openstack --os-interface internal network list Closes-bug: 1592368 (cherry picked from commit 7c603e4a67c3d44367afbf2f2f6811d2436295e0) Change-Id: Iac05204e3056e386d84d3644b5da1a2bb322bb0a
* Fix SSL/TLS verification for network commandsRichard Theis2017-01-161-1/+2
| | | | | | | | | | | | The network commands ignored the --insecure and --os-cacert options and OS_CACERT environment variable which prevented them from properly completing SSL/TLS verification. This resulted in the network commands failing with "An SSL error occurred." Change-Id: I15167631ef58335e1476c16b828b079e3b0f13c1 Closes-Bug: #1560157 (cherry picked from commit b5f10f43eb9fd1a046a3e80db09d8bc8c350c218)
* Support "network create" command in nova networkTang Chen2016-03-021-21/+46
| | | | | | | | | | | | This patch only provide network name and subnet setting for "network create" command. The other options, such as --project which depends on identity v2 or v3, will make the unit tests too complicated. So I prefer to implement them in other patches. Change-Id: I9ec93f0af813c8fae4170c36e16bbe8f0f53cbb6 Partial-Bug: 1543672
* Merge "TrivialOrder: Rearrange Class Names"Jenkins2016-03-011-18/+18
|\
| * TrivialOrder: Rearrange Class Namesreedip2016-03-011-18/+18
| | | | | | | | | | | | | | | | | | | | | | As per the comment given by Steve Martinelli in https://review.openstack.org/#/c/278209/ , the following patch just rearranges the classes as per the Alphabetical order. TrivialFix Change-Id: Ib8f0f703df4ef7d7ee6180ff8bd8a47062ae5b0f
* | Merge "Refactor security group list to use SDK"Jenkins2016-03-011-0/+50
|\ \ | |/ |/|
| * Refactor security group list to use SDKRichard Theis2016-02-291-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group list' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This refactor also removes the logic for displaying project names instead of project IDs when the --all-projects option is specified. This logic was removed because it is inconsistent with the other network commands. Since neutron will always display security groups across all projects for an admin, the --all-projects option is now hidden when neutron is enabled and the Project column is always displayed. Change-Id: I934a1f5084ef3c5f929d0ffd38ebf5064d799941 Partial-Bug: #1519511 Related-to: blueprint neutron-client
* | Subnet: Add "subnet delete" command using SDKreedip2016-03-011-0/+18
|/ | | | | | | | This patch adds "subnet delete" command to osc using sdk. Change-Id: I6be27406b16909c6db2b95417355be302e218a8d Implements: blueprint neutron-client Closes-bug: #1542362
* Router: Add --route and --clear-routes options to "router set" commandTang Chen2016-02-271-4/+26
| | | | | | | | | | | | | | | | | --route option is used to set routes to the router. It is used like this: --route destination=subnet,gateway=ip-address destination: destination subnet CIDR gateway: nexthop IP address --clear-routes is used to clear all routes on the router. Change-Id: I97ce4871113c684b29c98cdad4dec9cc80ed20f7 Implements: blueprint neutron-client Partial-bug: #1519503
* Merge "Floating IP: Neutron support for "ip floating show" command"Jenkins2016-02-251-0/+35
|\
| * 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
* | Merge "Fixed a bunch of spacing"Jenkins2016-02-251-2/+2
|\ \ | |/ |/|
| * Fixed a bunch of spacingBrandon Palm2016-02-231-2/+2
| | | | | | | | | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* | Merge "Use update_parser_common() in ShowNetwork"Jenkins2016-02-231-2/+1
|\ \
| * | Use update_parser_common() in ShowNetworkTang Chen2016-02-231-2/+1
| |/ | | | | | | | | | | | | ShowNetwork inherits from NetworkAndComputeCommand. So we should use update_parser_common() in it, not overwrite parent's get_parser(). Change-Id: I21bb1407962344b9800fd31caee4b2582674fe24
* | Merge "Add "security group rule show" command"Jenkins2016-02-231-0/+86
|\ \ | |/ |/|
| * Add "security group rule show" commandRichard Theis2016-02-231-0/+86
| | | | | | | | | | | | | | | | | | | | Add the "os security group rule show" command which will use the SDK when neutron is enabled, and use the nova client when nova network is enabled. Change-Id: I41efaa4468ec15e4e86d74144cc72edc25a29024 Partial-Bug: #1519512 Implements: blueprint neutron-client
* | Add "os subnet show" command using SDKBrad Behle2016-02-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | Implement the openstack client subnet show command using SDK calls. This shows the details of a specific subnet. Co-Authored-By: Terry Howe <terrylhowe@gmail.com> Partially implements: blueprint neutron-client Closes-Bug: #1542359 Change-Id: Iaf18b9e44af35ca0cd61033b468e0c60cd3b05d6
* | Trivial: Rename subnet_pool.rst to subnet-pool.rstTang Chen2016-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | File names under doc/source/command-objects/ are words connected with "-". So rename subnet_pool.rst to subnet-pool.rst to keep the consistence. Also use "display" instead of "show" in the comment to keep the consistence. Change-Id: If486f6cec34b4572a8245af865267b063c1e877d
* | Merge "Subnet Pool: Add "subnet pool show" command"Jenkins2016-02-191-0/+36
|\ \ | |/ |/|
| * Subnet Pool: Add "subnet pool show" commandTang Chen2016-02-191-0/+36
| | | | | | | | | | | | Change-Id: I8dda7bbf1e27b0ac773f62a5cd293387da96f8df Closes-Bug: 1544590 Implements: blueprint neutron-client
* | Merge "Subnet Pool: Add "subnet pool list" command"Jenkins2016-02-191-0/+51
|\ \ | |/
| * Subnet Pool: Add "subnet pool list" commandTang Chen2016-02-191-0/+51
| | | | | | | | | | | | Change-Id: I7935be2488fb728ced9680d75880870e5d315655 Closes-Bug: 1544589 Implements: 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
* Merge "Subnet Pool: Add "subnet pool delete" command"Jenkins2016-02-181-0/+34
|\
| * Subnet Pool: Add "subnet pool delete" commandTang Chen2016-02-181-0/+34
| | | | | | | | | | | | Change-Id: Ic5ba5effcaea2410421a81da8ffce7c0295179e7 Closes-Bug: 1544587 Partially implements: blueprint neutron-client
* | Merge "Support "network show" command in nova network"Jenkins2016-02-181-3/+11
|\ \
| * | Support "network show" command in nova networkTang Chen2016-02-171-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | "network show" command is not implemented in nova network. This patch implements it. Change-Id: I1fadd890fe36c4e3ac5c9ed389b20c5b2fff8aca partial-Bug: 1543672
* | | Merge "Support "network list" command in nova network"Jenkins2016-02-181-6/+25
|\ \ \ | |/ /
| * | Support "network list" command in nova networkTang Chen2016-02-171-6/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "network list" command is not implemented in nova network. This patch implements it. The Network object in novaclient is quite different from the one in sdk. And the output of "network list" using Nova network is also quite different from using Neutron. It is like this: # openstack network list +--------------------------------------+---------+-------------+ | ID | Name | Subnet | +--------------------------------------+---------+-------------+ | 96a98ec4-31f6-45f6-99e6-9384569b3bb5 | private | 10.0.0.0/24 | +--------------------------------------+---------+-------------+ --long and --external options have not been implemented because the attrs in Network object in novaclient is too much different. This patch also introduces a new FakeNetwork class in compute/v2/fake.py to fake nova network. Change-Id: Id1fdf81fb2fa8b39f2c76b7bae37ac4fecafd0f7 Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e partial-Bug: 1543672
* | Merge "Refactor security group rule delete to use SDK"Jenkins2016-02-182-1/+42
|\ \ | |/ |/|
| * Refactor security group rule delete to use SDKRichard Theis2016-02-102-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group rule delete' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set also introduces new FakeSecurityGroupRule classes for testing network and compute security group rules. And fixes were made to the network FakeSecurityGroup class. Change-Id: I8d0917925aa464e8255defae95a2a2adfb6cfb75 Partial-Bug: #1519512 Related-to: blueprint neutron-client
* | Merge "Rename parameter "identifier" to "network" in network commands"Jenkins2016-02-151-4/+4
|\ \
| * | Rename parameter "identifier" to "network" in network commandsTang Chen2016-02-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In other commands, the name or ID of an object is just the name of the object. For example, name or ID of a server is "server", router is "router". So, do not use "identifier" in network commands. Also, the parameter in doc file network.rst is not "identifier", but "network". Change-Id: I1ec3beefbb878a207bca280b994ca176ef04ee2d
* | | Support "network delete" command in nova networkTang Chen2016-02-141-5/+12
|/ / | | | | | | | | | | | | | | | | "network delete" command is not implemented in nova network. This patch implements it. Change-Id: I5dac1eed6eb8e67298bb446418835a6ab85c859c Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e partial-Bug: 1543672
* | Floating IP: Neutron support for "ip floating list" commandTang Chen2016-02-141-0/+26
| | | | | | | | | | | | Change-Id: I253f66f6bc64470e1a18ffea506048eb53f67d5c partial-Bug: 1519502 Related-to: blueprint neutron-client
* | Floating IP: Neutron support for "ip floating delete" commandJude Job2016-02-141-0/+40
| | | | | | | | | | | | | | | | | | | | This patch implements "ip floating delete" command for both compute and network. Also includes unit tests. Change-Id: Ie61f0faad65ec90f9d9956ae463412be8d963d05 partial-Bug: 1519502 Related-to: blueprint neutron-client Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
* | Add NetworkAndCompute Lister and ShowOne classesRichard Theis2016-02-121-0/+102
|/ | | | | | | | | | | | | This patch set introduces the NetworkAndComputeLister and NetworkAndComputeShowOne classes which are related to the NetworkAndComputeCommand class. These classes are for commands that must support neutron and nova network. The new classes allows both the parser and actions to be unique. Change-Id: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e Partial-Bug: #1519511 Partial-Bug: #1519512 Related-to: blueprint neutron-client
* Merge "Minor typo in help text"Jenkins2016-02-041-1/+1
|\
| * Minor typo in help textJas2016-02-031-1/+1
| | | | | | | | | | | | fix misspelled 'project' in router-create help text Change-Id: I4874563c0dd7ca35ef153cf24b99e357c0c076b9
* | Merge "Refactor security group delete to use SDK"Jenkins2016-02-032-0/+102
|\ \
| * | Refactor security group delete to use SDKRichard Theis2016-02-022-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group delete' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set introduces a new NetworkAndComputeCommand class to be used for commands that must support neutron and nova network. The new class allows both the parser and actions to be unique. The current DeleteSecurityGroup class is now a subclass of this new class and has moved under the network v2 commands. This patch set also introduces a new FakeSecurityGroup class for testing security groups. And finally, this patch set updates the command documentation for security group and security group rule to indicate that Network v2 is also used. Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537 Partial-Bug: #1519511 Related-to: blueprint neutron-client
* | | Merge "Network: Abstract get_body() out to be a private helper."Jenkins2016-02-031-30/+35
|\ \ \
| * | | Network: Abstract get_body() out to be a private helper.Tang Chen2016-02-021-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_body() is needed in each network files to construct a dict to pass to sdk proxy. And it is also used by several functions in each file. So define it as a file level private helper function. The unified prototype should be: def _get_attrs(client_manager, parsed_args): 1. The name, in sdk, the parameter passed to proxy is named "attrs". And it is a private method. So let's call it _get_attrs(). 2. The parameters, besides parsed_args, when we deal with project and project_domain, we have to make use of identity_client. So let's pass in the client manager. Change-Id: Ib044ebd4ddedbcd805f46334a7fe99e4ebb5b249
* | | | Merge "Add "os port show" command"Jenkins2016-02-031-0/+56
|\ \ \ \
| * | | | Add "os port show" commandRichard Theis2016-02-021-0/+56
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Add "os port show" command. Change-Id: Id87c81640e74c60ae8f247c722c64fdadff022a2 Partial-Bug: #1519909 Partially-Implements: blueprint neutron-client
* | | | Merge "Add availability zone support for router commands"Jenkins2016-02-031-0/+17
|\ \ \ \ | |/ / / |/| | |
| * | | Add availability zone support for router commandsJas2016-01-291-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the adding of availability_zone_hints during router create. Also allows for the display of availability_zones during list and and show commands. Change-Id: Ifbc5c218bc7103d28076d726212ce25321bcf7f1 Partial-bug: #1519503 Partially-implements: blueprint neutron-client
* | | | Consume openstackclient.common.command in subnet/portAkihiro Motoki2016-02-022-4/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | Follow-up patch of https://review.openstack.org/#/c/269613/ network/v2/subnet and port still use cliff classes directly. This patch fixes it. Change-Id: If9d90e5151ece7f4cf1e0d6fd2f32919865f2f2e
* | | log take_action parameters in a single placeAkihiro Motoki2016-02-024-58/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be