summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add floating IP Port Forwarding commands"Zuul2019-09-092-0/+579
|\
| * Add floating IP Port Forwarding commandsLIU Yulong2019-08-292-0/+579
| | | | | | | | | | | | | | | | | | | | | | | | Add following commands: floating ip port forwarding create floating ip port forwarding delete floating ip port forwarding list floating ip port forwarding set floating ip port forwarding show Closes-Bug: #1811352 Change-Id: I6a5642e8acce28fc830410d4fa3180597b862761
* | Microversion 2.77: Support Specifying AZ to unshelvezhangbailin2019-09-031-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new parameter ``--availability-zone`` to ``openstack server unshelve`` command. This can help users to specify an ``availability_zone`` to unshelve a shelve offloaded server from 2.77 microversion. Depends-On: https://review.opendev.org/679295 Implements: blueprint support-specifying-az-when-restore-shelved-server Change-Id: Ia431e27c2a17fe16466707cc362532860ecf22df
* | Merge "Remove token_endpoint auth type"Zuul2019-08-292-15/+15
|\ \
| * | Remove token_endpoint auth typeDean Troyer2019-08-272-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The token_endpoint was a compatibility auth type to maintain support for the --url global option that dated back to the beginning of OpenStack CLI auth. The common keystoneauth library implements 'admin_token' which provides the same functionality using --endpoint rather than --url. Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | Merge "Bump hacking version"Zuul2019-08-282-2/+2
|\ \ \ | |_|/ |/| |
| * | Bump hacking versionStephen Finucane2019-08-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Pick up newer versions of this library. Thankfully no serious changes are needed. Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Format aggregate command fields and de-race functional testsDean Troyer2019-08-261-18/+23
| |/ |/| | | | | | | | | | | | | | | Rename metadata to property in all aggregate commands Beef up functional tests to reduce street racing Change-Id: I4598da73b85a954f3e6a3981db21891b45d9548c Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Merge "Add 'openstack server resize (confirm|revert)' commands"Zuul2019-08-201-2/+80
|\ \
| * | Add 'openstack server resize (confirm|revert)' commandsStephen Finucane2019-08-091-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are currently exposed as flags on the 'openstack server resize' command but they are in fact operation and should be exposed as commands in their own right. The old flag-based variants are deprecated for removal in 4.0. Change-Id: I733796d3bda6c3755a3d3548bbe695abb474a6a0 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "Add openstack server create --boot-from-volume option"Zuul2019-08-201-0/+27
|\ \ \ | | |/ | |/|
| * | Add openstack server create --boot-from-volume optionMatt Riedemann2019-08-091-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a --boot-from-volume option to the server create command which is used with the --image or --image-property option and will create a volume-backed server from the specified image with the specified size. Similar to the --volume option, the created root volume will not be deleted when the server is deleted. The --boot-from-volume option is not allowed with the --volume option since they both create a block device mapping with boot_index=0. Change-Id: I88c590361cb232c1df7b5bb010dcea307080d34c Story: 2006302 Task: 36017
* | | Merge "Fix compute service set handling for 2.53+"Zuul2019-08-201-4/+100
|\ \ \
| * | | Fix compute service set handling for 2.53+Matt Riedemann2019-08-091-4/+100
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With compute API microversion 2.53 there is a single PUT /os-services/{service_id} API which takes the service id as a UUID. Since the openstack compute service set command only takes --host and --service (binary) to identify the service, this change checks if 2.53 or greater is being used and if so, looks up the service by host and binary and calls the appropriate methods in novaclient. If the command cannot uniquely identify a compute service with the given host and binary, an error is raised. A future change could add an --id option to be used with 2.53+ to pass the service id (as UUID) directly to avoid the host/binary filtering. Change-Id: I868e0868e8eb17e7e34eef3d2d58dceedd29c2b0 Story: 2005349 Task: 30302
* | | Merge "Make configuration show not require auth"Zuul2019-08-092-46/+91
|\ \ \
| * | | Make configuration show not require authDean Troyer2019-08-012-46/+91
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration show should not require auth to just display the OSC config object. Changes to make it not require auth have knock-on effects of needing to change a bunch of tests that use it assuming it _does_ require auth so change those to use 'extension list' instead. This sets up further testing of the command line options for changes in behaviour when we switch to straight SDK usage for configuration. Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | Merge "openstack port create support --extra-dhcp-option"Zuul2019-08-011-0/+42
|\ \ \
| * | | openstack port create support --extra-dhcp-optionzhouhenglc2019-07-251-0/+42
| |/ / | | | | | | | | | | | | | | | | | | neutron create-port API has extra_dhcp_opts parameter, this parameter can set port with special extra dhcp options. Change-Id: I199f17e95c509a33f809ac85c65f685a37acd198
* | | Merge "Support IPv6 addresses better"Zuul2019-08-012-3/+14
|\ \ \ | |/ / |/| |
| * | Support IPv6 addresses betterBrian Haley2019-07-152-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding a security group rule, if no IP address is given we will use '0.0.0.0/0', but if the ethertype is IPv6 we will leave it as None. Change this to be '::/0' to match what we do for IPv4 - use the "any" address. The neutron server treats them both the same when checking for duplicates. Because there are most likely entries in the DB using None for the IP, print them as '0.0.0.0/0' or '::/0' so it is more obvious what address they are actually referring to. Also change to display the Ethertype column by default instead of with --long, since easily knowing IPv4 or IPv6 is useful. Change-Id: Ic396fc23caa66b6b0034c5d30b27c6ed499de5a6 Closes-bug: #1735575
* | | Merge "Add host and hypervisor_hostname to create servers"Zuul2019-07-231-0/+231
|\ \ \
| * | | Add host and hypervisor_hostname to create serverszhu.boxiang2019-07-191-0/+231
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the --host and --hypervisor-hostname options to ``openstack server create`` CLI. Depends-On: https://review.opendev.org/670558 Change-Id: If188c3d96fa506dbe62ef256418f2f9bca1520c2 Blueprint: add-host-and-hypervisor-hostname-flag-to-create-server
* | | Fix BFV server list handling with --name-lookup-one-by-onemelanie witt2019-06-281-8/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the --name-lookup-one-by-one option passed to the 'server list' command, the image and flavor names will be looked up for each server being listed instead of fetching all image/flavor names. The current code assumes all servers have an image attribute, but servers booted from volumes have no image, so the following error is raised when listing BFV servers with --name-lookup-one-by-one: AttributeError: ('unicode'|'str') object has no attribute 'get' The error occurs when the code attempts server.image.get('id'). This fixes the --name-lookup-one-by-one code not to assume an image for a server. The unit tests for 'server list' have also been robustified to feature one BFV server to enhance our test coverage. Story: #2006063 Task: #34777 Change-Id: I312c971346c7ded93f6fcaa515098554b8580295
* | Merge "Use cliff formattable columns in identity commands"Zuul2019-06-236-47/+73
|\ \
| * | Use cliff formattable columns in identity commandsAkihiro Motoki2019-06-226-47/+73
| | | | | | | | | | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ia13314a012b3a7363ffb24a13c79c6ecdff1ed7b
* | | Merge "Use cliff formattable columns in image commands"Zuul2019-06-235-34/+38
|\ \ \
| * | | Use cliff formattable columns in image commandsAkihiro Motoki2019-06-225-34/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related functional tests are converted into JSON format. Otherwise, it is not easy to check results. Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ib82e15738544975fede0c54cc5eaf239f4c67277
* | | | Merge "Use cliff formattable columns in volume v2 commands"Zuul2019-06-236-111/+146
|\ \ \ \
| * | | | Use cliff formattable columns in volume v2 commandsAkihiro Motoki2019-06-226-111/+146
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I761ccac126208927594ad0d98a3cf5ad8b44bd48
* | | | Merge "Use cliff formattable columns in volume v1 commands"Zuul2019-06-234-59/+119
|\ \ \ \
| * | | | Use cliff formattable columns in volume v1 commandsAkihiro Motoki2019-06-224-59/+119
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ib4c5798171e32a8ddc08a37ee1d416e366a71d76
* | | | Merge "Change default security group protocol to 'any'"Zuul2019-06-222-1/+5
|\ \ \ \ | |/ / / |/| | |
| * | | Change default security group protocol to 'any'Brian Haley2019-05-062-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default protocol used to create a security rule was changed to ``tcp``, which was a regression from the neutron client. Change it back to ``any``, which skips sending the protocol to the API server entirely when using the Neutron v2 API. Users that had been creating rules without specifying a protocol and expecting ``tcp`` need to change to use ``--protocol tcp`` explicitly. Change-Id: Iedaa027240e00dced551513d8fa828564386b79f Closes-bug: #1716789
* | | | Merge "Use cliff formattable columns in network commands"Zuul2019-06-2210-240/+259
|\ \ \ \ | | |/ / | |/| |
| * | | Use cliff formattable columns in network commandsAkihiro Motoki2019-05-0910-240/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use cliff formattable columns not to convert complex fields into a string when a machine readable format like JSON or YAML is requested. Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I9878f327e39f56852cc0fb6e4eee9105b7141da9
* | | | Merge "Remove deprecated volume commands and args"Zuul2019-06-227-1412/+19
|\ \ \ \
| * | | | Remove deprecated volume commands and argsSean McGinnis2019-05-207-1412/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated over two years ago and can now be removed: * Remove ``backup`` commands in favor of ``volume backup`` * Remove ``snapshot`` commands in favor of ``volume snapshot`` * Remove ``volume create`` options ``--project``, ``--user`` and ``--multi-attach`` * Use of an auth-key positional argument in volume transfers * ``volume transfer request`` no longer accepts 'auth_key' as a positional arg, ``--auth-key`` is now required Internal (non-user-visible) * Rename backup.py to volume_backup.py for Volume v1 and v2, update tests These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I94aa7a9824e44f9585ffb45e5e7637b9588539b4 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | Merge "Remove deprecated network options"Zuul2019-06-213-148/+13
|\ \ \ \ \ | |/ / / /
| * | | | Remove deprecated network optionsSean McGinnis2019-05-193-148/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated for several releases and can now be removed: * Remove ``port create|set`` options ``--device-id`` and ``--port-id`` * Remove ``router set`` option ``--clear-routes`` * Remove ``security group rule create`` options ``--src-group`` and ``--src-ip`` These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: Ieae74c14f6b3e263721a3146cf76f94a9ab792f6 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | Merge "Remove deprecated image commands"Zuul2019-06-211-52/+0
|\ \ \ \ \ | |/ / / /
| * | | | Remove deprecated image commandsDean Troyer2019-05-191-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove ``image create|set`` option ``--owner`` Change-Id: I1fabab98c8660eba6d0dd75e74544c6c9d432b9e Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | Merge "Remove deprecated identity commands and args"Zuul2019-06-213-402/+8
|\ \ \ \ \ | |/ / / /
| * | | | Remove deprecated identity commands and argsSean McGinnis2019-05-193-402/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated over two years ago and can now be removed/changed: * Remove ``service create`` option ``--type`` * Remove ``role list`` options ``--project`` and ``--user`` * Remove ``user role list`` command These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I29e2fc9516dffbfd83eef0bc91e834dde99b4105 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | Merge "Microversion 2.73: Support adding the reason behind a server lock"Zuul2019-06-211-1/+148
|\ \ \ \ \
| * | | | | Microversion 2.73: Support adding the reason behind a server lockSurya Seetharaman2019-06-211-1/+148
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new parameter ``--reason`` to ``openstack server lock`` command and ``--locked``, ``unlocked`` filtering parameters to ``openstack server list`` command. This can help users to provide a reason when locking the server and to filter instances based on their locked value from 2.73 microversion. Implements blueprint add-locked-reason Depends-On: https://review.opendev.org/#/c/661785/ Change-Id: Ib2714f98b24d47e570da8a6c231e765acd2ff595
* | | | | Allow "server migrate" (not live) to take "--host" optionMartin Chlumsky2019-06-211-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, doing a cold migration while specifying a target host is not possible however nova api supports it since version 2.56. This patch allows passing "--host" when doing a cold migration. It runs normally if --os-compute-api-version is 2.56 or greater and returns an error otherwise. Change-Id: I960109008096ce8bb4e4c8ca6ffb22c33aacd995 Story: 2003325 Task: 24359
* | | | | 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
* | | | Merge "Deprecate openstack server migrate --host option"Zuul2019-06-061-1/+157
|\ \ \ \
| * | | | Deprecate openstack server migrate --host optionMatt Riedemann2019-05-241-1/+157
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the discussion at the Train Forum [1] this deprecates the problematic --live option on the server migrate command which, depending on the compute API version used, forcefully bypasses the scheduler and also does not allow you to live migrate a server and let the scheduler pick a host. The --live option is replaced here with two new options: * --live-migration: this simply tells the command you want to perform a live rather than cold migration; if specified with --live the --live-migration option takes priority. * --host: when specified, this will request a target host for the live migration and will be validated by the scheduler; if not specified, the scheduler will pick a host. This option is mutually exclusive with --live. We can build on the --host option by supporting cold migrations with a specified host when using compute API version 2.56 or greater but that will come in a separate change. If the --live option is ever used we log a warning. Note there are several related changes for this issue: - https://review.openstack.org/#/c/628334/ - https://review.openstack.org/#/c/626949/ - https://review.openstack.org/#/c/627801/ - https://review.openstack.org/#/c/589012/ - https://review.openstack.org/#/c/460059/ This change allows us to deprecate the --live option and provide a replacement which is backward compatible without having to use something potentially error-prone like nargs='?'. Closes-Bug: #1411190 [1] https://etherpad.openstack.org/p/DEN-osc-compute-api-gaps Change-Id: I95d3d588e4abeb6848bdccf6915f7b5da40b5d4f