summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute/v2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Compute: Add tag support for server add fixed iptianhui2020-10-121-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I62ed4729dead9f91630d1f568c834c9642965558 Story: 2002195 Task: 21679
* | | | | | | Compute: Add tags support for servertianhui2020-10-141-0/+260
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If065602792958ff0145ae9f2e05f5b7a3177905c Story: 2002006 Task: 19641
* | | | | | Merge "Compute: Add tag support for server add volume"Zuul2020-10-141-4/+56
|\ \ \ \ \ \
| * | | | | | Compute: Add tag support for server add volumetianhui2020-10-091-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id9f2e09426f6824e9ca672bf7808b5165c650a69 Story: 2002195 Task: 21675
* | | | | | | Merge "Add 'server migration force complete' command"Zuul2020-10-141-0/+51
|\ \ \ \ \ \ \ | | |_|_|/ / / | |/| | | | |
| * | | | | | Add 'server migration force complete' commandjay2020-10-131-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to novaclient's 'live-migration-force-complete' command. Change-Id: Ic4dc639afa16cdf8c5a46774895e850d92985292 Story: 2007513 Task: 39293
* | | | | | | Merge "Add 'server migration abort' command"Zuul2020-10-142-0/+59
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Add 'server migration abort' commandhackertron2020-10-132-0/+59
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to nova client's 'live-migration-abort' command. Change-Id: I0ff520ccfdf2de52c427affad7bef4554c86a06f Story: 2007489 Task: 39210
* | | | | | Merge "compute: Add --password option for openstack server create"Zuul2020-10-131-0/+25
|\ \ \ \ \ \
| * | | | | | compute: Add --password option for openstack server createZhaokun Fu2020-10-131-0/+25
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaf923200efe023655a58ac5acac0b087d2fd5366 Story: #1708570 Task: #13780
* | | | | | Merge "Compute: Add 'keypair create --type' parameter"Zuul2020-10-132-22/+123
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Compute: Add 'keypair create --type' parametertianhui2020-10-122-22/+123
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2d251e1b97fb9a8069431c867fb7fc5f42d1fd6e Story: 2002606 Task: 22225
* | | | | Merge "Remove oslo.utils"Zuul2020-10-131-3/+3
|\ \ \ \ \
| * | | | | Remove oslo.utilsMonty Taylor2020-10-121-3/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oslo things are really server-side oriented and are heavy-weight for client things. Remove oslo.utils and just use iso8601 and importlib directly. It's not actually a bad library, but pulling it and its other deps in just for a couple of wrapper methods is a bit much here. oslo.i18n, fwiw, is lightweight and helpful. Change-Id: I463993170c03a1d98c47ab6a3c19131b7fca1099
* | | | | Merge "Add an error message when server bind floating IP"Zuul2020-10-131-8/+40
|\ \ \ \ \
| * | | | | Add an error message when server bind floating IPyanpuqing2020-10-121-8/+40
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we add a floating IP for the server with no fixed IP, CLI doesn't report an error and nothing happens. The patch adds an error message when the server which don't have fixed IP bind floating IP. Change-Id: I400f2bab08521bb7fa443d87c7f45cc79eb80694 Task: 27941 Story: 2004346
* | | | | Merge "Compute: Add tag support for server add network"Zuul2020-10-131-0/+56
|\ \ \ \ \
| * | | | | Compute: Add tag support for server add networktianhui2020-10-121-0/+56
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I31a66b2d4dac44052a71f43a5a67836247ccac64 Story: 2002195 Task: 21678
* | | | | Merge "Compute: Add tag support for server add port"Zuul2020-10-131-0/+53
|\ \ \ \ \
| * | | | | Compute: Add tag support for server add porttianhui2020-10-121-0/+53
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ice6bf5fb57afeb10862c870b42732dcf166772d1 Story: 2002195 Task: 21676
* | | | | Merge "Add server migration list CLI"Zuul2020-10-122-0/+574
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add server migration list CLIzhangbailin2020-09-242-0/+574
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Add ``openstack server migration list`` to fetch server migrations. Part of blueprint add-user-id-field-to-the-migrations-table Change-Id: I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20
* | | | Merge "Remove usage of six"Zuul2020-10-092-11/+9
|\ \ \ \ | |_|/ / |/| | |
| * | | Remove usage of sixsongwenping2020-10-072-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With python3.x, classes can use 'metaclass=' instead of 'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can be replaced by 'items' and 'keys', 'six.moves.urllib.parse' can be replaced by 'urllib.parse', 'six.StringIO' and 'six.moves.cStringIO' can be replaced by 'io.StringIO', 'six.text_type' and 'six.string_type' are just 'str'. Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
* | | | Merge "Add 'openstack server create --use-config-drive'"Zuul2020-10-091-2/+3
|\ \ \ \ | |/ / / |/| | |
| * | | Add 'openstack server create --use-config-drive'Stephen Finucane2020-07-221-2/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite what the help text for this options says, the nova API only accepts boolean values for this value and has done so since at least the introduction of the 2.1 microversioned API. While it would be nice to convert '--config-drive' to a boolean flag, we'd need to be able to retain temporary support for people passing arguments. 'nargs=?' [1] looks promising but it has an annoying tendency to swallow a positional argument following it [2]. Since that is not an option, we have to live with a new config option, '--use-config-drive' and a '--no-config-drive' counterpart. [1] https://docs.python.org/3/library/argparse.html#nargs [2] https://bugs.python.org/issue9338 Change-Id: If9cce0ad4094cc9cef1c9136b80c3b0f35a82c7a Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: #2005468 Task: #30547
* | | Merge "Fix --image-property option in 'create server'"Zuul2020-10-011-0/+59
|\ \ \
| * | | Fix --image-property option in 'create server'Myeongchul Chae2020-09-101-0/+59
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a problem that the '-image-property' option, which can be used to create an instance, did not work as intended. I found that there were two problems with this option. First, I cannot select an image as its metadata. The second is that when there are multiple images available, the desired image may not be selected depending on the situation. This patch solves these two problems. I wrote the test case with these two problems considered together. Change-Id: Ib2745d7e067056ff4ca8bfaf6cff492d0dacb73a story: #2007860
* | | Merge "Add API check for server_groups.create"Zuul2020-09-301-0/+22
|\ \ \
| * | | Add API check for server_groups.createLewis Denny2020-08-261-0/+23
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policies field has been replaced with the policy field since Nova API version 2.64[1] This commit adds a check to make sure the correct field is used. [1]https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id59 Change-Id: I06d3211937d822c26070b7f8ad757c365dcbb1bb Story: #2007822 Task: #40101
* | | Merge "Add API check for server_groups.list"Zuul2020-09-302-2/+131
|\ \ \
| * | | Add API check for server_groups.listLewis Denny2020-08-212-2/+131
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policies parameter has been replaced with the policy parameter since Nova API version 2.64[1] This commit adds a check to make sure the correct parameter is used. [1]https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id59 Change-Id: Ia37beb7790884d6d15bec45074f446e64af1a2aa Story: #2008041 Task: #40703
* | | Merge "Show words indicating booted from volume for server image"Zuul2020-09-301-4/+4
|\ \ \
| * | | Show words indicating booted from volume for server imagemelanie witt2020-08-271-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a server booted from a volume, nova API does not store an image_id and instead returns an empty string. Currently, openstackclient similarly shows an empty string for Image Name and Image ID for servers booted from volumes. To aid CLI users in understanding the meaning of no image_id, we can display the string "N/A (booted from volume)" in the image field if the server was booted from a volume. Change-Id: I9c62cf6fe23b2e934dcbf5ebbf706b2705d2e424
* | | Merge "Output correct json for security groups in 'openstack server show'"Zuul2020-09-251-0/+3
|\ \ \ | |_|/ |/| |
| * | Output correct json for security groups in 'openstack server show'jay2020-09-141-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Fixes incorrect json output for 'openstack server show -f json'. The security group json output groups all the json as one for e.g. "security_groups": "name='group1'\nname='group2'" The correct output should be "security_groups" : [{"name" : "group1"}, {"name" : "group2"}] properties and volumes_attached fields also has similar issue. Story: 2007755 Change-Id: I1b1cac716329e0530400aff782c08000b21d8e1d
* | Allow openstack flavor set to update flavor description using nameGabriel Ramirez2020-06-101-0/+36
|/ | | | | | | | | | | Modified take_action() method for SetFlavor to use flavor id instead of flavor name when setting description Closes-Bug: #1844708 Story: #2007781 Task: #40019 Change-Id: If6798c89fef4c9feb4ebb460722b891f5655037d
* Correct image lookup during server rebuildAdam Harwell2020-05-041-0/+36
| | | | | | | | | | | | The switch to using glance from the SDK accidentally used get_image directly during a server rebuild, when it should have used find_image to match existing functionality. Bug introduced in: I36f292fb70c98f6e558f58be55d533d979c47ca7 Change-Id: I2005bd40a1bd6719670c7f7854316b4f9801b140 Story: 2007620 Task: 39643
* Switch image to use SDKArtem Goncharov2020-03-233-85/+81
| | | | | | | | | | | | | This is a work to switch OSC from using glanceclient to OpenStackSDK. With this change only v2 is using OpenStackSDK. V1 is still using glanceclient and will be switched in a separate change. Remove the direct depend on keystoneauth- let that flow through openstacksdk. Depends-on: https://review.opendev.org/#/c/698972 Change-Id: I36f292fb70c98f6e558f58be55d533d979c47ca7
* Stop silently ignoring invalid 'server create --hint' optionsStephen Finucane2020-02-031-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The '--hint' option for 'server create' expects a key-value pair like so: openstack server create --hint group=245e1dfe-2d0e-4139-80a9-fce124948896 ... However, the command doesn't complain if this isn't the case, meaning typos like the below aren't indicated to the user: openstack server create --hint 245e1dfe-2d0e-4139-80a9-fce124948896 Due to how we'd implemented this here, this ultimately results in us POSTing the following as part of the body to 'os-servers': { ... "OS-SCH-HNT:scheduler_hints": { "245e1dfe-2d0e-4139-80a9-fce124948896": null } ... } Which is unfortunately allowed and ignored by nova due to the use of 'additionalProperties' in the schema [1] Do what we do for loads of other options and explicitly fail on invalid values. This involves adding a new argparse action since none of those defined in osc-lib work for us. This is included here to ease backporting of the fix but will be moved to osc-lib in a future patch. [1] https://github.com/openstack/nova/blob/19.0.0/nova/api/openstack/compute/schemas/servers.py#L142-L146 Change-Id: I9e96d2978912c8dfeadae4a782c481a17cd7e348 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: #2006628 Task: #36840 Related-Bug: #1845322
* Raise flake8-import-order version to latestSean McGinnis2020-01-1013-19/+20
| | | | | | | | | | | 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>
* Provide stderr in exception when check_parser failsMatt Riedemann2019-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | For negative tests that are asserting an argparse failure it would be useful to assert the specific reason for the failure in the test rather than just getting an exception, especially to avoid false positives in the tests when what is being tested and failing isn't the actual expected reason for the failure. This wraps the check_parser code that parses the args and mocks sys.stderr so we can trap that output and put it in the exception message that gets raised to the test. As a result, we can tighten up a test that was passing before for the wrong reason [1]. [1] https://review.opendev.org/#/c/673725/12/openstackclient/tests/unit/compute/v2/test_server.py@605 Change-Id: I0f1dc1215bdfb3eba98ccaf66a0041d220b93812
* Microversion 2.79: Add delete_on_termination to volume-attach APIzhangbailin2019-11-191-0/+172
| | | | | | | | | | | | | Added ``--disable-delete-on-termination`` and ``--enable-delete-on-termination`` options to the ``openstack server add volume`` command that enables users to mark whether to delete the attached volume when the server is destroyed. Depends-On: https://review.opendev.org/#/c/681267/ Part of blueprint support-delete-on-termination-in-server-attach-volume Change-Id: I6b5cd54b82a1135335a71b9768a1a2c2012f755b
* 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 "Bump hacking version"Zuul2019-08-281-1/+1
|\
| * Bump hacking versionStephen Finucane2019-08-271-1/+1
| | | | | | | | | | | | | | | | 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
|\ \ \ | | |/ | |/|