summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "TestServerGeneral: Add test for _prep_server_detail()"Jenkins2015-12-221-2/+44
|\
| * TestServerGeneral: Add test for _prep_server_detail()Tang Chen2015-12-201-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | 1. Make TestServerGeneral inherit from TestServer because we need to use servers_mock, image_mock and flavor_mock in compute_client. 2. Create a dict containing all info of a server in the original format, and pass it to _prep_server_detail(). 3. Compare the original and formatted dict. Change-Id: Ie0b83c42a5c3bbba630a064d28374d07e2ce9caf Implements: blueprint osc-unit-test-framework-improvement
* | Merge "TestServerGeneral: Add test for _format_servers_list_networks()"Jenkins2015-12-221-0/+24
|\ \ | |/
| * TestServerGeneral: Add test for _format_servers_list_networks()Tang Chen2015-12-201-0/+24
| | | | | | | | | | | | | | | | The items in a dict are in random order. So if a server is in two networks, there may be two results after formatted. Change-Id: I2e15d202639e3fff427935f46650a405b0e51bcc Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Refactor TestImageCreate with FakeImage class"Jenkins2015-12-192-53/+64
|\ \ | |/ |/|
| * Refactor TestImageCreate with FakeImage classxiexs2015-12-162-53/+64
| | | | | | | | | | Change-Id: I0044df36bb4d761c7998dfc8aa9a86d21d81da83 Implements: blueprint improve-image-unittest-framework
* | Merge "Add image re/deactivate commands"Jenkins2015-12-181-0/+58
|\ \
| * | Add image re/deactivate commandsNiallBunting2015-12-161-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows admins to deactivate and reactivate their images. Currently this has to be done with the REST api or the glanceclient. This change introduces `--deactivate` and `--activate` for the `image set` command. This requires glanceclient 1.2.0. Which got bumped here: https://review.openstack.org/#/c/257512/ Change-Id: I476c44a0343cdc92d58ddc93fb06470242de2345 Depends-On: I2c370c6bf6ff664d94d756cc76aaa983fbdb8869 Closes-Bug: 1516661
* | | Merge "TestServerGeneral: Add test for _format_servers_list_power_state()"Jenkins2015-12-171-0/+20
|\ \ \
| * | | TestServerGeneral: Add test for _format_servers_list_power_state()Tang Chen2015-12-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have tests for each helper function, then we can call them in other tests without worrying about error. Change-Id: I1e4273aef201fe9d8936e5c365ebb46068039892 Implements: blueprint osc-unit-test-framework-improvement
* | | | Replace assertEqual(None, *) with assertIsNone in testsSaiKiran2015-12-173-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In python-openstackclient some test cases using asserEqual(None, *) instead of assertIsNone(). assertIsNone method provides clear error message. Change-Id: I3069a6436d11efa513ae94f21ceab46c498d6e25 Closes-Bug: #1527054
* | | | Merge "Router: Add "router show" command using SDK"Jenkins2015-12-161-0/+58
|\ \ \ \
| * | | | Router: Add "router show" command using SDKTang Chen2015-12-171-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "router show" command to osc using sdk. Change-Id: Idb0f7f0376926e97f9f70a52ef21511e7ffa9d92 Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | Merge "Router: Add "router set" command using SDK"Jenkins2015-12-161-0/+90
|\ \ \ \ \ | |/ / / /
| * | | | Router: Add "router set" command using SDKTang Chen2015-12-171-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "router set" command to osc using sdk. NOTE: Setting ha property of a router is not supported for now. Will suppport it in another patch. Change-Id: I9c15249ae61a87291f0728ad1c8f0a98aa8119bf Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | Merge "Network: Improve no option test for "network create"."Jenkins2015-12-161-0/+10
|\ \ \ \ \
| * | | | | Network: Improve no option test for "network create".Tang Chen2015-12-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, test_create_no_options() case actually takes a 'name' arg. Rename it to test_create_default_options, and add a test_create_no_options case taking nothing. Change-Id: I4f9d2e8cbfa843faea641d3cc959f96894c9cd5d
* | | | | | Merge "when fetching object store properties use lower()"Jenkins2015-12-151-1/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | when fetching object store properties use lower()Steve Martinelli2015-12-141-1/+4
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sometimes properties within object store concepts are stored with mixed case depending on the client used to store said properties. when retrieving properties to 'show' the user, always call lower() on the property in question when comparing it to the reserved values of the swift API. Change-Id: I97ffc715788ca3cd021413124b6945a399465c99 Closes-Bug: 1525805
* | | | | Merge "Router: Add "router delete" command using SDK"Jenkins2015-12-151-0/+29
|\ \ \ \ \
| * | | | | Router: Add "router delete" command using SDKTang Chen2015-12-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "router delete" command to osc using sdk. Change-Id: I47d0ca7f7984942ffceaeb1c9ac69efd09145f40 Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | | Merge "Router: Add "router create" command using SDK"Jenkins2015-12-152-1/+66
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Router: Add "router create" command using SDKTang Chen2015-12-152-1/+66
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "router create" command to osc using sdk. NOTE: Test for --project needs support for fake identity client v2 and v3. These tests will be added in other patches. NOTE: external_gateway_info and routes are not supported to be passed to create command now. They will be supported in another tow patches. NOTE: Creating a ha router is not supported for now. Will support it in another patch. Change-Id: I7642295d27c27dd498331ae1da1c293706d8f6af Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | Merge "Add multi deletion testcase for "openstack image delete""Jenkins2015-12-151-0/+16
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Add multi deletion testcase for "openstack image delete"xiexs2015-12-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5442128a290a9ad3b9ff9919431a1ecc0c697dad Implements: blueprint improve-image-unittest-framework
* | | | | Merge "Refactor TestImageDelete with FakeImage"Jenkins2015-12-151-9/+13
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | |
| * | | Refactor TestImageDelete with FakeImagexiexs2015-12-091-9/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: I052a0220ca5d974824fc46ad403234e65e8173aa Implements: blueprint improve-image-unittest-framework
* | | | Merge "Trivial: Improve unclear comments in test_server.py"Jenkins2015-12-141-5/+5
|\ \ \ \
| * | | | Trivial: Improve unclear comments in test_server.pyTang Chen2015-12-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In test_server.py, there are two ImageManagers are faked: 1. the one in compute client 2. the one in image client But the comments are the same. And so is volume. This patch makes the comments more clear. Change-Id: I2c52f48a7b3c005c185a4ac64abbb3e18d5fb3de
* | | | | Merge "Remote security group name not displayed for rule"Jenkins2015-12-141-18/+91
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Remote security group name not displayed for ruleRichard Theis2015-12-141-18/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'security group rule list' command was updated to display the remote security group name for a security group rule. This was done via a new 'Remote Security Group' column. The output of the 'security group rule create' and 'security group show' commands was also updated to include 'remote_security_group' information instead of the raw 'group' information returned from the API layer. Change-Id: I5f9600338c8331966d2c658109a24b502c538106 Closes-Bug: #1520003
* | | | | Merge "Router: Add "router list" command using SDK"Jenkins2015-12-111-0/+105
|\ \ \ \ \
| * | | | | Router: Add "router list" command using SDKTang Chen2015-12-111-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "router list" command. It takes one "--long" option. By default, the command will print router id, name, status, admin state up, distributed, ha and project id. With "--long" option, it will also print routes and external gateway info. Change-Id: I9d21904c41c11ee1fa107f985744878a1dc2f970 Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | | Merge "Router: Add class FakeRouter to test "router xxx" command"Jenkins2015-12-111-0/+81
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Router: Add class FakeRouter to test "router xxx" commandTang Chen2015-12-111-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A unit test class similar to FakeServer, which is able to fake one or more routers. It will be used by the router CRUD patches. Change-Id: I9b87c6c95282902c3a829da51229a35d4265a1e4 Implements: blueprint neutron-client Partial-bug: #1519503
* | | | | Merge "Add source security group support to create rule"Jenkins2015-12-111-14/+40
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add source security group support to create ruleRichard Theis2015-12-071-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'security group rule create' command was updated to support a source security group. Now either a source IP address block or source security group can be specified when creating a rule. The default remains the same. Change-Id: If57de2871810caddeeaee96482eb34146968e173 Closes-Bug: #1522969
* | | | | Merge "Add unit test for TestServerList to test --long option."Jenkins2015-12-101-5/+50
|\ \ \ \ \
| * | | | | Add unit test for TestServerList to test --long option.Tang Chen2015-12-091-5/+50
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In two steps: 1. Setup all necessary attributes of a server in setUp(), including the ones that are not faked in FaseServer by default. 2. Run a similar process with no option test case. The future plan is to move all these attributes to FakeServer. But it will cause some other changes which has nothing to do with this patch. So leave this job to do later. Change-Id: I1134812a0ea146ef737b0f0ffbef8ca23684accd Implements: blueprint osc-unit-test-framework-improvement
* | | | | Trivial: Do not use plural format in command parameter in "network delete"Tang Chen2015-12-111-1/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since "network delete" could delete more than one network, add a (s) to the doc. And also, rename the parameter "networks" to "network". The naming style is not using plural format in parameter. Change-Id: Id434ea905af34457f84ea6bcb18addef5800429a
* | | | Fix poorly named test mocksTerry Howe2015-12-091-6/+6
| | | | | | | | | | | | | | | | Change-Id: I6e2911e88fc458b39d5024a5714ed8af3f519946
* | | | Remove old code after sdk integrationTerry Howe2015-12-093-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | We won't need this anymore. Change-Id: Ib10be1dedb8db81f0cba6e45b8a9b0aade2ab473
* | | | SDK integration extensions and server create networksTerry Howe2015-12-094-75/+25
| |_|/ |/| | | | | | | | | | | | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* | | Merge "Use FakeVolume in server test cases."Jenkins2015-12-092-14/+7
|\ \ \
| * | | Use FakeVolume in server test cases.Tang Chen2015-12-082-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a class FakeVolume to fake one or more volumes. So use it in test_server.py. Change-Id: I735ae7f678a6799e0ae4c7c25c8083d9ebf47b09 Implements: blueprint improve-volume-unittest-framework
* | | | Merge "Use FakeImage in server test cases."Jenkins2015-12-091-24/+16
|\ \ \ \ | |/ / /
| * | | Use FakeImage in server test cases.Tang Chen2015-12-081-24/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a class FakeImage to fake one or more images. So use it in test_server.py. Change-Id: I276e4ade5aecefbe66b9722c1dfbac10b3bd14b6 Implements: blueprint improve-image-unittest-framework
* | | | Remove unuseful test data in test_netwrok.pyTang Chen2015-12-091-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibd4f8bb602acdcc3421205d9dafc8dcafb9645df Implements: blueprint osc-network-unit-test-refactor Related-to: blueprint neutron-client
* | | | Migrate network client to SDK.Tang Chen2015-12-093-72/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous patches have migrate all network commands to the new version using sdk. This patch will remove the temporary method, and implement a new make_client() to create sdk network client. And also, find() in openstackclient/network/common.py must support sdk. The logic of this function will become much easier than before, so this patch also removes two useless test cases of find(). This patch will also remove the patched methods in tests. Change-Id: Ic2f7bca073beb9757172d16f95d9b82c48cbbc12 Implements: blueprint neutron-client Co-Authored-By: Terry Howe <terrylhowe@gmail.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
* | | | Migrate "network show" command to use SDK.Tang Chen2015-12-091-20/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes "network show" command use sdk. Since we have to keep the other commands runnable with the old network client, we use a temporary method to create sdk network client. And as a result, the tests need to patch a method to fake the temporary method, which will be removed at last. There are two same test cases in the unit tests. This patch will remove one. And since the output has changed, we also need to fix function test cases. Change-Id: I4c06b4efad2db430767bbaa882b0876df3ab483a Implements: blueprint neutron-client Co-Authored-By: Terry Howe <terrylhowe@gmail.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>