summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/api
Commit message (Collapse)AuthorAgeFilesLines
* Make container list --all workPete Zaitcev2020-05-161-30/+30
| | | | | | | | | | | | | | | The caller in openstackclient/object/v1/object.py passed a keyword argument full_listing, but the eventual callee container_list() expected all_data. So, --all did not work at all. The issue passed undetected because --all did not have a test, so we added a unit test. In addition, exisiting tests were using a test set that did not look like the real container listing, so we changed LIST_CONTAINER_RESP to be realistic. Change-Id: Id0604bcab25892e43c26cd6656b2b2eef5daa69b
* Add storage policy option to create container commandSimon Merrick2020-02-191-0/+2
| | | | | | | | + Add CLI option to specify swift storage policy + Add CLI flag to specify container uses public read ACLS + Show storage policy in container show data Change-Id: I08ffa0d98bd39d467aa415771675f59bd77768ff
* Raise flake8-import-order version to latestSean McGinnis2020-01-101-1/+1
| | | | | | | | | | | We had this library capped at a release that is a few years old. Now that we have dropped py2 testing, we can pick up the latest version. This uncovered a few things to clean up. Mostly the fact that mock is now a part of the StdLib unittest since Python 3.3. Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Merge "Rename review.openstack.org to review.opendev.org"Zuul2019-06-141-1/+1
|\
| * Rename review.openstack.org to review.opendev.orgmelissaml2019-05-121-1/+1
| | | | | | | | | | | | | | There are many references to review.openstack.org, and while the redirect should work, we can also go ahead and fix them. Change-Id: I82e3797dd4c05e4944f40c950b4fafe9a5334cbf
* | Remove code migrated to osc-lib long agoDean Troyer2019-05-161-115/+0
|/ | | | | | | | | * Remove openstackclient.api.utils and use osc_lib.api.utils * Remove openstackclient.common.clientmanager.ClientManager.auth_ref * Remove openstackclient.common.commandmanager Change-Id: I67e1dbc53cc0b37967c0011bcb2fc09bdef62d94 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Re-implement novaclient bits removed in 10.0Dean Troyer2018-03-131-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) /os-floating-ips was removed in Compute API 2.36 and from novaclient's Python API in 10.0 Add to api.computev2: floating_ip_add() floating_ip_remove() Convert add floating IP command to nova-net/neutron split: "server add floating ip" "server remove floating ip" b) /os-hosts was removed in Compute API 2.43 and from novaclient's Python API in 10.0. Add to api.computev2: host_list() host_set() host_show() Convert host commands to use intenal api: "host list" "host set" "host show" c) The introduction of the Network-style commands into the server group broke cliff's autoprogram directive as it executes the get_parser() methods without fully initializing the Command object. NOTE: This is really three reviews squashed to get through the gate in one pass. Depends-on: Id6de87211d6c4ea8fd14aa9203d8d5b17e9e2f04 Change-Id: I5116086f9a9e4b2b31a744bf8f4558c79f0bfe59
* Correct import of keystoneauth1 sessionGage Hugo2017-09-121-1/+1
| | | | | | | | keystoneclient.session has been long deprecated in favor of keystoneauth1.session. This change corrects the import in the tests to use the correct library's session. Change-Id: Ic24ebde59e4b9eb70d6f14c1e0536f8d24f0de73
* 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
* Fix Nova-net netowrk commandsDean Troyer2017-04-271-15/+15
| | | | | | | | | | | | In cleaning up functional tests for nova-net, I discovered some problems in network create: * --subnet option is required in network create command * Switch API to use /os-networks rather than /os-tenant-networks as this is what we were actually using via novaclient * Fix functional tests for nova-net * Normalize some private function names in network/v2/network.py Change-Id: I426b864406756d58d140575a3a45ee9aee67ce84
* Low-level Compute v2 API: floating ip poolDean Troyer2017-04-181-0/+18
| | | | | | | | | | | | | api.compute.APIv2 floating ip pool function. 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. Also includes a handful of cleanups that the previous security group and floating IP reviews missed. Change-Id: I20116ec4fc1113857d8d917bfb30fa3170d05b9f
* Low-level Compute v2 API: networkDean Troyer2017-04-171-0/+151
| | | | | | | | | | api.compute.APIv2 network 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: If230f128e91cda44461fe93c976cac2aecec2252
* Merge "Low-level Compute v2 API: floating ip"Jenkins2017-04-171-0/+111
|\
| * Low-level Compute v2 API: floating ipDean Troyer2017-04-111-0/+111
| | | | | | | | | | | | | | | | | | | | api.compute.APIv2 floating ip 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: Ic461b8d15e072e0534dcd73fff6857581d83c89b
* | Low-level Compute v2 API: security group rulesDean Troyer2017-04-111-0/+81
|/ | | | | | | | | | api.compute.APIv2 security group rule 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: Ieabd61113bc6d3562738686f52bb06aa84fca765
* Low-level Compute v2 API: security groupDean Troyer2017-04-111-0/+228
| | | | | | | | | | 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
* Fixes image api URL endpoint for certain scenarioImtiaz Chowdhury2017-01-042-2/+2
| | | | | | | | | | | | | | | | | | | openstackclient fails to get image list when the image api endpoint has 'v2' substring in the URL. Instead of checking whether the api endpoint URL terminates with '/v2', the current logic is checking whether 'v2' appears anywhere in the endpoint string. This issue was discovered on a production setup where certain server names had 'v2' in their names. For example, when a hostname is gopher.dev20.com, the image list APIs fail. This commit updates the unit test to reflect this scenario. Without the change in openstackclient/api/image_v2.py, all the unit tests fail. Co-Authored-By: sergio.carvalho@workday.com Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d Closes-Bug: 1652827
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-087-0/+1030
this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded