summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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-013-71/+206
|\ \ | |/ |/|
| * Refactor security group list to use SDKRichard Theis2016-02-293-71/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Subnet: Add "subnet delete" command using SDK"Jenkins2016-03-011-0/+29
|\ \
| * | 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
* | Merge "Trivial: Reorder unit tests in test_type.py"Jenkins2016-03-011-55/+58
|\ \ | |/ |/|
| * Trivial: Reorder unit tests in test_type.pyTang Chen2016-02-291-55/+58
| | | | | | | | | | | | Unit test classes should be in alphabetical order. Change-Id: Ie741e1c170d8cc361d95d036115d0952e5108088
* | Merge "Make SetFlavor and UnsetFlavor inherit from cliff.Command"Jenkins2016-02-291-10/+4
|\ \
| * | Make SetFlavor and UnsetFlavor inherit from cliff.CommandTang Chen2016-02-271-10/+4
| | | | | | | | | | | | | | | | | | set/unset comamnd classes should inherit from cliff.Command class. Change-Id: I54e5608ac0768d7d94b7f7d516ea1948daefdc1b Partial-Bug: 1546065
* | | Merge "[Compute] Check return value is None in compute unit tests."Jenkins2016-02-293-45/+33
|\ \ \
| * | | [Compute] Check return value is None in compute unit tests.Tang Chen2016-02-273-45/+33
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | take_action() in commands inheriting from Command returns nothing. So we should assert the return is None in the unit tests of these commands. Change-Id: I953480ecff3b5beb12255d866d0e1df45f130efd Partial-Bug: #1550636
* | | 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
* | | Add MultiKeyValueAction to custom parser actionTang Chen2016-02-271-0/+129
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Class MultiKeyValueAction will be used to parse arguments like this: --route destination=xxx,gateway=xxx --route destination=yyy,gateway=yyy The result is a list like this: [{destination:xxx, gateway:xxx}, {destination:yyy, gateway:yyy}] This action also contain validation of the parameters. Change-Id: Ie3aa8635c6a13fc2e429fe6922acd681dc7244cf
* | Merge "Add shell --profile option to trigger osprofiler from CLI"Jenkins2016-02-261-0/+1
|\ \ | |/ |/|
| * Add shell --profile option to trigger osprofiler from CLIDina Belova2016-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow to trigger profiling of various services that allow it currently and which APIs support is added to openstackclient. Cinder and Glance have osprofiler support already, Nova and Keystone are in progress. To use this functionality osprofiler (and its storage backend) needs to be installed in the environment. If so, you will be able to trigger profiling via the following command, for example: $ openstack --profile SECRET_KEY user list At the end of output there will be message with <trace_id>, and to plot nice HTML graphs the following command should be used: $ osprofiler trace show <trace_id> --html --out result.html Related Keystone change: https://review.openstack.org/#/c/103368/ Related Nova change: https://review.openstack.org/#/c/254703/ The similar change to the keystoneclient (https://review.openstack.org/#/c/255308/) was abandoned as new CLI extenstions are not more accepted to python-keystoneclient. Change-Id: I3d6ac613e5da70619d0a4781e5d066fde073b407
* | Merge "Floating IP: Neutron support for "ip floating show" command"Jenkins2016-02-253-2/+123
|\ \
| * | Floating IP: Neutron support for "ip floating show" commandTang Chen2016-02-243-2/+123
| | | | | | | | | | | | | | | | | | Change-Id: I30350076621c83c758927444e5f8bcc2b7d0fc74 Partial-Bug: 1519502 Related-to: blueprint neutron-client
* | | Merge "Fixed a bunch of spacing"Jenkins2016-02-2536-62/+164
|\ \ \
| * | | Fixed a bunch of spacingBrandon Palm2016-02-2336-62/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* | | | Add some test cases for "server list" commandting.wang2016-02-242-27/+78
| |/ / |/| | | | | | | | | | | | | | | | | | | | Add some test cases that test 'server list' command when specifying flavor or image. Because I add some attribution to fake.py, I have to change some code in create server test. Despite all this, I think it's good for testing. Change-Id: I714deac1f6f940b790a3c20af5f7ffa724ac44d1
* | | 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
* | | Merge "Use instanceof instead of type"Jenkins2016-02-231-2/+2
|\ \ \
| * | | Use instanceof instead of typeBrandon Palm2016-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjusted conditional statements to use instanceof when comparing variables. Instanceof supports inheritance type checking better than type. Change-Id: I4ee0004934dc2322d43ef07e797a6811e39a812c Closes-Bug: 1548530
* | | | Merge "Add functional tests for "volume" commands v2"Jenkins2016-02-231-2/+26
|\ \ \ \
| * | | | Add functional tests for "volume" commands v2Tang Chen2016-02-211-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests for v2 "volume" commands are quite similar to v1. This patch also map 'metadata' to 'properties', 'volume_type' to 'type' to align to the v1 output. Change-Id: Icf2c5463b186fc78c890ccd96453090c4a2c2eb6 Partial-bug: #1519503
* | | | | Merge "Add unit tests for 'hypervisor stats' command"Jenkins2016-02-232-0/+140
|\ \ \ \ \
| * | | | | Add unit tests for 'hypervisor stats' commandting.wang2016-02-222-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'hypervisor stats show' command isn't covered by unit tests, so add unit tests to test it. Change-Id: Ic355230cbdd596e848191b599803dca7f27c2ffb
* | | | | | Merge "Add "os subnet show" command using SDK"Jenkins2016-02-232-2/+83
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | 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
* | | | | Initialize _keys in __init__() in FakeFlavorResourceTang Chen2016-02-231-2/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _keys is defined as a class attribute in FakeFlavorResource. So when we call set_keys() to update it, it changes. And this change may bring trouble to the other tests afterward. So define and initialize it in __init__() as an object attribute. Change-Id: Ib18c03877b67e1b7c2e107f598076b928a58e4fb Closes-bug: #1548378
* | | | Merge "Add unit test for "flavor show" command"Jenkins2016-02-222-10/+89
|\ \ \ \
| * | | | Add unit test for "flavor show" commandTang Chen2016-02-202-10/+89
| |/ / / | | | | | | | | | | | | Change-Id: I1591649e5b97a885707042fcccad3335ee8c7aec
* | | | Merge "Refactor: Set "project_id" for FakeXXX in a consistent style"Jenkins2016-02-211-10/+9
|\ \ \ \
| * | | | 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
* | | | Support unscoped token requestguang-yee2016-02-195-0/+80
|/ / / | | | | | | | | | | | | | | | | | | | | | Make scope check optional for the "token issue" command as unscoped token is a valid Keystone V2/V3 API. Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930 Closes-Bug: #1543214
* | | 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 "Don't use Mock.called_once_with that does not exist"Jenkins2016-02-191-1/+1
|\ \ \ \ | |_|/ / |/| | |
| * | | Don't use Mock.called_once_with that does not existTang Chen2016-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Class mock.Mock does not exist method "called_once_with()", it just exists method "assert_called_once_with()". "called_once_with()" does nothing because it's a mock object. In OSC, only one place is still using "called_once_with()". Fix it. Change-Id: Ib890e95d775c3fc43df80fa05c82d726e78cdac8 Partial Bug: 1544522
* | | | Merge "Use assertIsNone() instead of assertEqual(None, xxx)"Jenkins2016-02-193-7/+7
|\ \ \ \
| * | | | Use assertIsNone() instead of assertEqual(None, xxx)Tang Chen2016-02-193-7/+7
| |/ / / | | | | | | | | | | | | 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-182-2/+140
|\ \ \