summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Expose flag for forcing use of import for images"Zuul2020-07-081-0/+22
|\
| * Expose flag for forcing use of import for imagesMonty Taylor2020-06-301-0/+22
| | | | | | | | | | | | | | | | | | | | openstacksdk added support for using image import as a fallback which is transparently supported here, but also provides an override flag to allow a user to force use of import. Expose that here. Depends-On: https://review.opendev.org/737608 Change-Id: Ied938a8f63f305305a20ace42e9f4c84b0a5c00e
* | Merge "Add '--force; parameter to 'openstack quota set'"Zuul2020-07-061-0/+50
|\ \
| * | Add '--force; parameter to 'openstack quota set'hackertron2020-04-141-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | The compute service allows us to to force set a quota, setting a quota value that is less than the amount of the resource currently consumed. Expose this feature by way of a '--force' boolean parameter. Change-Id: I1d1ac1ac46f49f64794ffc8631e166935537966c
* | | Merge "Allow os quota list query to filter by project"Zuul2020-06-291-0/+69
|\ \ \
| * | | Allow os quota list query to filter by projectJose Castro Leon2020-03-121-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the os quota list command, project parameter is completely ignored ending up in a request to all projects and then all quotas. This patch enables back the parameter and does a single call to quotas if specified. Change-Id: Ie17c256e2bdc307dcd94ad5be7abdbffa776d369 Story: 2007422 Task: 39043
* | | | Merge "port: add --host to list command"Zuul2020-06-261-0/+16
|\ \ \ \ | |_|_|/ |/| | |
| * | | port: add --host to list commandMohammed Naser2020-06-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an option to allow filtering ports bound to a specific host when listing them. Change-Id: I747ed0f8b070074c51789576a158345f670fe733
* | | | Merge "Remove os-client-config references"Zuul2020-06-111-16/+4
|\ \ \ \
| * | | | Remove os-client-config referencesMonty Taylor2020-06-081-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've depended on openstacksdk for config for ages now, clean up after ourselves and stop installing it in tests. Change-Id: I66b3ec2a36bc462d2f1ac151e95ccbdc946076b8
* | | | | Merge "Make container list --all work"Zuul2020-06-091-30/+30
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Make container list --all workPete Zaitcev2020-05-161-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller in openstackclient/object/v1/object.py passed a keyword argument full_listing, but the eventual callee container_list() expected all_data. So, --all did not work at all. The issue passed undetected because --all did not have a test, so we added a unit test. In addition, exisiting tests were using a test set that did not look like the real container listing, so we changed LIST_CONTAINER_RESP to be realistic. Change-Id: Id0604bcab25892e43c26cd6656b2b2eef5daa69b
* | | | | Replace assertItemsEqual with assertCountEqualAlfredo Moralejo2020-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assertItemsEqual was removed from Python's unittest.TestCase in Python 3.3 [1][2]. We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 Change-Id: I1ad0da8deda3a8cbec384b5a9c88860a526eb48c
* | | | | Client should parse string to boolean for value 'is_domain'yanpuqing2020-05-291-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we use "--property" parameter, client get lists these the value is string type, but the type of the value 'is_domain' should be boolean, so we should judge it and parse it. The patch parse string to boolean for value 'is_domain'. Co-Authored-By: Lance Bragstad <lbragstad@gmail.com> Change-Id: I37c9eb854524bde3a1530bfe2e3a03810fb1a676 Task: 30039 Story: 2005246
* | | | | Merge "Resolve PEP8"Zuul2020-05-151-1/+1
|\ \ \ \ \
| * | | | | Resolve PEP8Pete Zaitcev2020-05-141-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No idea how this happened, but reviews started failing the pep8 gate job. The failures are legitimate, see the commit. I guess the pep8 tests became smarter and found these issues. Change-Id: Id9a0dad644134dafd68eed37fe8f41c583d7a619
* | | | | 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
* | | | Merge "Revert "Disallow setting default on internal network""Zuul2020-04-221-33/+0
|\ \ \ \
| * | | | Revert "Disallow setting default on internal network"Vasyl Saienko2020-04-081-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original patch assumes that both --external and --is-default are set in the same request and broke case when --is-default is set as an network update. The validation logic have to be moved on API side to avoid extra API calls from openstackclient. This reverts commit 962efd949feb461283a9bb4a668fbd310f80ba40. Related-Bug: #1745658 Change-Id: Idf08abb0e08a6880f89c3e9df9dd2ac82f36c432
* | | | | Merge "Use unittest.mock instead of third party mock"Zuul2020-04-171-1/+1
|\ \ \ \ \
| * | | | | Use unittest.mock instead of third party mockSean McGinnis2020-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: Ibd39328c27b68190e2edbf1f52fcea52db3ae791 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | | | | Merge "Add resource option immutable"Zuul2020-04-173-9/+424
|\ \ \ \ \ \
| * | | | | | Add resource option immutableVishakha Agarwal2020-04-083-9/+424
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the --immutable and --no-immutable option to the role, project and domain CLI. Related-Patch: https://review.opendev.org/#/c/712182/ Change-Id: I9c3bdd741f28bf558267fb217818d947597ce13e
* | | | | | Merge "Add 'subnetpool' type support to rbac commands"Zuul2020-04-151-0/+4
|\ \ \ \ \ \
| * | | | | | Add 'subnetpool' type support to rbac commandsIgor Malinovskiy2020-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id6e528ebd1bf21ca142e60052d28371f97f629ac Partial-Bug: #1862032 Depends-On: https://review.opendev.org/710755
* | | | | | | Merge "Add 'address_scope' type support to network rbac commands"Zuul2020-04-101-47/+23
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Add 'address_scope' type support to network rbac commandsIgor Malinovskiy2020-03-261-47/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6a4b7219934805c1bbd1e88fcc670ae231d9ac37 Partial-Bug: #1862968 Depends-On: https://review.opendev.org/709122
* | | | | | | Merge "Support for stateless security groups"Zuul2020-04-082-0/+11
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | Support for stateless security groupsTom Stappaerts2020-03-312-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for stateful attribute of security groups, using --stateful and --no-stateful flag on security group. This allows a user to create security groups with stateful false. Change-Id: Ifd20b5fc47fd0ea0bb5aeda84820dcc0fb1e8847 Blueprint: stateless-security-groups Depends-On: https://review.opendev.org/711513/
* | | | | | | Add description field to portforwarding NAT rulespedro2020-04-022-1/+15
| |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the `description` field to Floating IP Port Forwardings Depends-On: https://review.opendev.org/#/c/705038/ Change-Id: I6477368e32570c96cacddba4f86455262e533277 Implements: blueprint portforwarding-description Closes-Bug: #1850818
* | | | | | Merge "Add command: router add/remove route --route"Zuul2020-04-011-0/+140
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Add command: router add/remove route --routeBence Romsics2020-03-301-0/+140
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add commands to osc to call the two new API methods introduced by new Neutron extension: extraroute-atomic. Bump our openstacksdk requirement to >=0.38.0 which contains the corresponding sdk change. The lower-constraints of dogpile.cache and keystoneauth1 are bumped because of requirements bumps in openstacksdk. The lower-constraint of decorator is bumped because of problem already fixed by amotoki here: https://review.opendev.org/701706 Change-Id: Ia9b9c216f1d1161ebedac31594a2c464d77f4ae2 Depends-On: https://review.opendev.org/674324 Partial-Bug: #1826396 (rfe) Related-Change: https://review.opendev.org/655680 (spec)
* | | | | Adding options to user cliVishakha Agarwal2020-03-262-0/+855
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User options [1] can be set by making POST and PATCH request for /v3/users API calls but cannot by openstack CLI because of no user options defined in create and update user CLI [2]. This patch adds the user options [1] in create user and update user CLI. [1] https://docs.openstack.org/keystone/latest/admin/resource-options.html#multi-factor-auth-rules [2] https://docs.openstack.org/api-ref/identity/v3/#create-user Change-Id: I4e41bae2e8cfbe92d52b14d856991bedcd44164f
* | | | Merge "Complete switch from glanceclient to SDK for image service"Zuul2020-03-252-111/+72
|\ \ \ \
| * | | | Complete switch from glanceclient to SDK for image serviceArtem Goncharov2020-03-242-111/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://review.opendev.org/#/c/650374/ a work has been started to switch image service support from glanceclient with all it's dependencies to the SDK version. With this change version 1 (anyway deprecated since ages) is also being switched to SDK. Change-Id: Ic391500af02a73d81d64a9e9113cca85c9e24390
* | | | | Merge "Switch image to use SDK"Zuul2020-03-256-367/+378
|\ \ \ \ \ | |/ / / /
| * | | | Switch image to use SDKArtem Goncharov2020-03-236-367/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "Add unit tests and release note for dns_publish_fixed_ip"Zuul2020-03-241-0/+38
|\ \ \ \ \
| * | | | | Add unit tests and release note for dns_publish_fixed_ipDean Troyer2020-01-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to https://review.opendev.org/#/c/679834/ which added the options and lacked both a release note and minimal option-handling unit tests. Change-Id: Ibb2820add9b2fedaf5a8b1a77babf043f6641724 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | | Merge "Add "fields" parameter to ListSecurityGroup query"Zuul2020-03-241-5/+12
|\ \ \ \ \ \
| * | | | | | Add "fields" parameter to ListSecurityGroup queryRodolfo Alonso Hernandez2020-03-121-5/+12
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new query parameter will allow to send a query sending the "fields" parameter. This "fields" parameter contains the needed API fields, translated into OVO fields in Neutron server, that require to be retrieved from the DB. As commented in the related bug, the OSC "list" command only prints five parameters, none of them the security group rules. In systems with a reasonable amount of security groups, skipping the unnecessary rule load can save a lot of time. Depends-On: https://review.opendev.org/#/c/710820/ Change-Id: I16f48e292997d029d68f66365db949b9f4b5a0c8 Closes-Bug: #1865223
* | | | | | Merge "Fix network segment range "_get_ranges" function"Zuul2020-03-231-0/+14
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Fix network segment range "_get_ranges" functionRodolfo Alonso Hernandez2020-03-231-0/+14
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function should return an ordered set of ranges based on an unordered list of numbers (int or str). Change-Id: I918c8befc51236cc33d96a5c88fb6eafdd143e9c Story: 2007341 Task: 38878
* | | | | Merge "Now we can add description for role creation in OSC"Zuul2020-03-202-0/+80
|\ \ \ \ \
| * | | | | Now we can add description for role creation in OSCM V P Nitesh2018-09-182-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now user can add the description when user create's the role using OSC ``openstack role create`` command. User can add the description by adding `--description <Description>` to OSC ``openstack role create`` command. Co-Authored-By: Deepak Mourya<deepakmoriya7@gmail.com> Change-Id: I858e004c3b29c687b6a39c8a1ed5fb029eb19c67 Depends-on: I230af9cc833af13064636b5d9a7ce6334c3f6e9a Closes-Bug: #1669080
* | | | | | Allow setting floating IP descriptionDaniel Strong2020-03-181-0/+26
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If664bfe3c9fdcb69c7046eb16c5d32602d1b3262 Story: 2007439 Task: 39094
* | | | | Merge "Add storage policy option to create container command"Zuul2020-03-132-0/+74
|\ \ \ \ \
| * | | | | Add storage policy option to create container commandSimon Merrick2020-02-192-0/+74
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Add CLI option to specify swift storage policy + Add CLI flag to specify container uses public read ACLS + Show storage policy in container show data Change-Id: I08ffa0d98bd39d467aa415771675f59bd77768ff
* | | | | Merge "Add qos_network_policy_id to network port tests"Zuul2020-03-132-0/+3
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Add qos_network_policy_id to network port testsRodolfo Alonso Hernandez2020-02-182-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added "qos_network_policy_id" to "port show" command. Because this is just a read-only parameter and is read from the SDK port definition, this patch only modifies the corresponding tests. This patch is adding this new parameter to the test bench. Change-Id: Ice7423e0e0b98a39cc36622b70eae5a8493a037c Closes-Bug: #1851362