summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Move FakeServer to tests.common.v2.compute.fakeslin-hua-cheng2015-11-253-80/+87
| | | | | | | FakeServer should not be in tests.fakes since this should be just for generic re-usable classes. Change-Id: I19209952de69626dfa3caadc5d1cc69b7feadeba
* Merge "Remove the old fake server data."Jenkins2015-11-251-9/+0
|\
| * Remove the old fake server data.Tang Chen2015-11-211-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old fake server framework has be replaced with the new class FakeServer, which is stronger in: 1. faking multiple servers with random names and ids 2. faking methods in a server 3. easier to use So remove the old fake server data, and use class FakeServer from now on. Change-Id: Ife8ee37a7ce14d9a3201104bce8075a918a97613 Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Use class FakeServer in TestServerResize."Jenkins2015-11-251-21/+18
|\ \ | |/
| * Use class FakeServer in TestServerResize.Tang Chen2015-11-211-21/+18
| | | | | | | | | | | | | | | | There are the same problems with TestServerCreate in TestServerResize. Use the new class FakeServer to fix them. Change-Id: Ibde3e68a7bc55bbbf8357ba98be2559a6d0d41b6 Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Use class FakeServer in TestServerImageCreate."Jenkins2015-11-251-10/+8
|\ \ | |/
| * Use class FakeServer in TestServerImageCreate.Tang Chen2015-11-211-10/+8
| | | | | | | | | | | | | | | | There are the same problems with TestServerCreate in TestServerImageCreate. Use the new class FakeServer to fix them. Change-Id: Ie723fa95620549f09a81ef72953f46877ef9252a Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Use class FakeServer in TestServerDelete."Jenkins2015-11-251-16/+15
|\ \ | |/
| * Use class FakeServer in TestServerDelete.Tang Chen2015-11-211-16/+15
| | | | | | | | | | | | | | | | There are the same problems with TestServerCreate in TestServerDelete. Use the new class FakeServer to fix them. Change-Id: Icdcc90cc93ed1080187fb0edca885b0db56ab35d Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Use class FakeServer in TestServerCreate."Jenkins2015-11-251-38/+68
|\ \ | |/
| * Use class FakeServer in TestServerCreate.Tang Chen2015-11-211-38/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current TestServerCreate, there are several problems: 1. The fake create() returns a server with no 'networks' field. The new_server is used to fake the created server which is supposed to be returned by create(), but it has a 'networks' field. They have the same name and id, but they are actually not the same server. As a result, when checking the return value from create(), 'networks' is not checked. 2. The fake server is not accessable in the test functions. So each time a test function wants to get the server name or id, it has to use the constants defined in compute_fakes. This is not good. We should make the fake server accessable in all test functions to ensure they actually get the same server. This patch fix them both by using the new class FakeServer to fake a server. Change-Id: I8ffc8e233f8710034329ed33fccb2c734898ec2d Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Unable to set some compute quotas"Jenkins2015-11-252-0/+42
|\ \
| * | Unable to set some compute quotasRichard Theis2015-11-202-0/+42
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenStackClient mapping of 'openstack quota set' arguments isn't correct for compute quota items that have to different names. For example, the --injected-file-size argument is mapped to injected_file_size, but the compute quotas item is actually injected_file_content_bytes. This incorrect mapping prevented the impacted compute quota items from being set. The problem impacts the following 'openstack quota set' arguments: --injected-file-size --injected-path-size --properties --secgroup-rules --secgroups This patch set also expands the compute quota unit tests to verify all compute quota items that can be set. Change-Id: I0a2f241e425f4811e4ae55be183ac0c8b0805c2a Closes-Bug: #1475831
* | Add "openstack server shelve" into OSCxiexs2015-11-241-0/+54
|/ | | | | | | | Currently, the shelve operation is not supported by OSC. So, this patch attempts to add it into OSC. Change-Id: I92545300bef006a069338168d2de800e8a58af69 Implements: blueprint introduce-shelve-into-osc
* Merge "Add unit tests for "server pause" command."Jenkins2015-11-191-0/+57
|\
| * Add unit tests for "server pause" command.Tang Chen2015-11-201-0/+57
| | | | | | | | | | | | | | | | This patch adds unit tests for "server pause" command, including one and multiple servers. Change-Id: If5551e77d7dd4f7f48c6ee4a7f80f8313817f492 Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Introduce random server faking mechanism."Jenkins2015-11-191-0/+70
|\ \ | |/
| * Introduce random server faking mechanism.Tang Chen2015-11-191-0/+70
| | | | | | | | | | | | | | | | | | | | | | This patch introduces a new server faking mechanism to support multiple servers faking. Server names and ids can be generated randomly, and use APIs in class FakeServer to get one or more servers. Change-Id: Ic54f3bf7c77294dc7dfb9acdbf4a721eb5eef6af Implements: blueprint osc-unit-test-framework-improvement
* | Merge "Enable FakeResource to fake methods."Jenkins2015-11-191-1/+26
|\ \ | |/
| * Enable FakeResource to fake methods.Tang Chen2015-11-191-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use MagicMock to fake a method in FakeResource. A new function: add_method(name, return_value) is added to FakeResource. The caller specifies method @name and @return_value, the function will add an attribute with @name, which is a callable MagicMock object whose return value is @return_value. When user access the attribute with a (), @return_value will be returned by MagicMock, which looks like a function call. Change-Id: I12eb876cbebab064773df7b5dd612de69bbf3f01 Implements: blueprint osc-unit-test-framework-improvement
* | Allow error status to be specifiedMark Vanderwiel2015-11-181-0/+40
|/ | | | | | | | For some apis, heat, the error status is "failed". This patch changes the wait_for_status method to allow for the error status to be passed in the same way as the success status. Change-Id: I20db4051d3f5611a4b13fe23ea8798b82a40da81
* Merge "better format remote IDs for identity providers"Jenkins2015-11-152-7/+8
|\
| * better format remote IDs for identity providersSteve Martinelli2015-11-122-7/+8
| | | | | | | | | | | | | | | | | | remote-ids are a list, and we should format these values as such, rather than python representations of lists/arrays. Closes-Bug: 1478995 Change-Id: Ia6ced0fab2435b8cb486822c676c0dee32613abe
* | Merge "Split the vol_id from a dev mapping"Jenkins2015-11-132-0/+83
|\ \
| * | Split the vol_id from a dev mappingxiexs2015-11-112-0/+83
| |/ | | | | | | | | | | | | Add a split into the dev mapping to get the right vol_id. Change-Id: I1a7bf6351491b1321c5ca0fa4a27f29825400eaf Closes-Bug: #1514394
* | Add capability to update description of an IdPlin-hua-cheng2015-11-121-0/+48
| | | | | | | | | | Change-Id: I854067642bbfde6fdf84b22b9cc1de8afc7767c0 Closes-Bug: #1515815
* | Merge "Add project-name/-id validation for the OSC "openstack quota set""Jenkins2015-11-121-6/+20
|\ \
| * | Add project-name/-id validation for the OSC "openstack quota set"xiexs2015-11-041-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | The quota info would be set into DB, even though the project actually does not exist. This patch tried to add a validation to forbid this undesirable behavior. Change-Id: Ia2d8c96527820e25b074e6486d3f39c5ad7eae60 Closes-Bug: #1512638
* | | Merge "Fix the bug of "openstack console log show""Jenkins2015-11-121-0/+55
|\ \ \ | |_|/ |/| |
| * | Fix the bug of "openstack console log show"xiexs2015-11-091-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | The behaviors are inconsistent while different negative line numbers specified. Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b Closes-Bug: #1512263
* | | Merge "Add --owner to `image create`"Jenkins2015-11-121-2/+4
|\ \ \
| * | | Add --owner to `image create`NiallBunting2015-11-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds --owner to `image create`. This is backwards compatable with v1. Change-Id: I9e79cf880c91a1386419db729818d23dfe632179 Depends-On: I8d572a070bbb04dccdd051b8e0ad199c5754746e
* | | | Merge "Fix issue when displaying image_member"Jenkins2015-11-112-3/+9
|\ \ \ \
| * | | | Fix issue when displaying image_memberlin-hua-cheng2015-10-232-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image_member doesn't have a _info attribute, glanceclient returns warlock object instead of a Resource object. Change-Id: If6e7c4bd404454bd6cbe8c111879c1afa1380211 Closes-Bug: #1509054
* | | | | Merge "Add compute service delete"Jenkins2015-11-112-0/+58
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Add compute service deleteAlex Schultz2015-10-162-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds 'compute service delete <service>' to the openstack client. This is the equivalent of 'nova service-delete <id>' Change-Id: I69ef1cac72cbe125c2114f8e958e22350a70f367 Closes-Bug: #1503510
* | | | | Use fake server name instead of id when testing "server_name" param.Tang Chen2015-11-071-11/+11
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "server create" command takes a server name parameter. The server id is generated by openstack. When we intended to pass a server name to the unit tests of "server create" command, we passed server id. It won't be any problem because the fake server id is also a string, but we should pass a fake server name because we have a string to fake one. Change-Id: I9944f0ea2a6c457e4fad8215a54778bca08965ab
* | | | Import the module not the classSean Perry2015-11-041-5/+5
| |_|/ |/| | | | | | | | | | | | | | As requested during review 226922. Change-Id: Ic5222141e247ce33cf5dbee66667cee3040e1cc3
* | | Merge "Mark arguments for 'credential' commands as required"Jenkins2015-11-042-0/+116
|\ \ \
| * | | Mark arguments for 'credential' commands as requiredSean Perry2015-09-302-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the [1], 'user_id', 'type', and 'blob' are all required arguments for 'credential set' but the code treats them as optional. Set the 'required' flag and remove logic supporting missing arguments. [1]: https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3.rst#credentials-v3credentials "spec" Change-Id: I597c9616ad744385fc6dd92379feb03daec54458 Closes-Bug: #1418837
* | | | Merge "Trivial clean up: do not use plural form in command arguments."Jenkins2015-11-021-3/+3
|\ \ \ \
| * | | | Trivial clean up: do not use plural form in command arguments.Tang Chen2015-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a general rule that we don't use plural form for the name of command arguments. But class DeleteServer() is still using "servers". So use "server instead". Change-Id: I2d76de14ec34b88547b9f728b41e9bd93b2a22c5
* | | | | Merge "Rename context.py to logs.py"Jenkins2015-10-301-32/+32
|\ \ \ \ \
| * | | | | Rename context.py to logs.pyTerry Howe2015-10-301-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At one point this file contained the context for logging, but the reason for its existence is now for logging. Implements: blueprint logging-migration Change-Id: I4ba42bbef97b09d31236ac8c01b6fb23827b8bee
* | | | | | Merge "remove url from v3 regions"Jenkins2015-10-292-75/+6
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | remove url from v3 regionsSteve Martinelli2015-10-212-75/+6
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the parameter "url" was removed from Keystone, it was only added for one release as part of an experimental support for adding service providers. BackwardsIncompatibleImpact Closes-Bug: 1506841 Change-Id: I7a62fbf1d9bfa8e6dd8d619e98c32b9860348d2e
* | | | | Merge "Support pagination params for flavor list"Jenkins2015-10-231-5/+15
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Support pagination params for flavor listliyingjun2015-10-211-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing 'marker' and 'limit' params for `openstack flavor list` shell command. It would be nice to have this when there are many flavors. Closes-bug: #1505874 Change-Id: I088ac5d24f0d7595f5cbce14f063e296a449eb26
* | | | | Merge "Move session and fixtures to keystoneauth1"Jenkins2015-10-207-7/+7
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Move session and fixtures to keystoneauth1Steve Martinelli2015-10-147-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in an effort to start consuming keystoneauth1, we can move our sesssion and fixture code over to use keystoneauth1 instead of keystoneclient. Change-Id: Ibcbd588ce2e3d864f87ff1eb6e1c3c071a1e06f6