summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Make --image parameter optional in "server rebuild"David Moreau Simard2015-12-111-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command will now default to the image currently in-use by the server, effectively making the --image parameter optional. This commit also adds basic tests for ServerRebuild since there wasn't any. Will add more full tests for it. Change-Id: I733fd3ad5a825f06563c72aa430122e1a0e3b3b0 Closes-bug: #1524406 Co-Authored-By: David Moreau Simard <dms@redhat.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
* | | | | Merge "Changed the abstract columns and datalists from test cases of common ↵Jenkins2016-01-1419-814/+562
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | and Identity"
| * | | | Changed the abstract columns and datalists from test cases of common and ↵SaiKiran2016-01-1219-816/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Identity columns and datalist has been set in each test case in compute, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I45a3582088161f12e60e7c933da8e7dcc0ae8e7b Closes-Bug: #1532384
* | | | | Merge "Refactor network endpoint enablement checking"Jenkins2016-01-142-1/+46
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Refactor network endpoint enablement checkingRichard Theis2016-01-042-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the network endpoint enablement checking from the 'server create' command to the common client manager. This allows future network commands to use either nova or neutron networking based on the cloud environment. This patch set also includes related unit test enhancements to the common client manager to trigger authentication on the tests. Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b Related-Bug: #1519511 Related-to: blueprint neutron-client
* | | | | Support non-interactive user password updateGuang Yee2016-01-111-0/+19
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently user password update require interactive prompting of user's original password. This is problematic because we can't support non-interactive applications and therefore hinders automation. This patch make it possible by optionally accepting an '--original-password' argument. If specified, we would use it instead of prompting. DocImpact Change-Id: I2d994e8c2be949f7ae616ac1d1594fb94e1a27cd Closes-Bug: 1531360
* | | | Merge "Use assertTrue/False instead of assertEqual(T/F)"Jenkins2016-01-071-3/+3
|\ \ \ \
| * | | | Use assertTrue/False instead of assertEqual(T/F)Swapnil Kulkarni (coolsvap)2016-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usage of assertEqual(True/False, ***) should be changed to a meaningful format of assertTrue/False(***). Change-Id: I3437634329fc8ecef25082b43b5fc0e1030cdbda Closes-Bug:#1512207
* | | | | Replace assertEqual(*, None) with assertIsNone in testsEinst Crazy2016-01-071-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Replace assertEqual(*, None) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: I8964a10ae3529e978bfab1d8140f95da4b56615c
* | | | Merge "Add support to list all security group rules"Jenkins2016-01-041-4/+82
|\ \ \ \
| * | | | Add support to list all security group rulesRichard Theis2015-12-171-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both nova and neutron allow security group rules to be listed without specifying the owning security group. This patch set makes the group argument on 'os security group rule list' optional. Behavior is unchanged when the argument is specified. When the argument is not specified then all accessible security group rules will be listed. The listing will include the owning security group for each rule. Change-Id: I6914baecf70a65354e1e82dad92c6afbd32b4973 Related-Bug: #1519512
* | | | | Merge "Implementation for project unset cmd for python-openstackclient."Jenkins2016-01-041-1/+47
|\ \ \ \ \
| * | | | | Implementation for project unset cmd for python-openstackclient.Jude Job2016-01-041-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a unit test class TestProjectUnset for testing unset cmd. Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Ib4a414d2313e3d37e48d1cb3639f064231aec508 Closes-Bug: #1486597
* | | | | | Merge "Enabling domain lookup for project set v3 command"Jenkins2016-01-041-5/+0
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Enabling domain lookup for project set v3 commandJude Job2015-12-311-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the domain option for `project set` attempts to set a new domain that owns the project. This is actually an action that is denied by keystone server. Instead, the domain option should be used as a lookup, to find projects that exist in the non-default domain. Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Closes-Bug: #1524456 Change-Id: I30a3812184fe262667e09baa106d2275c2cbb981
* | | | | | Merge "Map some of the SDK field names"Jenkins2016-01-012-8/+11
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Map some of the SDK field namesTerry Howe2015-12-102-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keys() method returns the keys returned from Neutron, but the SDK maps some things like tenant_id to project_id. This makes the output a little prettier. Change-Id: Ibd8c890b61ffc94021f93fc1051fcf5dabd1e9ea
* | | | | | Merge "Improve output for "os security group show""Jenkins2015-12-281-0/+7
|\ \ \ \ \ \
| * | | | | | Improve output for "os security group show"Richard Theis2015-12-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the security group rules output when running the "os security group show" command. Each security group rule is now displayed on a separate line. Current output example: $ openstack security group show default +-------------+------------------------- ... ---+ | Field | Value ... | +-------------+------------------------- ... ---+ | description | Default security group ... | | id | 048a5fc3-3be1-407d-ae47-9... | | name | default ... | | project_id | 3b96bb2020c1459da76963f9e... | | rules | [u"id='5d812367-9829-4340...t"] | +-------------+------------------------- ... ---+ New output example: +-------------+------------------------- ... ---+ | Field | Value ... | +-------------+------------------------- ... ---+ | description | Default security group ... | | id | 048a5fc3-3be1-407d-ae47-9... | | name | default ... | | project_id | 3b96bb2020c1459da76963f9e... | | rules | id='5d812367-9829-4340-95...lt' | | | id='ee451d1c-ade3-4975-8e...lt' | +-------------+------------------------- ... ---+ Change-Id: I1386075310896c58a2b776e2bbec3603bd00eff1 Partial-Bug: #1519511 Related-To: blueprint neutron-client
* | | | | | | Refactor: Initialize parser in setUp() in TestNonNegativeActionTang Chen2015-12-281-26/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I12846acc4450d31d19897bbdfc6846bde8c8f2ce
* | | | | | | Refactor: Initialize parser in setUp() in TestKeyValueActionTang Chen2015-12-281-52/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to initialize parser in each test case. Do it in setUp(). Also remove the test_default_values case because it could be tested in the test_good_values case. Change-Id: Ia2ed7c9e46bf6baabbd62b9d50511c5e8103e5e2
* | | | | | | Replace assertEqual(None, *) with assertIsNone(*)Xi Yang2015-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is going to replace assertEqual(None, *) with assertIsNone(*) in unit test code to have more clear messages in case of failure. Change-Id: I6f85498347e8fc7cad5ea7afb832b9acda7daafc
* | | | | | | Add all regions to cloud configurationRichard Theis2015-12-231-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OCC now requires all regions to be listed in the cloud configuration. Update the shell unit tests to list all of the regions being tested. Change-Id: Ic7300d1f708339701b5daadbf2c4769b239a2adb Closes-Bug: #1528926
* | | | | | Merge "Add owner validation for "openstack image create/set""Jenkins2015-12-221-4/+86
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Add owner validation for "openstack image create/set"xiexs2015-12-211-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Owner validation is necessary if a new image owner will be created/set. Change-Id: I621774e02866bfa98a31b613deff5d7b6a962737 Closes-Bug: #1517134
* | | | | | 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