summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/common
Commit message (Collapse)AuthorAgeFilesLines
* Fix 'project purge' deletes ALL images problemlihaijing2017-11-021-12/+12
| | | | | | Closes-Bug: #1717130 Change-Id: I33c6fc7897dfee85d1c197a1267bde4abfa5bbd9 (cherry picked from commit 254dbf3294c0f1edc4a2a469f556b3c4b3123a00)
* Add project purge command to oscSteve Martinelli2017-06-131-0/+314
| | | | | | | | | See the initial implementation: https://github.com/openstack/ospurge/blob/master/ospurge/client.py Partial-Bug: 1584596 Change-Id: I3aa86af7c85e7ca3b7f04b43e8e07125f7d956d1
* Refactor Extension show and list commandAnkur Gupta2017-05-181-16/+62
| | | | | | | | | | | | | | 1.keep the column display order consist in extension list with and without "--long" option. 2.rework for network extentsion list, openstacksdk return object, so the logic should be same with other service. 3.add some unit test cases, like: extension list --network --long, extension list --network --compute, to cover regular use cases. 4.raise exact exception when network extension don't exist, avoid internal TypeError in "extension show" commands. Change-Id: I2e23ced80d8da8aa1106b22472db850367b351ce Closes-Bug: #1689233
* Ignore more exceptions in quota listDean Troyer2017-05-111-1/+48
| | | | | | | | Additional exceptions can be thrown here, ignore additional project lookup exceptions, but still not all. Server failures are still interesting, for example. Change-Id: I9a750ae8e8efa29a36bbd1e34b50b6ace0658260
* Funcional tests: quota listDean Troyer2017-05-021-254/+428
| | | | | | | | | | | | The quota list tests have a race in them where occasionally a project is deleted in another test between the time that quota list gets a list of all projects and it gets the quota for the projects from the service; the get quota call fails on the non-existant project. The quota list functional tests have been substantially re-written to properly test the exception handling. Change-Id: I71e6bbb5d46fcea4718a5a870f9a66a2c20fff0f
* Improve no-auth pathDean Troyer2017-04-241-1/+3
| | | | | | | | | | | The commands that do not require authentication sometimes still need to call ClientManager.is_network_endpoint_enabled() to see if Neutron is available. Optimize the paths a bit to skip auth when it is not necessary; the upshot is Neutron will be assumed in these cases now. This gets a LOT cleaner when it appears is a future osc-lib. Change-Id: Ifaddc57dfa192bde04d0482e2cdcce111313a22a
* Merge "OSC Extension Show"Jenkins2017-03-231-0/+58
|\
| * OSC Extension ShowSindhu Devale2017-03-221-0/+58
| | | | | | | | | | | | | | | | Implement Neutron feature of Extension Show into OpenStack Client. Change-Id: Ifecb794838cb3bf8c2466d178345349db3cd4003 Implements: blueprint extension-show
* | Merge "OSC Quota List"Jenkins2017-03-211-0/+159
|\ \
| * | OSC Quota ListSindhu Devale2017-03-101-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | Implement Neutron feature of Quota List into OpenStack Client. Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57 Partially-Implements: blueprint neutron-client-quota
* | | Merge "Support list commands by group name keyword"Jenkins2017-02-271-0/+35
|\ \ \
| * | | Support list commands by group name keywordRui Chen2017-02-231-0/+35
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of current "command list" is so long, it's very difficult for users to find out the commands they care about. Add "--group <group-keyword>" option to filter the commands by group name keyword, like: --group volume, list all openstack.volume.v2 (cinder) commands That support the scenario that users need to know the current support commands of some OpenStack services(nova, neutron, cinder and so on) in OSC. Change-Id: Id673042729ad36a0cac0b81fb31a3537c24f03fc Closes-Bug: #1666780
* | | Revert unit tests for quota commandsHuanxuan Ao2017-02-231-42/+30
|/ / | | | | | | | | | | | | | | | | | | quota set and quota show command have been fixed by [1] [2], now can revert the unit test as well [1] https://review.openstack.org/435574 [2] https://review.openstack.org/435735 Change-Id: I3d592df6ea4e96770dac4dba91819b5c4bcb0561
* | Fix "module list --all" failedRui Chen2017-02-061-9/+34
| | | | | | | | | | | | | | | | | | | | KeyError cause the command "module list --all" failed, fix it, and do refactor to filter private modules and reduce the loop times, add related unit tests and functional tests. Change-Id: Icd77739502e05b5f763a04a92547497bf82d5d63 Closes-Bug: #1661814
* | Fix quota set command error for SDK > 0.9.10Huanxuan Ao2017-01-151-30/+42
|/ | | | | | | | | | A bug in OpenStack SDK 0.9.11 and 0.9.12 that causes quota set command to fail. This can be removed when the proposed SDK fix (https://review.openstack.org/#/c/419911/) is released and in the minimum SDK version in global requirements. Closes-Bug: #1655445 Change-Id: I63132f5f762f0120282f8b92e72512763063e3c6
* Merge "Fix openstack quota set/show --class not work"Jenkins2016-09-201-10/+67
|\
| * Fix openstack quota set/show --class not workqtang2016-09-141-10/+67
| | | | | | | | | | | | | | | | identity_client should not be used for quota class operation. Update code to fix the qutoa class set/show issue. Change-Id: I71c59c08a0d5da29982497f589e1efe131997f21 Closes-Bug: #1609233
* | Fix quota-update issue in LBaaSReedip2016-09-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently L7Policies cannot be updated( it was missing in implementation in neutronclient). The same has been taken care in the current patch. Also, currently quota doesnt support updating the members in an LBaaS pool. This patch temporarily removes it, till it is not confirmed that LBaaS v2 needs to support quotas for members or not. Change-Id: I25a54a57debb762a32a280ece8c081fc52365f0f Closes-Bug: #1624097
* | Fix Quota Support for HMsReedip2016-09-161-3/+3
|/ | | | | | | | | | Health Monitors could not be updated using the `openstack quota update` CLI. This patch fixes the same. Change-Id: Ic5a4fa5dce5767e40139137131114834d564f89a Closes-Bug: #1624225
* Support fetching network project default quotaRui Chen2016-09-131-0/+9
| | | | | | | | | | Neutron server and openstacksdk had supported to fetch network project default quota, this patch add the CLI support in openstackclient. Change-Id: If0ef74c268c41a866c62156da0603a40ae4e6e31 Closes-Bug: #1204956 Depends-On: I6a4e2a146351dd1e7d652442511f1ef2c279da42
* Set quota "per_volume_gigabytes", "backup_gigabytes" and "backups"Rui Chen2016-09-121-0/+22
| | | | | | | | | "per_volume_gigabytes", "backup_gigabytes" and "backups" items can be shown in "openstack quota show" command, but can't be updated by "openstack quota set". This patch fix the issue. Change-Id: I47db5a69d4e4ef6e140f2735257c83e1fb052760 Closes-Bug: #1609767
* Unit tests of quota command refactorRui Chen2016-09-121-44/+95
| | | | | | | | | Do refactor for quota command related unit tests, remove useless code, add new tests to cover '--volume-type' and '--class' option in "quota set" command and add the volume quota fake object. Change-Id: Iaf214740e98db1bfb4c739e810bac1c5ba6e9625
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-0811-0/+1761
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