summaryrefslogtreecommitdiff
path: root/openstackclient/tests/network/v2
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge "[Subnet pool] Add 'subnet pool set' command support"Jenkins2016-03-101-2/+93
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | [Subnet pool] Add 'subnet pool set' command supportTang Chen2016-03-081-2/+93
| |/ | | | | | | | | | | | | | | | | | | This patch supports setting a new name, pool prefix, default prefix length, minimum prefix length, and maximum prefix length for a subnet pool. Change-Id: I65bd71e0f54f2f65acefbc542df67a1b1ec26397 Partial-Bug: #1544591 Related-to: blueprint neutron-client
* | Add 'port set' commandJas2016-03-081-0/+79
|/ | | | | | | | Add CLI support for the 'port set' command Change-Id: I2bea508e11290284aa64b1ab548a0bb61e7290d3 Partial-bug: #1519909 Partially-implements: blueprint neutron-client
* Add port list commandJas2016-03-071-0/+41
| | | | | | | | This patch adds the ability to list all created ports Change-Id: Ie1a48c203cabc96346a4950f21b83493d58a66a5 Partial-bug: #1519909 Partially-implements: blueprint neutron-client
* Merge "Refactor security group set to use SDK"Jenkins2016-03-051-0/+133
|\
| * Refactor security group set to use SDKRichard Theis2016-03-031-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group set' 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 fixes a compute bug which ignores name and description when set to an empty value. Change-Id: I4225179dca4aedf799e1656ec49236bdedc5e9bd Partial-Bug: #1519511 Implements: blueprint neutron-client
* | Merge "Add 'port create' command"Jenkins2016-03-041-50/+148
|\ \
| * | Add 'port create' commandJas2016-03-041-50/+148
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds usage of 'port create' in CLI Change-Id: I888af50784c3b6c7ec30552ade79f05a5e974711 Partial-bug: #1519909 Partially-implements: blueprint neutron-client
* | | Fix incorrect unit test for routerTang Chen2016-03-032-2/+6
|/ / | | | | | | | | | | | | | | | | | | | | Command "router show" will display router's "tenant_id" as "project_id". But in the unit test, it checks "tenant_id", which is incorrect. This patch fix this problem, and add a _get_columns() helper function to simplify the code. Change-Id: I0087ef7dfd0130b6c47222495848c4f2b9804b1b
* | Support "network create" command in nova networkTang Chen2016-03-021-0/+114
|/ | | | | | | | | | | | 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-29/+29
|\
| * TrivialOrder: Rearrange Class Namesreedip2016-03-011-29/+29
| | | | | | | | | | | | | | | | | | | | | | 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-9/+142
|\ \ | |/ |/|
| * Refactor security group list to use SDKRichard Theis2016-02-291-9/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+29
|/ | | | | | | | 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-0/+57
| | | | | | | | | | | | | | | | | --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-252-2/+122
|\
| * Floating IP: Neutron support for "ip floating show" commandTang Chen2016-02-242-2/+122
| | | | | | | | | | | | Change-Id: I30350076621c83c758927444e5f8bcc2b7d0fc74 Partial-Bug: 1519502 Related-to: blueprint neutron-client
* | Merge "Fixed a bunch of spacing"Jenkins2016-02-253-0/+4
|\ \ | |/ |/|
| * Fixed a bunch of spacingBrandon Palm2016-02-233-0/+4
| | | | | | | | | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* | Merge "Add "security group rule show" command"Jenkins2016-02-232-4/+122
|\ \
| * | Add "security group rule show" commandRichard Theis2016-02-232-4/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix wrong return value in TestDeleteFloatingIPNetworkTang Chen2016-02-231-1/+1
| |/ |/| | | | | | | | | delete_ip() should return None, not the fake floating IP. Change-Id: I1476189a09a94c76c90f9a3986e3ae57dc66d796
* | Add "os subnet show" command using SDKBrad Behle2016-02-222-2/+83
| | | | | | | | | | | | | | | | | | | | | | 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
* | Refactor: Set "project_id" for FakeXXX in a consistent styleTang Chen2016-02-201-10/+9
| | | | | | | | | | | | | | | | | | | | | | OpenStack SDK will translate "project_id" into "tenant_id" automatically when referring to "tenant_id" attribute with the name "project_id". So when faking an object returned fron SDK, we need to fake this behavior. The original way is ugly. This patch turns it into a consistent style, and give better comments. Change-Id: I0dfb1f7552fc28eb4e7ebf5c614c9f3bde79ad80
* | Merge "Subnet Pool: Add "subnet pool show" command"Jenkins2016-02-192-1/+90
|\ \ | |/ |/|
| * Subnet Pool: Add "subnet pool show" commandTang Chen2016-02-192-1/+90
| | | | | | | | | | | | Change-Id: I8dda7bbf1e27b0ac773f62a5cd293387da96f8df Closes-Bug: 1544590 Implements: blueprint neutron-client
* | Merge "Use assertIsNone() instead of assertEqual(None, xxx)"Jenkins2016-02-192-4/+4
|\ \
| * | Use assertIsNone() instead of assertEqual(None, xxx)Tang Chen2016-02-192-4/+4
| | | | | | | | | | | | Change-Id: Ibbd7d6d27b2ff20304e3121fbadd5d50c1836d9b
* | | Merge "Subnet Pool: Add "subnet pool list" command"Jenkins2016-02-192-1/+74
|\ \ \ | | |/ | |/|
| * | Subnet Pool: Add "subnet pool list" commandTang Chen2016-02-192-1/+74
| |/ | | | | | | | | | | Change-Id: I7935be2488fb728ced9680d75880870e5d315655 Closes-Bug: 1544589 Implements: blueprint neutron-client
* | Floating IP: Fix "ip floating list" in neutron networkTang Chen2016-02-192-10/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-182-0/+118
|\
| * Subnet Pool: Add "subnet pool delete" commandTang Chen2016-02-182-0/+118
| | | | | | | | | | | | Change-Id: Ic5ba5effcaea2410421a81da8ffce7c0295179e7 Closes-Bug: 1544587 Partially implements: blueprint neutron-client
* | Merge "Support "network show" command in nova network"Jenkins2016-02-181-0/+109
|\ \
| * | Support "network show" command in nova networkTang Chen2016-02-171-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | "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-3/+50
|\ \ \ | |/ /
| * | Support "network list" command in nova networkTang Chen2016-02-171-3/+50
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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-13/+161
|\ \ | |/ |/|
| * Refactor security group rule delete to use SDKRichard Theis2016-02-102-13/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Define FakeFloatingIP class in tests/compute for nova network commandsTang Chen2016-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "ip floating list" command is not available for Neutron now because the implementation is incorrect. The FloatingIP objects returned from Nova and Neutron network are quite different. So they need different FakeFloatingIP class to do the tests. This patch copies class FakeFloatingIP in tests/network to tests/compute for Nova network tests. Will fix the problem in "ip floating list" command and change FakeFloatingIP in tests/network to fit Neutron network tests. Change-Id: Ia29d257868e0f1dc6cd7cfe3819875e5913f76ec Partial-Bug: 1519502 Partially implements: 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
* | | Merge "Use assertRaises() to check if an exception is raised"Jenkins2016-02-152-24/+15
|\ \ \
| * | | Use assertRaises() to check if an exception is raisedTang Chen2016-02-142-24/+15
| |/ / | | | | | | | | | | | | | | | | | | In some test cases, try/except is used to check if an exception has been raised. We should use assertRaises() instead. Change-Id: I15c8e757dcab77fd6f895feb018184e1eb7e617b
* | | Support "network delete" command in nova networkTang Chen2016-02-141-0/+47
|/ / | | | | | | | | | | | | | | | | "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-142-1/+80
| | | | | | | | | | | | Change-Id: I253f66f6bc64470e1a18ffea506048eb53f67d5c partial-Bug: 1519502 Related-to: blueprint neutron-client
* | Floating IP: Neutron support for "ip floating delete" commandJude Job2016-02-142-1/+181
| | | | | | | | | | | | | | | | | | | | 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>
* | Trivial: Fix a typo in test_network.pyTang Chen2016-02-111-1/+1
| | | | | | | | Change-Id: I5fe4865473ea885b54d02b5d174a632221f815c8
* | Fix DisplayCommandBase comments for cliff Lister subclass testsTang Chen2016-02-092-5/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data. So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 2 in all but identity tests. There are too many such comments in identity tests. So fix them all in another patch. Change-Id: I00f38d12f55abe20fa708f6349073da658622f8d Partial-bug: #1477199