summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Integ test cleanup"Jenkins2016-08-211-42/+91
|\
| * Integ test cleanupDean Troyer2016-08-181-42/+91
| | | | | | | | Change-Id: Ie58a7bec569421097e92a7ddf3cb164fc3f07413
* | Merge "Fix errors in volume set/unset image properties unit tests"Jenkins2016-08-191-3/+3
|\ \
| * | Fix errors in volume set/unset image properties unit testsHuanxuan Ao2016-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These errors may caused by copy-paste, we should specify a fake return value for get() method but not create() method. Create() mothod will not called in set/unset command. After specifing the return value of get(), we can use the fake volume in the assert. Change-Id: I1e0df4c28ece373168788c396e9082d565e36cc7
* | | Merge "Add support for domain specific roles"Jenkins2016-08-183-3/+336
|\ \ \ | |_|/ |/| |
| * | Add support for domain specific rolesHenry Nash2016-08-103-3/+336
| |/ | | | | | | | | | | | | A role entity can now be specified as domain specific. Closes-bug: #1606105 Change-Id: I564cf3da1d61f5bfcf85be591480d2f5c8d694a0
* | Merge "Add shell integration test"Jenkins2016-08-181-0/+561
|\ \
| * | Add shell integration testDean Troyer2016-08-181-0/+561
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These run next to unit tests, but unlike unit tests, they test the dependent libraries also. This is to detect incompatible breakage in those dependencies. The tests provide CLI-level input and verify the API calls being made via requests using requests_mock so the entire stack is tested. It is possible we want to run these separate from the unit tests. They do not belong in the functional tests as they do not require a functional cloud for testing. Depends-on: I426548376fc7d3cdb36501310dafd8c44d22ae30 Change-Id: I356956fcc4ff35191a6ad6a085b75cf370434b09
* | | Fix up last-minute imports to use osc-libDean Troyer2016-08-181-1/+2
| | | | | | | | | | | | Change-Id: I1ed2983cf574ebd565eeac4f8199fbc3a2e29c8e
* | | Merge "Gate-unbreaking combo review"Jenkins2016-08-182-74/+9
|\ \ \ | |/ /
| * | Gate-unbreaking combo reviewDean Troyer2016-08-182-74/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix argument precedence hack Working around issues in os-client-config <= 1.18.0 This is ugly because the issues in o-c-c 1.19.1 run even deeper than in 1.18.0, so we're going to use 1.19.0 get_one_cloud() that is known to work for OSC and fix o-c-c with an axe. Remove return values for set commands 'identity provider set' and 'service provider set' were still returning their show-like data, this is a fail for set commands now, don't know how this ever passed before... Constraints are ready to be used for tox.ini Per email[1] from Andreas, we don't need to hack at install_command any longer. [1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh Co-authorioed-by: Steve Martinelli <s.martinelli@gmail.com> Depends-On: I49313dc7d4f44ec897de7a375f25b7ed864226f1 Change-Id: I426548376fc7d3cdb36501310dafd8c44d22ae30
* | Merge "Add '--dhcp' and '--no-dhcp' options to os subnet list cmd"Jenkins2016-08-111-0/+32
|\ \
| * | Add '--dhcp' and '--no-dhcp' options to os subnet list cmdCao Xuan Hoang2016-08-101-0/+32
| |/ | | | | | | | | | | | | | | This patch adds '--dhcp' and '--no-dhcp' options to filter subnets resulted by os subnet list command. Change-Id: Ib574cc54594845bc5c5afc38bf44e3b224d33b17 Partial-Bug: #1610883
* | Merge "Rename backup commands in volume v1 and v2"Jenkins2016-08-111-5/+5
|\ \
| * | Rename backup commands in volume v1 and v2Huanxuan Ao2016-08-111-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backup commands are used only in volume service now, but "backup" is too generic, users may not know the commands are used for volume from the commands name. By seeing the command name, users can only see the "backup" but do not know which object the backup commands work for. It may confuse users. I think rename "backup" to "volume backup" can depict resource relation and will be helpful for users to know the commands clearly. So add new commands ``volume backup create/delete/ list/show/restore`` to replace the old commands ``backup create/delete/list/show/restore``. And also deprecate old commands. Change-Id: I4f844d9bc48573eb4d17288ce6b8a90cea00d16a Implements: bp backup-snapshot-renamed-for-volume-resource Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com>
* | Implement "network agent set" commandHuanxuan Ao2016-08-101-0/+75
|/ | | | | | | | | | Add "network agent set" command in network v2 to set network agent properties. Also add the unit test, doc, functional test and release note. Change-Id: Iebaee4c60f8c6b43f538c1b82a38b93178b9ce53 Implements: bp implement-network-agents Co-Authored-By: Michael Gugino <michael.gugino@walmart.com>
* Merge "Support multi REST API calls error handling for "volume set" command"Jenkins2016-08-061-0/+21
|\
| * Support multi REST API calls error handling for "volume set" commandHuanxuan Ao2016-08-061-0/+21
| | | | | | | | | | | | | | | | Support the error handling follow the rule in doc/source/command-errors.rst Also add a unit test for testing the error handling Change-Id: I98064f4b8c1dc17eb3874f7b25c827a568463c0f
* | Merge "osc-lib: shell"Jenkins2016-08-061-485/+103
|\ \
| * | osc-lib: shellDean Troyer2016-08-051-485/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to using ClientManager and OpenStackShell from osc-lib. * Change all internal uses of ClientManager private attributes that are now public in osc-lib's ClientManager. Leave back-compat copies in place in OSC's clientManager so we don't break plugins. * Put some work-arounds in place for changes in osc-lib that we need until a new release makes it through the g-r and u-c change process. * Add a test for Unicode decoding of argv in shell.main() to parallel the one in osc-lib. Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c
* | | Merge "Implement network agents functionality"Jenkins2016-08-052-0/+286
|\ \ \
| * | | Implement network agents functionalityMichael Gugino2016-08-052-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-neutronclient implements the following command set: agent-list, agent-show, agent-delete These commands display and modify various network agents and their information. python-openstacksdk has supported the api calls for these commands, but python-openstackclient does not implement these commands. This commit adds support for the following commands: openstack network agent list openstack network agent show <agent> openstack network agent delete <agent> Change-Id: I83ede6f89c37e7bdc38d7e9e7bb9d80e94c8becc Implements: blueprint implement-network-agents Depends-On: I9755637f76787d5fac8ff295ae273b308fcb98d0 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
* | | | Merge "Show "target_project_id" attribute properly for network rbac object"Jenkins2016-08-052-3/+3
|\ \ \ \ | |_|_|/ |/| | |
| * | | Show "target_project_id" attribute properly for network rbac objectHuanxuan Ao2016-08-052-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the code in SDK: https://github.com/openstack/python-openstacksdk/blob/master/openstack/network/v2/rbac_policy.py#L34 we can see the conlumn of "target_tenant" should be "targer_project_id" but not "target_project". It is the reason why could not show the "target_project" in OSC, so this patch fix it. Before this change: (openstack) network rbac show b74fd644-e057-4d44-8ae1-7ca9967ea1e1 +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | access_as_shared | | id | b74fd644-e057-4d44-8ae1-7ca9967ea1e1 | | object_id | 8735b57f-606a-4f65-9902-2052a6d2a66d | | object_type | network | | project_id | 01c0ba43101b4080a52a5f79a55c56ff | | target_project | | +----------------+--------------------------------------+ After this change: (openstack) network rbac show b74fd644-e057-4d44-8ae1-7ca9967ea1e1 +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | action | access_as_shared | | id | b74fd644-e057-4d44-8ae1-7ca9967ea1e1 | | object_id | 8735b57f-606a-4f65-9902-2052a6d2a66d | | object_type | network | | project_id | 01c0ba43101b4080a52a5f79a55c56ff | | target_project_id | c7ab4d2ea9e1487095a8ca24ea44ef38 | +-------------------+--------------------------------------+ Change-Id: I53df127bfc3e43288c6afecdf872e6101b94a658 Closes-Bug: #1608903
* | | Merge "Add support of setting volume's state"Jenkins2016-08-051-30/+47
|\ \ \
| * | | Add support of setting volume's stateXi Yang2016-08-031-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to set volume's state, this patch is going to add this functionality. Closes-Bug:#1535213 Change-Id: I5bc1c7e81b8ba61c37f4bfd209fc86c5857fb050 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
* | | | Add unit tests for group commands in identity v3Huanxuan Ao2016-08-042-0/+429
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests for commands below in identity v3: group create group delete group show group set group add user group remove user group contains user Change-Id: I02f3b49e93582245a2749492bba1dfc4c5e0258d
* | | Merge "Implement "network rbac set" command"Jenkins2016-08-031-0/+56
|\ \ \ | |/ / |/| |
| * | Implement "network rbac set" commandHuanxuan Ao2016-08-031-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "network rbac set" command which just supports setting a target project. Also, This patch adds the doc, unit test and functional test. But there is a bug of showing network RBAC https://bugs.launchpad.net/python-openstacksdk/+bug/1608903 We need to skip the functional test before this bug fixed. Change-Id: I756f448bb333cf1098a735e57a1c5dc4edf195d4 Partially-Implements: blueprint neutron-client-rbac
* | | Refactor identity v3 unit tests with fake classHuanxuan Ao2016-08-025-609/+572
|/ / | | | | | | | | | | | | | | Refactor unit tests in identity v3 for "user", "endpoint", "group" and "service" with fake classes. Change-Id: I57316bbf762c805f8e9ae225b394bbe58ebdd416 Partially-Implements: blueprint refactor-identity-unit-test
* | Merge "Implement network rbac create and delete commands"Jenkins2016-07-292-3/+274
|\ \
| * | Implement network rbac create and delete commandsHuanxuan Ao2016-07-282-3/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add "network rbac create" and "network rbac delete" commands and also add unit tests, functional tests, docs and release note for them. Change-Id: I5fd58342f2deaa9bae7717412a942a21bbd7d045 Partially-Implements: blueprint neutron-client-rbac
* | | Merge "Pass security group id to novaclient while adding security group to ↵Jenkins2016-07-291-0/+48
|\ \ \ | | | | | | | | | | | | server"
| * | | Pass security group id to novaclient while adding securityRajasi Kulkarni2016-07-281-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | group to server In AddServerSecurityGroup, we currently pass the security group name to novaclient. If multiple security groups with same name exist, then even while passing secuity group using id to command 'openstack server add security group <server> <group>' it results in error 'Multiple security_group matches found'. Added unit test case to test the command. Change-Id: I6097eb36e1545c85209cfd767c477e10f82c6999 Closes-Bug: 1604076
* | | | Merge "Allow setting quotas for server groups and server group members"Jenkins2016-07-282-0/+10
|\ \ \ \ | |_|_|/ |/| | |
| * | | Allow setting quotas for server groups and server group membersElena Ezhova2016-07-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support of --server-groups and --server-group-members options to the "quota set" command. Change-Id: I178d1e267d010be7e908adefcf3b15abdafd9da4 Closes-Bug: #1602223
* | | | Merge "Add support for deleting volumes with associated snapshots"Jenkins2016-07-271-5/+50
|\ \ \ \ | |/ / / |/| | |
| * | | Add support for deleting volumes with associated snapshotswuyuting2016-07-271-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC doesn't support deleting volumes with associated snapshots. This patch provides support for deleting volumes with associated snapshots by adding an optional argument. Change-Id: I7e74f251574993ff13a38e508fd2f9debeda8d0a Closes-Bug: #1589332 Co-Authored-By: Rui Chen <chenrui.momo@gmail.com>
* | | | Merge "Fix error for find_service() in identity"Jenkins2016-07-273-19/+65
|\ \ \ \ | |/ / / |/| | |
| * | | Fix error for find_service() in identitysunyajing2016-07-223-19/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if there are more than one services be found with one name, a NoUniqueMatch exception should be raised but we can see a NotFound Exception raised instead. It is because in "find_service()", we use "find_resource()" first, if "find_resource()" return a exception, we just think it is a NotFound Exception and continue to find by type but ignore a NoUniqueMatch exception of "find_resource()". This patch refactor the "find_service()" method to solve this problem. Change-Id: Id4619092c57f276ae0698c89df0d5503b7423a4e Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn> Closes-Bug:#1597296
* | | | Merge "Use identity fake classes instead of old unit tests data"Jenkins2016-07-265-215/+136
|\ \ \ \ | |_|/ / |/| | |
| * | | Use identity fake classes instead of old unit tests dataHuanxuan Ao2016-07-265-215/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FakeProject, FakeDomain and FakeUser classes instead of old test data in image, compute and volume. (This work has done in network) Change-Id: Ic37d5d9db98f0f2acc6c714a9646063dcbde4ff3 Partially-Implements: blueprint use-fake-project
* | | | Merge "Use assertEqual() instead of assertDictEqual()"Jenkins2016-07-262-2/+2
|\ \ \ \
| * | | | Use assertEqual() instead of assertDictEqual()Tang Chen2016-07-252-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In unittest2, assertDictEqual() is implemented by using != operator to compare two dicts. So is assertEqual() in testtools. assertEqual() in testtools is able to handle dict, list, set and so on. So we just call assertEqual() to make the unit tests simpler. Change-Id: Ice343b2ce468acae39d2ad79f7121503e3627656
* | | | Merge "Add options to "volume type list" command"Jenkins2016-07-261-3/+30
|\ \ \ \
| * | | | Add options to "volume type list" commandHuanxuan Ao2016-07-231-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--public" and "--private" options to "volume type command" in volumev2 (v2 only) to list optional volume types Change-Id: I8605990d62116c10d89ce192c14e550657dabee5 Closes-Bug: #1597198
* | | | | Merge "Standardize import format"Jenkins2016-07-2616-18/+13
|\ \ \ \ \
| * | | | | Standardize import formatshizhihui2016-07-2216-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* | | | | | Merge "Add "--marker" and "--limit" options to "snapshot list""Jenkins2016-07-261-2/+32
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Add "--marker" and "--limit" options to "snapshot list"Huanxuan Ao2016-07-231-2/+32
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--marker" and "--limit" options to "snapshot list" command in volume v2 (v2 only). Change-Id: Ib60840b9b83dfe5e599e4037e8ec308844a9448b Closes-Bug: #1605475