summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Support multi-delete for commands in identity V2sunyajing2016-06-232-2/+2
| | | | | | | | Commands are "ec2 credentials delete", "service delete", "endpoint delete". Also update their unit tests and functional tests. Partial-Bug: #1592906 Change-Id: I1a0b7160b803a523646d09d030e6f112c81c4c24
* Merge "Support JSON data for port binding profile"Jenkins2016-06-231-0/+95
|\
| * Support JSON data for port binding profileRichard Theis2016-06-201-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "--binding-profile" option on the "port create" and "port set" commands to support both <key>=<value> and JSON input for the port custom binding profile data. The JSON input is sometimes needed to maintain the value type (e.g. integer) for more advanced data. The port custom binding profile data is unique across neutron so a custom argparse.Action class was created instead of writting a generic class in osc-lib. Change-Id: I82ac6d4f95afdc866f5282fc00d390f850f54d21 Implements: blueprint neutron-client
* | Merge "Add FakeObject classes to fakes.py, update unit tests in identity V2."Jenkins2016-06-235-275/+422
|\ \
| * | Add FakeObject classes to fakes.py, update unit tests in identity V2.sunyajing2016-06-225-275/+422
| | | | | | | | | | | | | | | | | | | | | | | | Clean up fakes.py , use FakeCatalog, FakeProject, FakeService, FakeEndpoint, FakeRole classes instead, also update their unit tests. Change-Id: I510d175ec194165b0595ebd430e8cc596d363587 Partially-Implements: blueprint refactor-identity-unit-test
* | | Merge "Improve masking of secrets in configuration show"Jenkins2016-06-231-3/+14
|\ \ \
| * | | Improve masking of secrets in configuration showAlvaro Lopez Garcia2016-06-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command "configuration show" tries to redact some of the secrets that are shown on the screen. However, this failed redacting options that were marked as secrete by the auth plugins (if any) and it redacted other options that were not redacted at all. For example, when using the OpenID Connect plugins, it redacted the "access_token_endpoint" as the word "token" appears there, but it failed to redact "client_secret" even when this option is marked as secret in the corresponding plugin. Change-Id: Idfad4fbbe5ddcff5e729e1dcd756d0379ad31dee
* | | | Merge "support multi-delete for volume-type"Jenkins2016-06-231-2/+2
|\ \ \ \
| * | | | support multi-delete for volume-typeSteve Martinelli2016-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the ability to delete multiple volume types at once. Note there are no unit tests exist for v1 volume-types, so instead a functional test was created. Partial-Bug: #1592906 Change-Id: I99f3f22901ab35252b91a3072b14de7d19cb17ca
* | | | | Merge "Use resource id when name given for identity show"Jenkins2016-06-234-0/+62
|\ \ \ \ \
| * | | | | Use resource id when name given for identity showDavid Rosales2016-06-224-0/+62
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a user is allowed to specify either a resource ID or name when running openstack identity comands. In some cases, when a name is specified instead of an ID, the command will return as not able to find the resource when it in fact does exist. The changes here are to check the client against the token on such requests and to extract the ID of the resource specified if enough information exists between the two. We then use the ID associated with the resource to complete the user requests. Change-Id: I40713b0ded42063b786dc21247e854224b9d2fe2 Closes-Bug: #1561599
* | | | | Merge "Fix errors for "host set" command"Jenkins2016-06-232-8/+7
|\ \ \ \ \
| * | | | | Fix errors for "host set" commandHuanxuan Ao2016-06-222-8/+7
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Host set" command cannot work. Because: 1.Host has no 'ID' attribute, so 'ID' attribute cannot be found in "host set" command. 2.value "True" and "Flase" are invalid in updata() method of host. 3.Some update functionalities is not supported in host API now. This patch solves the problems 1 and 2 in OSC. But the problem 3 is a API problem and can't be solved in OSC, only XenServer driver support to set enable/disable and maintenance host, it is a normal problem. After this patch the output of "host set" command is: The requested functionality is not supported. (HTTP 501) (Request-ID: req-14031fce-8c90-48a0-8492-dc8e3dd349f3) Just the same as the "host-update" command in novaclient. Change-Id: Ibe94c4d3d492d3d63355de803810edb988e1b4e9 Closes-Bug: #1594689
* | | | | Merge "Refactor unit test of "compute service list" command"Jenkins2016-06-232-7/+40
|\ \ \ \ \
| * | | | | Refactor unit test of "compute service list" commandHuanxuan Ao2016-06-222-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit test of "compute service list" only checked the "Disabled Reason" columns and its data. It is not enough. This patch change the test to check all datas in the list. Also, this patch modify the "Id" to "ID" in this command. Change-Id: I988fd6365f2652185dd96d9417f294eba9c31cd9
* | | | | | Merge "Make set/unset commands in compute/image/common return normally when ↵Jenkins2016-06-222-6/+13
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | nothing specified"
| * | | | | Make set/unset commands in compute/image/common return normally when nothing ↵Tang Chen2016-06-212-6/+13
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified After this patch, all set/unset commands will return normally when nothing specified. Change-Id: Id94d0329faa1a674006a9aae901f834b41917317 Close-bug: #1588588
* | | | | Merge "Support bulk deletion for "flavor/aggregate delete""Jenkins2016-06-223-21/+140
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Support bulk deletion for "flavor/aggregate delete"Huanxuan Ao2016-06-213-21/+140
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support bulk deletion and error handling for "aggregate delete" and "flavor delete" commands. Change-Id: I3f6105cbeeab1c9f8cd571c63ce0e7ac3d4252b3 Partially-Implements: blueprint multi-argument-compute Partial-Bug: #1592906
* | | | Add "--project" option to the "flavor create" command.Huanxuan Ao2016-06-211-1/+27
| |/ / |/| | | | | | | | | | | | | | | | | | | | Add ``--project`` and ``--project-domain`` options to the ``flavor create`` command. We can use these options to add the flavor access to a givin project when we create the flavor. Change-Id: Ic1907272c1d1ae526f9c9e86f32ba06c6da147c0
* | | Merge "Error handling of "router delete" command"Jenkins2016-06-201-7/+59
|\ \ \
| * | | Error handling of "router delete" commandHuanxuan Ao2016-06-201-7/+59
| |/ / | | | | | | | | | | | | | | | | | | | | | "Router delete" command supports multi deletion but no error handling. This patch add the error handling follow the rule in doc/source/command-error.rst Change-Id: I3376d957b4dc28d8282599dc909ecc5ed2b5f46a
* | | Merge "Add "--network-segment" option to "subnet create""Jenkins2016-06-202-15/+84
|\ \ \ | |_|/ |/| |
| * | Add "--network-segment" option to "subnet create"Richard Theis2016-06-132-15/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--network-segment" option to the "subnet create" command. This is a beta command option and subject to change. Use global option "--os-beta-command" to enable this option. This patch set also provides a devref update for beta command options. Change-Id: I4d0fbe079b2a873307364c41c22ce9ba88e632e6 Partially-Implements: blueprint routed-networks
* | | Merge "Standardize logger usage"Jenkins2016-06-201-9/+6
|\ \ \
| * | | Standardize logger usageTang Chen2016-06-201-9/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use file logger for all command specific logs. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html After this patch, all self.log and self.app.log will be standardized to LOG(). NOTE: In shell.py, we got the log in class OpenStackShell, which is also known as self.app.log in other classes. This logger is used to record non-command-specific logs. So we leave it as-is. Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896 Implements: blueprint log-usage
* | | Merge "Fix console url show command broken in microversion case"Jenkins2016-06-201-0/+149
|\ \ \
| * | | Fix console url show command broken in microversion caseRui Chen2016-06-161-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The response data of nova get_xxx_console API is changed from "console" to "remote_console" in microversion 2.6, and nova server side API schema verify the spice vnc type to "spice-html5", update OSC code to apply these change so that OSC can work in different nova microversion cases. Change-Id: I3bb4fe057e656209d00d2bb308ac3f7f837cb03f Closes-Bug: #1590318
* | | | Use osc_lib in server_image.pyTang Chen2016-06-201-2/+3
| |/ / |/| | | | | | | | | | | | | | | | | server_image.py is a newly created file. So I think we forgot to use osc_lib in it. Change-Id: Ieda13438662ea55b03f549108aac63c18b9af913
* | | Merge "Do not prompt for scope options with default scoped tokens"Jenkins2016-06-171-5/+5
|\ \ \
| * | | Do not prompt for scope options with default scoped tokensDolph Mathews2016-06-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the scope validation to occur after a token has already been created. Previous flow: 1. Validate authentication options. 2. Validate authorization options if the command requires a scope. 3. Create a token (using authentication + authorization options) 4. Run command. This means that scope was being checked, even if a default scope was applied in step 3 by Keystone. New flow: 1. Validate authentication options. 2. Create token (using authentication + authorization options) 3 Validate authorization options if the command requires a scope and the token is not scoped. 4. Run command. Change-Id: Idae368a11249f425b14b891fc68b4176e2b3e981 Closes-Bug: 1592062
* | | | Merge "Modify unit tests of compute agent delete"Jenkins2016-06-171-0/+10
|\ \ \ \ | |/ / / |/| | |
| * | | Modify unit tests of compute agent deletesunyajing2016-06-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | add no-input test to ``compute agent delete`` unit tests. Change-Id: Iee22b75c9a9431e57cb634dc28a5efa9b43b7369
* | | | Merge "Make set/unset command in identity and image pass normally when ↵Jenkins2016-06-173-0/+82
|\ \ \ \ | | | | | | | | | | | | | | | nothing specified"
| * | | | Make set/unset command in identity and image pass normally when nothing ↵sunyajing2016-06-173-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified Also update its unit tests. Change-Id: I82b90658b0d4247cdc9a650f14aceda640a32059 Partial-bug: #1588588
* | | | | Merge "Support bulk deletion for delete commands in networkv2"Jenkins2016-06-163-15/+156
|\ \ \ \ \
| * | | | | Support bulk deletion for delete commands in networkv2Huanxuan Ao2016-06-163-15/+156
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch support bulk deletion for delete commands below: 1.subnet delete 2.subnet pool delete Up to now, all the delete commands in networkv2 support bulk deletion. Change-Id: I63f6d1d02bad1fcc26e72b7028b53958a68ce2dc Partially-Implements: blueprint multi-argument-network Partial-Bug: #1592906
* | | | | Merge "Move server image create command to its own resource file."Jenkins2016-06-162-144/+227
|\ \ \ \ \
| * | | | | Move server image create command to its own resource file.Dean Troyer2016-06-032-144/+227
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If37e82072bd7a32b81bfb1a8bb048f018dd5b04f
* | | | | | 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
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |