summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Finish osc-lib transition for command.pyDean Troyer2016-06-151-1/+1
| | | | | | | | | https://review.openstack.org/#/c/328318/ was the transition of openstackclient/common/command.py to osc-lib but it was incomplete; https://review.openstack.org/#/c/329885/ started to fix it but was also incomplete. Third time is charm? Change-Id: Ib6c0266155c2155ae59067ce7b15bebca1e375e8
* Merge "Support bulk deletion for commands that exist in both network and ↵Jenkins2016-06-155-42/+413
|\ | | | | | | compute."
| * Support bulk deletion for commands that exist in both network and compute.Huanxuan Ao2016-06-155-42/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some delete commands in networkv2 are exist in both network and compute, They can use NetworkAndComputeDeleteclass to supprot bulk deletion and error handling and the codes are similar, so I change them all in this patch. The changed commands including: 1.floating ip delete 2.security group delete 3.security group rule delete Also, I update unit tests and docs for these commands in this patch. Change-Id: I6c94c3d10ba579ddd9b14d17673c821e3481fd8a Partially-Implements: blueprint multi-argument-network
* | Merge "Support compute service force down/up"Jenkins2016-06-151-4/+98
|\ \
| * | Support compute service force down/upRui Chen2016-06-141-4/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | Aims to evacuate servers from compute host as soon as possible, operators might set the compute service force down manually. Novaclient support the behavior, this patch support it in OSC. Change-Id: I22ff1c5d670c449771fdcb3f4f39cd82f428531a Closes-Bug: #1589348
* | | Add default IP version and fix help messages for "ip availability list"Huanxuan Ao2016-06-151-2/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | There was not a default IP version in "ip availability list" command, if we used this command without "--ip-version" option, the output was different from the outputs with the option "--ip-version 4" and "--ip-version 6" and it is not right. This patch add default IP version (default is 4) in ``ip availability list`` command and make this command work properly without ``--ip-version`` option. And also fix the help message. Change-Id: Idc08ab6eaf05946eb2ab59bfb3d4497a383d987d Closes-Bug: #1592761
* | Merge "Standardize logger usage in volume"Jenkins2016-06-151-8/+11
|\ \
| * | Standardize logger usage in volumeTang Chen2016-06-141-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.app.log is the logger in class OpenStackShell, which should be used to record logs that have nothing to do with any specific command. So, use the file logger instead. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html 1. add variables to logger as an argument 2. do not wrap variables with str() Change-Id: I248861a38a4de0412a080046aa7a6f6473c3e082 Implements: blueprint log-usage
* | | Merge "Fix foundation copyrights"Jenkins2016-06-141-1/+1
|\ \ \
| * | | Fix foundation copyrightsDean Troyer2016-06-141-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | The OpenStack LLC copyrights date from before OpenStack was transferred to the foundation. These appear to be getting copy-pasted to new files so at least should reflect the correct entity. Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
* | | Merge "Fix errors in ``set/unset flavor`` unit tests"Jenkins2016-06-141-9/+20
|\ \ \ | |/ / |/| |
| * | Fix errors in ``set/unset flavor`` unit testsTang Chen2016-06-141-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. We should assert flavor.set_keys() is called correctly or not called in ``set flavor`` unit tests. 2. Commit c7e6973ff50ff84af9ad55f7bdaeeea83ae40f0b from me removed test_flavor_unset_no_project which used to test if --project was specified as '', and assert CommandError was raised, which is incorrect. So I removed it. But after looking into the code, I think we should not remove it, but specify nothing after --project, and assert ParserException was raised. So in this patch, we fix it as so. ('--project', '') --> ('--project') assert CommandError --> assert ParserException Change-Id: Ifd33c72d5b7581aaabffb09e9b5e38ecc67e18c0
* | | Merge "osc-lib: timing"Jenkins2016-06-141-94/+0
|\ \ \ | |_|/ |/| |
| * | osc-lib: timingDean Troyer2016-06-131-94/+0
| | | | | | | | | | | | Change-Id: I3fe27d98efa5090e084c676f7f8e6dad0157ed21
* | | Merge "Fix image delete multiple arguments error"Jenkins2016-06-141-0/+31
|\ \ \ | |_|/ |/| |
| * | Fix image delete multiple arguments errorsunyajing2016-06-131-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix image delete command, support processing multiple arguments delete error. Fix doc/source/command-errors.rst, make the msg format correct. Change-Id: Icbe347fe077bc148bf71ea8f7399b0e934b7cdf9 Partially-Implements: blueprint multi-argument-image
* | | Merge "osc-lib: command"Jenkins2016-06-141-1/+1
|\ \ \ | | |/ | |/|
| * | osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* | | Merge "osc-lib: parseractions"Jenkins2016-06-141-0/+3
|\ \ \ | |/ /
| * | osc-lib: parseractionsDean Troyer2016-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* | | Merge "osc-lib: logs"Jenkins2016-06-141-6/+9
|\ \ \ | |/ /
| * | osc-lib: logsDean Troyer2016-06-131-6/+9
| | | | | | | | | | | | Change-Id: I2a4d40cd72cc22e97a600751ae29c2309ebed28b
* | | Merge "Fix errors in flavor unit tests"Jenkins2016-06-141-24/+9
|\ \ \ | |/ / |/| |
| * | Fix errors in flavor unit testsTang Chen2016-06-131-24/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problems below: 1. flavor.unset_keys() is not checked in flavor unit tests. So check them in the tests. 2. test_flavor_unset_no_project makes no sense. It is OK to specify ``--project ''`` without raising any exception. It can pass because in the test, we set nither project nor property. So remove this test. Change-Id: I04e537349936343b6d8c85b06bc6d0ba6bd41d6f
* | osc-lib: utilsDean Troyer2016-06-1324-434/+41
| | | | | | | | | | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* | osc-lib: exceptionsDean Troyer2016-06-1323-26/+46
| | | | | | | | | | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* | Moving authentication from keystoneclient to keystoneauthNavid Pustchi2016-06-099-69/+237
|/ | | | | | | | | | | | | | | | | Currently OpenStackClient uses keystoneclient for authentication. This change will update OpenStackClient to use keystoneauth for authentication. All dependant test have been updated. Updating how auth_ref is set in the tests to use KSA fixtures had some racy side-effects. The user_role_list tests failed when they picked up an auth_ref that was a fixture. This exposed a weakness in ListUserRole that needed to be fixed at the same time re handling of unscoped tokens and options. Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00 Closes-Bug: 1533369
* Merge "Make set/unset commands in network return normally when nothing ↵Jenkins2016-06-096-15/+50
|\ | | | | | | specified"
| * Make set/unset commands in network return normally when nothing specifiedTang Chen2016-06-086-15/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | set/unset commands should ends up normally instead of raising an exception when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens. This patch also adds a releasenote for both network, and volume commands that fix patch has been merged. Change-Id: I78c348066078decd350417a431f3b8bea8fcf9ef Partial-bug: #1588588
* | Clean up fakes.py in volumev2Huanxuan Ao2016-06-081-188/+0
|/ | | | | | | | | All of volumev2 fake classes are completed. Now the unit tests of volumev2 are using fake classes so that the old codes are useless and can be removed. Change-Id: I502a8a0b0404975744d3b208af3e95c8692e6c47
* Merge "Error handling for KeyValueAction class."Jenkins2016-06-081-10/+7
|\
| * Error handling for KeyValueAction class.Huanxuan Ao2016-06-081-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | The set --property command requires that the input match the "key=value" type, but if the type don't match, the return value will be None, and the command still can be implemented successfully, this may confuse the users. I think we should raise exception if the argument type don't match "key=value". So I make some changes in KeyValueAction class in this patch. Change-Id: I14e64922faa7e083bc8b5e7e1cac41ef8117c224 Closes-Bug: #1589935
* | Merge "Update unit test test_extension with fake class"Jenkins2016-06-085-159/+222
|\ \
| * | Update unit test test_extension with fake classHuanxuan Ao2016-06-075-159/+222
| |/ | | | | | | | | | | | | Add FakeExtension class in networkv2, computev2, volumev2, identityv2_0 and update unit test test/common/test_extension.py Change-Id: I94815de7801860edb7fa91a7d146455cab946652
* | Merge "Support error handling for "port delete" command"Jenkins2016-06-071-7/+61
|\ \ | |/ |/|
| * Support error handling for "port delete" commandHuanxuan Ao2016-06-071-7/+61
| | | | | | | | | | | | | | | | | | | | "Port delete" command supported deleting multi ports before but didn't support error handing, This patch add the error handling following the rules in doc/source/command-errors.rst. Change-Id: I4ea69f2279763626d6a27cad1ca0ee99822d016d Partially-Implements: blueprint multi-argument-network
* | Merge "Fix errors for "volume type unset" command"Jenkins2016-06-071-2/+4
|\ \
| * | Fix errors for "volume type unset" commandHuanxuan Ao2016-06-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Normally, we can unset multi properties but the "volume type unset" command could not, because the action "append" was missed. So I add it and also fix the unit test and doc in this patch. Change-Id: I20470f2b7bb2a8d7f292cea498826669c3418c77
* | | Merge "Refactor SetService --enable/disable option"Jenkins2016-06-061-31/+26
|\ \ \
| * | | Refactor SetService --enable/disable optionTang Chen2016-06-041-31/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the following: 1. --enable/disable option should follow the rules in the doc below: http://docs.openstack.org/developer/python-openstackclient/command-options.html#boolean-options 2. "--disable-resion" is specified but not "--disable", an exception is raised instead of igoring "--disable-reason" option. Change-Id: I92e9234111e661bfe7119a8e19389a87c874ab0c
* | | | Merge "Make set/unset commands in volume return normally when nothing specified"Jenkins2016-06-061-3/+0
|\ \ \ \
| * | | | Make set/unset commands in volume return normally when nothing specifiedTang Chen2016-06-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set/unset commands should ends up normally instead of logging an error when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens. Change-Id: Ib03a512650e5da90aa1ef38019772448383d0d33 Partial-bug: #1588588
* | | | | Merge "Add server set/unset unit test cases"Jenkins2016-06-061-0/+87
|\ \ \ \ \
| * | | | | Add server set/unset unit test casesRui Chen2016-06-061-0/+87
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit test cases don't cover compute "server set/unset" commands, the patch add some test cases for them. Change-Id: I440c32968bd41b948352a9764a37c9af3e68803d
* | | | | Merge "Add network availability for osc"Jenkins2016-06-062-0/+224
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add network availability for oscManjeet Singh Bhatia2016-06-032-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements openstack client for network ip availability. Implements: blueprint neutron-ip-capacity Depends-On: I3b40d8edea87c068c4e8133e436511765064d5f8 Change-Id: Iffaa2e20ff495fbd205d3397e027e8141d04385e
* | | | | Merge "Support multiple argument for compute agent delete command"Jenkins2016-06-051-5/+56
|\ \ \ \ \
| * | | | | Support multiple argument for compute agent delete commandsunyajing2016-06-031-5/+56
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Change-Id: I3b19e4914d475b86d7e8aa8d76e62a2ac811272f Partially-Implements: blueprint multi-argument-compute
* | | | | Merge "Add support for volume transfer request list"Jenkins2016-06-044-4/+334
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Add support for volume transfer request listSheel Rana2016-06-044-4/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to list volume transfer from one user to other user. This patch will provide support for listning volume transfer requests. Closes-Bug:#1554886 Implements: bp cinder-command-support Change-Id: Ie659bc39cb1d1e931cca7a40b2f126a067ee484c