summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Support "--no-property" option in volume snapshot set"Jenkins2017-01-262-5/+71
|\
| * Support "--no-property" option in volume snapshot setzhiyong.dai2017-01-252-5/+71
| | | | | | | | | | | | | | | | | | | | | | Supporting "--no-property" option will apply user a convenient way to clean all properties of volume snapshot in a short command, and this kind of behavior is the recommended way to devref. The patch adds "--no-property" option in "volume snapshot set" command, and update related test cases and devref document. Change-Id: I5f10cc2b5814553699920c4343995b2e11416e4e Implements: blueprint allow-overwrite-set-options
* | Merge "Add options to "server list" command"Jenkins2017-01-261-0/+46
|\ \
| * | Add options to "server list" commandjiahui.qiang2017-01-251-0/+46
| | | | | | | | | | | | | | | | | | | | | Add "--deleted" and "--changes-since" options to "server list" command. Change-Id: Id94f6e5831a60b172b6cfcfca29b1d89de8db621 Closes-Bug:#1647242
* | | Merge "Switch server create to block_device_mapping_v2"Jenkins2017-01-261-9/+14
|\ \ \
| * | | Switch server create to block_device_mapping_v2Nikita Gerasimov2017-01-261-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current compute_client.servers.create() relies on block_device_mapping arg which is legacy[1]. "block_device_mapping" format require device_name which is leads to hard-coded hack in --volume key handler to KVM specific. "block_device_mapping_v2" format is more friendly to hypervisiors. Support of block_device_mapping_v2 appear in python-novaclient 2.16.0, openstackclient require at least 2.29.0 Makes options --volume and --block-device-mapping work simultaneously. Appends --block-device-mapping data even if --volume used. After bug 1383338 only --volume was taken when both are used. [1]http://docs.openstack.org/developer/nova/block_device_mapping.html NOTE(dtroyer): I moved the new test_boot_from_volume() functional test to Ie51b1c375c5940856ec76a5770df3c6bd18a3eba to test our previous behaviour. The only changes required to support the new behaviour should be that the empty_volume is now attached in that test. Change-Id: I7bac3d870dd9ca404093142f8bce22a62e49180d Closes-Bug: 1647406 Closes-Bug: 1497845
* | | | Merge "Adds domain specification for SetUser"Jenkins2017-01-261-0/+36
|\ \ \ \ | |/ / / |/| | |
| * | | Adds domain specification for SetUserSamuel Pilla2017-01-251-0/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to specify the domain context for making changes to a user with `--domain` flag. Example: $ openstack user set test_user --domain test_domain --enable Change-Id: I2b3241785c22e72e19181394acff650422299b0e Closes-Bug: #1658147
* | | Merge "To support '--project' and '--project-domain' options"Jenkins2017-01-261-0/+41
|\ \ \
| * | | To support '--project' and '--project-domain' optionsBadhmapriya Boopalan2016-12-231-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include '--project' and '--project-domain' filtering options to 'port list' command. Change-Id: Ic7deae348f737c754b2f3e2113bd76d71a442400 Closes-Bug: #1648087
* | | | Merge "Add meter rule to OSC"Jenkins2017-01-262-0/+367
|\ \ \ \
| * | | | Add meter rule to OSCAnkur Gupta2017-01-232-0/+367
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement network feature meter label rules into OpenStack Client. Allows for creation of rules to meter network traffic. Partially Implements: blueprint neutron-client-metering Change-Id: If18c078d7e80c122583417669f820f02c84d6237
* | | | Merge "Add 'allowed address pairs' option to 'port create/set/unset'"Jenkins2017-01-261-1/+193
|\ \ \ \
| * | | | Add 'allowed address pairs' option to 'port create/set/unset'Nguyen Phuong An2016-12-201-1/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds '--allowed-addres-pair' and '--no-allowed-address-pair' options to 'port create', 'port set' and 'port unset' commands. Partial-Bug: #1612136 Closes-Bug: #1638265 Partially-Implements: blueprint network-commands-options Co-Authored-By: Ha Van Tu <tuhv@vn.fujitsu.com> Change-Id: I08d2269950467a8972a0d0110ed61f5cc7f5ca45
* | | | | Merge "Add --project and --project-domain option to "volume snapshot list""Jenkins2017-01-251-1/+14
|\ \ \ \ \
| * | | | | Add --project and --project-domain option to "volume snapshot list"jiahui.qiang2017-01-071-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--project" and "--project-domain" option to volume v2's "volume snapshot list" command, it will filter list result by different project. Change-Id: I7dccd6d8d9f1889fa9cb0c2d04a42d77975c645b
* | | | | | Fix 'mapping set' return valueColleen Murphy2017-01-251-6/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, the command 'openstack mapping set <args>' will, upon success, print the rules for the updated mapping and exit with return code 1 (failure). This is a problem for scripts and config management tools that depend on the return code to validate whether the operation was successful, since even upon success the command returns a failing error code. Moreover, the behavior of printing the new value is completely unlike the behavior of any of the 'set' subcommands for other entities. This patch normalizes the 'mapping set' command by omitting any return value in the SetMapping take_action() method. This way the client will only exit with an error code if an exception is raised, and not upon normal operation. Change-Id: I610ec3b2fa7561072346d46e49cfc1ae82130e0d
* | | | | Use image client for images instead of computeArtom Lifshitz2017-01-241-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the deprecation of the Nova proxy APIs in microversion 2.36 [1], any operation that uses a microversion higher than 2.36 and works with images will fail because the /images endpoint will return 404. This patch updates openstackclient to query images using the image client in places where previously the compute client was used. [1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33 Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725 Closes-bug: 1630161
* | | | | SDK refactor: Prepare security group commandsAbhishek Raut2017-01-231-2/+2
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Prepare the OSC "security group" commands for the SDK refactor. Change-Id: If9918fad2474f9b4d68424f2806f0de61fd58b2e Partially-Implements: blueprint network-command-sdk-support
* | | | Merge "Error in the return of command 'volume qos create'"Jenkins2017-01-211-13/+15
|\ \ \ \
| * | | | Error in the return of command 'volume qos create'jiahui.qiang2017-01-171-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixed a 'volume qos create' display mistake in argument of 'specs'[1]. For command such as: $ openstack volume qos create hello [1]https://bugs.launchpad.net/python-openstackclient/+bug/1656767 Closes-bug:#1656767 Change-Id: Ia9fce833d318d9b52b97c12cfb89e2d3c5465fbe
* | | | | 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
* | | | SDK refactor: Prepare network agent commandsHuanxuan Ao2017-01-152-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare the OSC "network agent" commands for the SDK refactor. Partially-Implements: blueprint network-command-sdk-support Closes-bug: #1656542 Change-Id: I6745f5ffb04b009487e6cb36d1807dce9b248b4c
* | | | Fix floating IP delete and show by IPDean Troyer2017-01-142-19/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The floating IP delete and show commands did not work using IP addresses as the selector, only ID. The SDK floating_ip resource does not support but OSC does, so we have to do it ourselves. Now with more SDK 0.9.10 support! Change-Id: Iea1b57cded6b16a56a06af87ab8f1fa001a3485e Closes-bug: 1656402
* | | | fix functional tests for network agentsSteve Martinelli2017-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As of SDK v0.9.11 the get_agent method no longer supports the "ignore_missing" parameter. Change-Id: Id655bf8499ed1a102a6bf583927cf66139581ab0
* | | | Fix image member unit tests occasional failuresDean Troyer2017-01-121-20/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's try just unrolling the member status tests and not getting too fancy here. Change-Id: I30022ebd2da6d6cf1abba424d7d7fa679285f291
* | | | Fix Network QoS rule CLI attrs parsingRodolfo Alonso Hernandez2017-01-121-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to set zero values in the CLI parameters for Network QoS rule. Change-Id: Ie0e045ff4888615d68804fd739d5b995ca11e9a1 Closes-Bug: #1655947
* | | | Merge "Add unit test for multi volume types delete"Jenkins2017-01-122-5/+73
|\ \ \ \
| * | | | Add unit test for multi volume types deleteHuanxuan Ao2017-01-112-5/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing unit test for multi volume types delete in volume v2 (v1 has been done), this patch add it. Change-Id: I5fe67196408157f8bdfe6399ba1e559cea3dc559
* | | | | Merge "Add support for Network QoS rule commands"Jenkins2017-01-113-73/+1092
|\ \ \ \ \
| * | | | | Add support for Network QoS rule commandsRodolfo Alonso Hernandez2017-01-093-73/+1092
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added following commands: - network qos rule create --type minimum-bandwidth dscp-marking limit-bandwidth - network qos rule delete - network qos rule list - network qos rule set - network qos rule show Closes-Bug: 1609472 Depends-On: I2e8869750024a8ccbc7777b95fe8ef6e26ec0885 Depends-On: Ife549ff6499217ca65e2554be8ef86ea7866b2d8 Change-Id: Ib3e1951f0917f5f23c8d9e0a380d19da2b3af5f0
* | | | | | Merge "Add two consistency group commands"Jenkins2017-01-111-0/+206
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Add two consistency group commandszhiyong.dai2016-12-131-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add commands: consistency group add volume consistency group remove volume in volume v2 (v2 only) Change-Id: I70ff287d3b5df78196b8f4b9e50402c471aef284 Implements: bp cinder-command-support Closes-Bug: #1613964
* | | | | | Merge "Error handling for delete commands in identity"Jenkins2017-01-118-0/+231
|\ \ \ \ \ \
| * | | | | | Error handling for delete commands in identityHuanxuan Ao2017-01-038-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing multi deletion error handling for identity delete commands. All delete commands in identity support error handling now. Change-Id: I05626dcb5e516a423d610906347b02236ba7eeaf
* | | | | | | Merge "Add support for Glance 'update image members' feature"Jenkins2017-01-111-0/+33
|\ \ \ \ \ \ \
| * | | | | | | Add support for Glance 'update image members' featureJordan Pittier2017-01-041-0/+33
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds 3 new options to the "image set" command: --accept, --reject and --pending. This updates the membership status for an image. Closes-Bug: 1620481 Change-Id: I13b8c067aad68ece9ff636fbdd83bcb3663c91b2
* | | | | | | Merge "Fix filter error in os volume list"Jenkins2017-01-111-0/+117
|\ \ \ \ \ \ \
| * | | | | | | Fix filter error in os volume listjiahui.qiang2017-01-091-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixed a bug of unable to filter volume list by '--project', '--user' in "openstack volume list". Modify uint test for 'volume list' to check parameter of list method. Change-Id: I1fc4296c4c7eca0f7a803dbfd5e15e3bc0d6403f
* | | | | | | | Fix Octavia gate breakage caused by _get_columns()Nir Magnezi2017-01-091-0/+3
| |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The above mentioned function tries to extract keys() from an item which is type class. This patch fixes the issue by converting item to dict by using to_dict(). Change-Id: Ida520ae9fe64171d105f486ba06eda127a24547b Closes-Bug: #1654887
* | | | | | | Merge "OSC Network Meter"Jenkins2017-01-082-0/+349
|\ \ \ \ \ \ \
| * | | | | | | OSC Network MeterAnkur Gupta2017-01-012-0/+349
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Neutron feature of Metering into OpenStack Client. Meter Rules will be implemented in seperate patchset. Partially Implements: blueprint neutron-client-metering Change-Id: Ie82d42759504cbdb1c991c5183c1f0adf59e60fe
* | | | | | | Merge "Add options to allow filtering on agent list"Jenkins2017-01-081-0/+35
|\ \ \ \ \ \ \
| * | | | | | | Add options to allow filtering on agent listZhou Zhihong2017-01-051-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add options to allow filtering via --agent-type and --host on agent list Change-Id: I1800f0777aa92a76b4b95f64f8acc18454809e81 Closes-Bug: #1641868 Partially-Implements: blueprint network-commands-options
* | | | | | | | Merge "Fix "ip availability show" command"Jenkins2017-01-061-2/+8
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | |
| * | | | | | | Fix "ip availability show" commandHuanxuan Ao2017-01-061-2/+8
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDK refactor broken ip availability show functional test, We can not find a ip availability by network name but only network ID, so we find network and get the ID first, then find the ip availability by the network ID. Closes-Bug: 1653139 Change-Id: I246163fb875e2cdb9e5b091bac500a94268e8aa9
* | | | | | | Fix creating a private flavor with ID autoJens Rosenboom2017-01-051-3/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a private flavor is created with ID auto (=default) and a project is specified for it, instead of trying to add the project to the flavor called "auto" the ID of the newly created project should be used. Change-Id: I19f7a0ec26bd5d147f00ecba3312240e3601567e Closes-Bug: 1654221
* | | | | | Fixes image api URL endpoint for certain scenarioImtiaz Chowdhury2017-01-042-2/+2
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openstackclient fails to get image list when the image api endpoint has 'v2' substring in the URL. Instead of checking whether the api endpoint URL terminates with '/v2', the current logic is checking whether 'v2' appears anywhere in the endpoint string. This issue was discovered on a production setup where certain server names had 'v2' in their names. For example, when a hostname is gopher.dev20.com, the image list APIs fail. This commit updates the unit test to reflect this scenario. Without the change in openstackclient/api/image_v2.py, all the unit tests fail. Co-Authored-By: sergio.carvalho@workday.com Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d Closes-Bug: 1652827
* | | | | Merge "Add unit tests for usage commands in compute v2"Jenkins2016-12-262-0/+244
|\ \ \ \ \
| * | | | | Add unit tests for usage commands in compute v2jiahui.qiang2016-12-262-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests and fakes for command below in compute v2: usage list usage show Change-Id: Ie533e23375ca6b8ba4cb7e865d39fac652cc0195