summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Refactor TestVolumeCreate to use FakeVolume"2.1.0Jenkins2016-02-041-67/+66
|\
| * Refactor TestVolumeCreate to use FakeVolumexiexs2016-02-021-67/+66
| | | | | | | | | | | | | | | | Class FakeVolume should be used in volume tests. Change-Id: Idf7d3e2a0654cd7d7993f169c4743b1d38902f1b Implements: blueprint improve-volume-unittest-framework Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
* | Merge "Support listing network availability zones"Jenkins2016-02-042-0/+118
|\ \
| * | Support listing network availability zonesRichard Theis2016-02-022-0/+118
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "os availability zone list" command to support listing network availability zones along with the currently listed compute and volume availability zones. This adds the --network option to the command in order to only list network availability zones. By default, all availability zones are listed. The --long option was also updated to include a "Zone Resource" column which is applicable to network availability zones. Example zone resources include "network" and "router". If the Network API does not support listing availability zones then a warning message will be issued when the --network option is specified. This support requires an updated release of the SDK in order to pull in [1]. [1] https://bugs.launchpad.net/python-openstacksdk/+bug/1532274 Change-Id: I78811d659b793d9d2111ea54665d5fe7e4887264 Closes-Bug: #1534202
* | Merge "Allow wait_for_delete to work for all clients"Jenkins2016-02-041-0/+22
|\ \
| * | Allow wait_for_delete to work for all clientsMark Vanderwiel2016-01-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the exception and error status strings to be passed in such that other plugins can make use of this function. There is a comment in find_resource: The exception to catch here is dependent on which client library the manager passed in belongs to. Eventually this should be pulled from a common set of client exceptions. Since I think that is a long ways off, this change will work now and also work when a common exception is defined and used. Change-Id: Iab56cd1166028caed4f1e657e0b1ee81af3f48d8
* | | Merge "Fix wrong type of volume attachments in FakeVolume"Jenkins2016-02-031-2/+3
|\ \ \
| * | | Fix wrong type of volume attachments in FakeVolumeTang Chen2016-02-021-2/+3
| | |/ | |/| | | | | | | | | | | | | The volume attachments should be a list of dict, not a single dict. Change-Id: I3cec62bcb3953e4f38f9d3dd23f3eb6ef984464c
* | | Merge "Refactor security group delete to use SDK"Jenkins2016-02-033-0/+280
|\ \ \
| * | | Refactor security group delete to use SDKRichard Theis2016-02-023-0/+280
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the 'os security group delete' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set introduces a new NetworkAndComputeCommand class to be used for commands that must support neutron and nova network. The new class allows both the parser and actions to be unique. The current DeleteSecurityGroup class is now a subclass of this new class and has moved under the network v2 commands. This patch set also introduces a new FakeSecurityGroup class for testing security groups. And finally, this patch set updates the command documentation for security group and security group rule to indicate that Network v2 is also used. Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537 Partial-Bug: #1519511 Related-to: blueprint neutron-client
* | | Merge "Network: Abstract get_body() out to be a private helper."Jenkins2016-02-032-9/+11
|\ \ \
| * | | Network: Abstract get_body() out to be a private helper.Tang Chen2016-02-022-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_body() is needed in each network files to construct a dict to pass to sdk proxy. And it is also used by several functions in each file. So define it as a file level private helper function. The unified prototype should be: def _get_attrs(client_manager, parsed_args): 1. The name, in sdk, the parameter passed to proxy is named "attrs". And it is a private method. So let's call it _get_attrs(). 2. The parameters, besides parsed_args, when we deal with project and project_domain, we have to make use of identity_client. So let's pass in the client manager. Change-Id: Ib044ebd4ddedbcd805f46334a7fe99e4ebb5b249
* | | | Merge "Add "os port show" command"Jenkins2016-02-033-4/+134
|\ \ \ \
| * | | | Add "os port show" commandRichard Theis2016-02-023-4/+134
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Add "os port show" command. Change-Id: Id87c81640e74c60ae8f247c722c64fdadff022a2 Partial-Bug: #1519909 Partially-Implements: blueprint neutron-client
* | | | Merge "Add availability zone support for router commands"Jenkins2016-02-032-0/+30
|\ \ \ \
| * | | | Add availability zone support for router commandsJas2016-01-292-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the adding of availability_zone_hints during router create. Also allows for the display of availability_zones during list and and show commands. Change-Id: Ifbc5c218bc7103d28076d726212ce25321bcf7f1 Partial-bug: #1519503 Partially-implements: blueprint neutron-client
* | | | | Merge "Add --marker option to "image list" command"Jenkins2016-02-031-0/+21
|\ \ \ \ \
| * | | | | Add --marker option to "image list" commandTang Chen2016-02-031-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users could specify the last image (name or ID) of the previous page with --marker option to control the start image of the output. Change-Id: Idca0235ee83b1226b00c89cf3d38500fa898b7d0 Closes-Bug: #1540988
* | | | | | Merge "Add limit option to "image list" command"Jenkins2016-02-031-0/+17
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Add limit option to "image list" commandxiexs2016-02-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option is quite useful if there are too many images. Change-Id: If6a901c27c5da2d1f4412e8fa9ba3bed3b72fdd9 Co-Authored-By: Tang Chen <chen.tang@easystack.cn> Partial-Bug: #1540988
* | | | | | Merge "Remove marker and loop from "image list" command"Jenkins2016-02-031-15/+4
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Remove marker and loop from "image list" commandTang Chen2016-02-031-15/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since --page-size has never worked, there is no paginate logic needs to be implemented in "image list" command. So remove the unnecessary loop. And also, the marker is not necessary because --marker option has not been implemented. Will add it back when implementing --marker option. Change-Id: I71fea1502f92f447a49697edb52e8e82f336772f Partial-Bug: #1540988
* | | | | Trivial: Reorder test class in test_volume.py into alphabetical orderTang Chen2016-02-031-41/+41
|/ / / / | | | | | | | | | | | | | | | | | | | | TestVolumeDelete should be after TestVolumeCreate. Change-Id: I764543a0e0723633aec6b18c2d50a01931465e6b
* | | | Trivial: Fix wrong comment in test_image.pyTang Chen2016-02-021-1/+3
| |/ / |/| | | | | | | | | | | | | | Code in test_image.py has nothing to do with server. Change-Id: Ia73d7b99effb394c5db9635fee6da350b0b1086b
* | | Fix showing network quotas for a projectRichard Theis2016-02-022-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenStack SDK is now used for the network client. However, the 'openstack quota show' command wasn't updated for the client change. As a result, the command will fail to show network quotas when a project name is specified. For example: $ openstack quota show admin 'Proxy' object has no attribute 'show_quota' This patch set fixes the command by using the OpenStack SDK to get network quotas for a project. Change-Id: I59a7b6780a7b80cd09e79d40d214751b25d3016e Related-To: blueprint neutron-client Closes-Bug: #1528249
* | | Merge "Add availability zone support for network commands"Jenkins2016-01-312-2/+25
|\ \ \ | |_|/ |/| |
| * | Add availability zone support for network commandsBrad Behle2016-01-282-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add --availability-zone-hint parm to network create. Also add availability_zones and availability_zone_hints to the network list and network show commands Change-Id: Ib4dc2e3e7897939be7bef6b25a095c8222b885bc Partially-implements: blueprint neutron-client
* | | Merge "Use correct terminology for subnets"Jenkins2016-01-271-2/+2
|\ \ \
| * | | Use correct terminology for subnetsDean Troyer2016-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenStack uses 'CIDR' incorrectly in many places. We are not going to perpetuate that usage. The correct name here is simply 'subnet' as the data is the network address for the subnet, in CIDR notation. Also, some additional cleanups as suggested in comments to https://review.openstack.org/#/c/84782 Depends-on: I3c0748074a6511ff92500516b3129886d2476eed Change-Id: Ib44c49dc1739ce7d881432e482dd16f8928eef49
* | | | Merge "Subnet List"Jenkins2016-01-272-0/+176
|\ \ \ \ | |/ / /
| * | | Subnet ListTerry Howe2016-01-252-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subnet list command Partially implements: blueprint neutron-client Partial-Bug: #1523258 Change-Id: I3c0748074a6511ff92500516b3129886d2476eed
* | | | Merge "Refactor abstract columns and datalist out in image and object test ↵Jenkins2016-01-236-171/+106
|\ \ \ \ | | | | | | | | | | | | | | | cases"
| * | | | Refactor abstract columns and datalist out in image and objectSaiKiran2016-01-236-171/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test cases columns and datalist has been set in each test case in image and object which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: Ie6aa3fa27ab2a468c67da31209107517259631c2 Related-Bug: 1532384
* | | | | Merge "Support listing volume availability zones"Jenkins2016-01-222-10/+143
|\ \ \ \ \
| * | | | | Support listing volume availability zonesRichard Theis2016-01-142-10/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "os availability zone list" command to support listing volume availability zones along with the currently listed compute availability zones. This adds a --compute and --volume option to the command in order to select the availability zones to list. By default, all availability zones are listed. If the Block Storage API does not support listing availability zones then an warning message will be issued. Change-Id: I8159509a41bd1fb1b4e77fdbb512cf64a5ac11a9 Closes-Bug: #1532945
* | | | | | Merge "Refactor "os availability zone list""Jenkins2016-01-222-0/+175
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Refactor "os availability zone list"Richard Theis2016-01-142-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the "os availability zone list" command to make it a common command instead of a compute-only command. Since availability zones are common to compute, volume and network (new), this refactoring allows availability zone support to be added for volume and network. In addition to the refactor, unit and functional tests were added. Change-Id: I63e9d41d229b21cd38e5a083493042c096d65e05 Partial-Bug: #1532945
* | | | | Merge "Refactor: Abstract columns and datalist out in volume test cases"Jenkins2016-01-227-603/+226
|\ \ \ \ \
| * | | | | Refactor: Abstract columns and datalist out in volume test casesSaiKiran2016-01-207-603/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | columns and datalist has been set in each test case in volume, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I3a09d5d2db86da986bdcfbf2310978ced181017d
* | | | | | Merge "Change --owner to --project in image commands"Jenkins2016-01-212-8/+64
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Change --owner to --project in image commandsDean Troyer2016-01-152-8/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * image create and image set now use --project to specify an alternate project to own the image * --owner is still silently accepted but deprecated, add warning messages * --project and --owner are mutually exclusive to prevent precedence issues Closes Bug: 1527833 Change-Id: Iccb1a1d9175ef9b5edcd79d294607db12641c1f0
* | | | | | Refactor abstract columns and datalist out in compute test casesSaiKiran2016-01-213-167/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | columns and datalist has been set in each test case in compute, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I5e8423722416ea31fdced4c932ed141de90028ab Closes-Bug: #1531816
* | | | | | Merge "Set up logger of each command by metaclass"Jenkins2016-01-211-0/+32
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Set up logger of each command by metaclassAkihiro Motoki2016-01-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compute.v2.flavor is changed in this commit as an initial example. Partial-Bug: #1532294 Change-Id: I262af6ade0ae03fbe1cd2ad198faf4ebb4ecf7ce
* | | | | | Add support to delete the portsSaiKiran2016-01-202-0/+130
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "port delete" command to osc. Change-Id: I5c92b2f573249df4e6551506584ccafb4ff290b2 Implements: blueprint neutron-client Partial-Bug: #1519909
* | | | | Merge "Make --image parameter optional in "server rebuild""Jenkins2016-01-151-0/+70
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Make --image parameter optional in "server rebuild"David Moreau Simard2015-12-111-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command will now default to the image currently in-use by the server, effectively making the --image parameter optional. This commit also adds basic tests for ServerRebuild since there wasn't any. Will add more full tests for it. Change-Id: I733fd3ad5a825f06563c72aa430122e1a0e3b3b0 Closes-bug: #1524406 Co-Authored-By: David Moreau Simard <dms@redhat.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
* | | | | Merge "Changed the abstract columns and datalists from test cases of common ↵Jenkins2016-01-1419-814/+562
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | and Identity"
| * | | | Changed the abstract columns and datalists from test cases of common and ↵SaiKiran2016-01-1219-816/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Identity columns and datalist has been set in each test case in compute, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I45a3582088161f12e60e7c933da8e7dcc0ae8e7b Closes-Bug: #1532384
* | | | | Merge "Refactor network endpoint enablement checking"Jenkins2016-01-142-1/+46
|\ \ \ \ \ | |_|_|_|/ |/| | | |