summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/compute
Commit message (Collapse)AuthorAgeFilesLines
* Default --nic to 'auto' if creating a server with >= 2.37Matt Riedemann2018-10-251-4/+6
| | | | | | | | | | | | | | | | Compute API version >= 2.37 requires a 'networks' value in the server create request. The novaclient CLI defaults this to 'auto' if not specified, but the novaclient ServerManager.create python API binding code does not, as it wants clients to be explicit. For the purposes of the OSC CLI, we should follow suit and if the user is requesting OS_COMPUTE_API_VERSION>=2.37 without specific nics, we should just default to 'auto'. Change-Id: Ib760c55e31209223338a4086ff1f4fee88dc6959 Closes-Bug: #1750395 (cherry picked from commit 1008544882fbdae16b045abca05cf3e2e8a14787) (cherry picked from commit 4944d4eaa9aaeffdee358680550ac7d7f0c6e8d8)
* Add missing parameters on openstack server rescueJose Castro Leon2017-10-271-1/+12
| | | | | Change-Id: I27afca9e826378dbcb7feb7528e0c65c528b04b0 Closes-Bug: #1703278
* Attempt to work around chronically failing server issues with aggregates and qosDean Troyer2017-09-151-2/+10
| | | | | | | | So yeah, this is not kosher for functional tests, but we're testing the client interaction, not the raciness of Nova or Neutron. Failure to delete is not our problem. Change-Id: I21043f1de0fbacee1aec63110fb12a7cff42e0a0
* flake8-import-order: Ensure to place project imports lastAkihiro Motoki2017-08-221-2/+2
| | | | | | | | To ensure project imports are placed after third party import, we need to specify application-import-names. Previously flake8-import-check checked only standard imports or not. Change-Id: Iad7afa456cec7cf5b44955f1ea03c593a4c0e426
* Clean up the changes of os.environ in functional testsRui Chen2017-07-202-2/+7
| | | | | | | | | | | | Use fixtures to restore the API version changes of os.environ in each functional tests, aims to avoid the following test cases failing in unexpected context. And make sure setUpClass/tearDownClass call super class's corresponding methods first. Change-Id: Ie248fe9d3a9e25f1b076c9f2c363200f29a83817 Closes-Bug: #1696080
* volume functest: ensure snapshots deleted when volume deleteAkihiro Motoki2017-06-062-17/+15
| | | | | | | | | | | | | Deleting snapshot may take time. The current volume API does not allow to delete volumes with snapshots, so if deleting snapshot may take time, a delete request for a parent volume will fail. This sometimes causes functional test failures in slow environments. wait_for_status() checks whether volume status is in error statuses but previously the expected error status was wrong. Cinder API uses lower case as volume status, so it did not work expectedly. Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb
* Merge "Create server with security group ID and name"Jenkins2017-05-221-0/+46
|\
| * Create server with security group ID and nameRui Chen2017-05-221-0/+46
| | | | | | | | | | | | | | | | | | | | | | Both resource ID and name are supported to identify an object in openstackclient to make user easy to input, for security group, nova only support security group name in API when launch a new server, this patch convert ID to name, then pass name to nova API, and check the security group exist before creating server. Change-Id: I1ed4a967fb9de3f91c8945a1ef63f6c7b6b2dfb2 Closes-Bug: #1687814
* | Make block-device-mapping more stable and clearRui Chen2017-05-171-0/+107
|/ | | | | | | | | | | | | | | | | | | | | | The patch fix the following issues: 1. ValueError is raised if input don't contain "=". Sometimes the whole "server create" command is very complex, it's difficult to find out root reason directly. 2. Don't support to add block device from snapshot, like: --block-device-mapping vdb=0c8ae9d8-cadc-4a23-8337-4254614d277e:snapshot:1, it's supported by novaclient, but not in osc. 3. If input "vdb=", not add any mapping information, the server will be launched successfully, not raise error message to let use add volume/snapshot id, just ignore "--block-device-mapping" option. 4. The help message of "block-device-mapping" option is so simple, need to add some details about how to add <type>, <delete_on_terminate> contains. Change-Id: Ib7f7a654c3dc2a8272545f168b4c4ced230ce39e Depends-On: Ib37913891bbf7a31b570404c4668c490d5ac859b Closes-Bug: #1667266
* Skip floating ip attach functional test on nova-netDean Troyer2017-05-031-9/+9
| | | | | | | | | As of Ocata release Nova forces nova-network to run in a cells v1 configuration. Floating IP and network functions currently do not work in the gate jobs so we have to skip this. It is known to work tested against a Mitaka nova-net DevStack without cells. Change-Id: I74f67ac8eb12c7a649ddcbd7979cf745fb35cc0c
* Nova-net functional tests: aggregatesDean Troyer2017-05-021-21/+44
| | | | | | | | | | | | | Nova-net requires a cells v1 configuration to run as of Ocata, but aggregates and cells v1 are not golfing buddies, so don't let them meet on the back nine. Skip the aggregate add/remove host commands in the cells v1 config, leave the others because they should work, just not be very useful. And format things consistently. Change-Id: I131d9f883cb7aca53ad82fb7d5fc6ee1c1e7d923
* Nova net functional tests round 3Dean Troyer2017-04-281-0/+14
| | | | | | | | | | | | | | | | | | | | * network segment * network service * port * router * security group * security group rule * subnet * subnet pool * extension The extension tests were duplicated to have both compute and network extensions tests so the nova-net case will still exercise the extension commands. Also clean up formatting from previous reviews to make the Network functional tests look and act consistently. Change-Id: I286c40572faa31ddcef595cec740da933b2defc1
* Fix server create with nova-netDean Troyer2017-04-261-2/+10
| | | | | | A Neutron-ism slipped by in server create. Change-Id: Id590d7f93df2a41d7bd7617459a2af159a6f8071
* Low-level Compute v2 API: security groupDean Troyer2017-04-111-2/+2
| | | | | | | | | | api.compute.APIv2 starts with security group functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Id007535f0598226a8202716232313e37fe6247f9
* Refactor ServerTests and ServerEventTests functional test classesDean Troyer2017-03-103-135/+156
| | | | | | | | Move common bits into a compute.v2.common.ComputeTestCase class so they are available as needed without calling into other test classes. Change-Id: I1afcc04ba705b0bbb85628117e7ca91080cf1895
* Merge "Add "--private-key" option for "keypair create""Jenkins2017-03-081-0/+21
|\
| * Add "--private-key" option for "keypair create"Rui Chen2017-03-061-0/+21
| | | | | | | | | | | | | | | | | | | | Aim to specify the private key file to save when keypair is created. That is a convenient way to save private key in OSC interactive mode, avoid to copy CLI output, then paste it into file. Change-Id: I119d2f2a3323d17ecbe3de4e27f35e1ceef6e0a5 Closes-Bug: #1549410
* | Add server event list and show commandsRui Chen2017-03-071-0/+97
|/ | | | | | | | | | | | OSC server event is similar to nova's instance action commands. Server event is the event record that had been done on a server, include: event type(create, delete, reboot and so on), event result(success, error), start time, finish time and so on. These are important information for server maintains. Change-Id: I8111091f46a0d2755728d8f9d43cc0dfe8842d13 Closes-Bug: #1642030
* Finish converting server functional tests to JSON formatDean Troyer2017-02-181-222/+231
| | | | Change-Id: Ic9563bd86feb1f7afd403e49499205a499f0c142
* Merge "Fix "server create" command failed when --nic auto or none"Jenkins2017-02-181-5/+48
|\
| * Fix "server create" command failed when --nic auto or noneRui Chen2017-02-151-5/+48
| | | | | | | | | | | | | | | | | | | | | | "auto" and "none" options was added into --nic argument of server create command in patch https://review.openstack.org/#/c/412698/ , but that don't work and raise internal error when execute command. The patch fix that issue and add unit and functional tests. Change-Id: Ia718c3bac0a5172a0cdbe9f0d97972a9346c1172 Co-Authored-By: Kevin_Zheng <zhengzhenyu@huawei.com> Closes-Bug: #1663520
* | Fix image selection in server function testsDean Troyer2017-02-171-6/+11
|/ | | | | | | | The image selection has been affected by Cirros image changes in DevStack, make the logic moe robust and convert it to JSON. The conversion for the remainder of the file will follow. Change-Id: I8f3318f55ed79d617c3594142f0c086e2bd1a7b1
* Merge "Functional test for aggregate"Jenkins2017-02-131-67/+142
|\
| * Functional test for aggregatezhiyong.dai2016-11-281-67/+142
| | | | | | | | | | | | | | | | Using json format output in aggregate functional tests. Remove resource create/delete from setupClass() and teardownClass() methods Change-Id: I6494ca63bfe8a51de0f65570fddcaf38f6c42dbb
* | Merge "Functional test for agent"Jenkins2017-02-091-57/+176
|\ \
| * | Functional test for agentzhiyong.dai2016-11-261-57/+176
| |/ | | | | | | | | | | | | | | Using json format output in compute agent functional tests. Remove resource create/delete from setupClass() and teardownClass() methods Change-Id: Ic7c6c268dfccca097709378c0473eb82cddf7bc6
* | Functional test for server groupzhiyong.dai2016-11-241-26/+86
|/ | | | | | | Rework functional tests to remove resource create/delete from setupClass() and teardownClass() methods. Change-Id: Ia852e48d3bcf706eefa56b03ba1f02b3fd7605cd
* Switch server create to block_device_mapping_v2Nikita Gerasimov2017-01-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Current compute_client.servers.create() relies on block_device_mapping arg which is legacy[1]. "block_device_mapping" format require device_name which is leads to hard-coded hack in --volume key handler to KVM specific. "block_device_mapping_v2" format is more friendly to hypervisiors. Support of block_device_mapping_v2 appear in python-novaclient 2.16.0, openstackclient require at least 2.29.0 Makes options --volume and --block-device-mapping work simultaneously. Appends --block-device-mapping data even if --volume used. After bug 1383338 only --volume was taken when both are used. [1]http://docs.openstack.org/developer/nova/block_device_mapping.html NOTE(dtroyer): I moved the new test_boot_from_volume() functional test to Ie51b1c375c5940856ec76a5770df3c6bd18a3eba to test our previous behaviour. The only changes required to support the new behaviour should be that the empty_volume is now attached in that test. Change-Id: I7bac3d870dd9ca404093142f8bce22a62e49180d Closes-Bug: 1647406 Closes-Bug: 1497845
* Add server_boot_from_volume() testDean Troyer2017-01-251-0/+115
| | | | | | | | Plucked this test out of I5529f412578c50090e70d17aa0129217bf803fed in order to validate the current behaviour before applying that change. It was converted to the new JSON-style. Change-Id: Ie51b1c375c5940856ec76a5770df3c6bd18a3eba
* Add server test for image and flavor lookupsDean Troyer2017-01-251-15/+49
| | | | | | | | | | | Review Ia66e44e530799ce6531922dcf6a84e38528c8725 changes OSC's server commands to use the image client rather than compute clirnt (yay!) but we never really tested any of this in functional tests. This review adds a simple functional test (in the new style) to watch the client change; it passes locally for me without the client change, due to timing we went ahead and merged that first. Change-Id: I5529f412578c50090e70d17aa0129217bf803fed
* Update functional test for aggregate.zhiyong.dai2017-01-161-3/+43
| | | | | | | | | | Add the following functional tests : option: "--no-property" command: "aggregate set --zone", "aggregate add host", "aggregate remove host". Change-Id: Ia9c31facb5f0f5b92b8df950fd4021b8ecc924c5
* Functional tests - flavorDean Troyer2017-01-061-27/+200
| | | | | | | | | * Rework functional tests to remove resource create/delete from setupClass() and teardownClass() methods. * Add tests for more command options * Use JSON output Change-Id: Ib99ef954fe8e1170c7445940180d80b8b9c0a92c
* move all functional tests to tests moduleSteve Martinelli2016-09-098-0/+735
functional tests should be grouped with other tests (unit and integration tests). as part of this commit the "common" module was renamed to just "base", this was done for simplicity. the post_test_hook.sh file was also copied to the functional module since it should live there. a separate change to the infra repo will be made to call the new location, once that is merged we can remove the old one (a new change will also be posted for that) Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3 Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede