summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge "Trivial: Fix incorrect comments in compute fakes.py"Jenkins2016-03-081-3/+3
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Trivial: Fix incorrect comments in compute fakes.pyTang Chen2016-03-081-3/+3
| | |_|/ | |/| | | | | | | | | | Change-Id: I18b1720af13b444527dda1ecab52e3cc8d8d9376
* | | | [Identity] Check return value is None in identity v3 unit testsTang Chen2016-03-089-30/+64
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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: I02af06b3d476aac2d93a23ef2111cdc7fa0892ec Partial-Bug: #1550636
* | | Merge "Add port list command"Jenkins2016-03-081-0/+41
|\ \ \
| * | | 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 "Test take_action() instead of run() in unit tests"Jenkins2016-03-0711-101/+107
|\ \ \ | |/ / |/| |
| * | Test take_action() instead of run() in unit testsTang Chen2016-03-0511-101/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the unit tests test run(), but not take_action(). For example, in openstackclient/tests/volume/v1/test_volume.py, there is: def test_volume_set_size_smaller(self): ...... result = self.cmd.run(parsed_args) self.assertEqual(0, result) ...... run() is defined in class Command in cliff. We don't need to test it in OSC unit tests. On the contrary, we should test take_action(), which is overwritten in each command classes in OSC. Change-Id: If07e89953d40ac530f08cbb1ec05f5805171364b Closes-bug: #1553468
* | | 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 "[compute] Support restore server"Jenkins2016-03-041-0/+20
|\ \
| * | [compute] Support restore serverjichenjc2016-02-231-0/+20
| | | | | | | | | | | | | | | | | | Server in soft-delete state can be restored, add this command. Change-Id: Id9d7246f89ae65273505f36dcb664996534ae986
* | | 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
* | | | Merge "[compute] Add unit test for keypair"Jenkins2016-03-042-0/+315
|\ \ \ \
| * | | | [compute] Add unit test for keypairjichenjc2016-02-232-0/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keypair do not have unit test, this patch adds it. Change-Id: Id702ccaad239b916340bb17014d1ede0a28aaec9
* | | | | Merge "[Volume] Check return value is None in volume unit tests"Jenkins2016-03-047-46/+84
|\ \ \ \ \
| * | | | | [Volume] Check return value is None in volume unit testsTang Chen2016-03-037-46/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Idd961a5fa3db825353700837a559621d17f782c5 Partial-Bug: #1550636
* | | | | | Merge "Add test cases to test some commands with '--wait' and fix bug"Jenkins2016-03-041-0/+188
|\ \ \ \ \ \
| * | | | | | Add test cases to test some commands with '--wait' and fix bugting.wang2016-03-021-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "server image create" "server rebuild" "server resize" Above 3 commands are not covered by unit test. So add some unit tests. Meanwhile, fix bug. Now that image name is an optional argument, we'd better record error messages with positional arguments instead of optional argument. So, record server name. Change-Id: I41bc025d4824dc46f63a3213d82e1528bacbbe12
* | | | | | | Merge "Fix incorrect unit test for router"Jenkins2016-03-032-2/+6
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | 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
* | | | | | Merge "Trivial: Reorder unit tests in alphabetical order in volume tests"Jenkins2016-03-032-165/+165
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Trivial: Reorder unit tests in alphabetical order in volume testsTang Chen2016-03-022-165/+165
| | |_|_|/ | |/| | | | | | | | | | | | | Change-Id: I622123f68e2bb53f8767069e4a717fcc34e37b5c
* | | | | Merge "[Image] Check return value is None in image unit tests."Jenkins2016-03-022-34/+46
|\ \ \ \ \
| * | | | | [Image] Check return value is None in image unit tests.Tang Chen2016-03-022-34/+46
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I237ea772f74fa52af2e9aacd35d4b9cfb225c94c Partial-Bug: #1550636
* | | | | 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-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