summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | 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
* | | | | Merge "Unit test of credential in identityv3"Jenkins2016-07-262-28/+367
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Unit test of credential in identityv3Huanxuan Ao2016-07-232-28/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing unit tests and refactor the older tests with fake classeds for credential in identity v3 Change-Id: I94d4f80a86806c6115178421bd481b7622065956
* | | | | Merge "Add assignment list to v2 identity and deprecate alternate listing"Jenkins2016-07-233-0/+335
|\ \ \ \ \
| * | | | | Add assignment list to v2 identity and deprecate alternate listingHenry Nash2016-07-223-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current identity role list command (both v2 and v3) is overloaded with listing roles as well as assignments (if you provide user, group, project or domain options). This is in addition to the v3 assignment list command designed for this purpose. This overloading complicates the fact that roles can now be domain specific (i.e. have a domain attribute), so the command 'role list --domain <domain-name' will soon become ambigious (this is in a follow on patch). This patch: - Adds a v2 assignments list, with support for pulling the user and project from the auth credentials - For comapability, adds the same auth support to the existing v3 assignments list - Deprecates the use of role list and user role list to list assignments Change-Id: I65bafdef4f8c89e863dab101369d0d629fa818b8 Partial-Bug: 1605774
* | | | | | Rework clientmanagerDean Troyer2016-07-221-340/+27
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add compatibility for plugin v2 interface removed from osc-lib * ClientManager.is_network_endpoint_enabled() is wrapper for new is_service_available() Change-Id: I6f26ce9e4d0702f50c7949bacfbeeb0f98cddb5d
* | | | | Merge ""server list": "Image Name", "Image ID" columns"Jenkins2016-07-221-1/+14
|\ \ \ \ \
| * | | | | "server list": "Image Name", "Image ID" columnsMarc Abramowitz2016-07-061-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Image Name` column is shown by default (i.e.: without passing `--long`). E.g.: ``` $ openstack server list WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils +--------------------------------------+-----------------+---------+----------------------+----------------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+-----------------+---------+----------------------+----------------------+ | abe67035-b14f-4541-b436-e0e778ec4227 | n9anonw302mgm1 | ACTIVE | mnky3-3000=10.3.0.55 | Koala.2016-07-01-175 | | 8f6a2d12-2bc3-4d89-ba94-8916ce9cdf92 | n9anonw301mgm1 | ACTIVE | mnky3-3000=10.3.0.37 | Koala.2016-07-01-175 | | b316d6d1-67cf-4f75-94a4-4c9a2b03f6a4 | n9dobby301mgm0 | ACTIVE | mnky3-3000=10.3.0.36 | Koala.2016-05-04-130 | +--------------------------------------+-----------------+---------+----------------------+----------------------+ ``` The `Image ID` column is only available with `--long`. E.g.: ``` $ openstack server list --long -c Name -c "Image Name" -c "Image ID" WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils +-----------------+----------------------+--------------------------------------+ | Name | Image Name | Image ID | +-----------------+----------------------+--------------------------------------+ | n9anonw302mgm1 | Koala.2016-07-01-175 | f587c6fc-1df3-42cd-ac86-8cd2c995a8d9 | | n9anonw301mgm1 | Koala.2016-07-01-175 | f587c6fc-1df3-42cd-ac86-8cd2c995a8d9 | | n9dobby301mgm0 | Koala.2016-05-04-130 | 37ff47a6-3e51-4986-bfa5-62afbfad5dfc | +-----------------+----------------------+--------------------------------------+ ``` Closes-Bug: #1599304 Change-Id: I477995b840eb9520b285948926ebbfe1777dd86c
* | | | | | Merge "Support to get server rdp/serial/mks type console url"Jenkins2016-07-221-0/+47
|\ \ \ \ \ \
| * | | | | | Support to get server rdp/serial/mks type console urlRui Chen2016-07-211-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch add the support to get server rdp/serial/mks type console url, that make osc capability equal with current nova server side feature. Change-Id: I3dee2531c68563725187c8251d5ea8d4c02cca0c Closes-Bug: #1605088
* | | | | | | Merge "Add Support for showing flavor access list"Jenkins2016-07-222-1/+73
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | Add Support for showing flavor access listHuanxuan Ao2016-07-222-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a attribute "access_project_id" for flavor object to display the access project id list by using "flavor show" command. Change-Id: I7f0c152b816e0ca2e32e47f9b5c1aa7663d33b6d Closes-Bug:#1575461
* | | | | | | Merge "Set identity v3 client in networkv2 fake"Jenkins2016-07-228-92/+34
|\ \ \ \ \ \ \
| * | | | | | | Set identity v3 client in networkv2 fakeHuanxuan Ao2016-07-208-92/+34
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set identity v3 client in fake so that we needn't set it everytime when we use it in unit test. Change-Id: I9ed71056a357642e5aef7b670a7c85918aca59b9
* | | | | | | Merge "Show project access for volume type"Jenkins2016-07-212-0/+105
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | |
| * | | | | | Show project access for volume typeSheel Rana2016-07-202-0/+105
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to show project access details for private volume types. This patch will provide support for showing project access details for private volume types. Closes-Bug:#1554891 Implements: bp cinder-command-support Change-Id: I218fb07a6e69033e9f8570748eee1df8df9d6fdc
* | | | | | Merge "Add unit tests for "host list" and "host show" commands"Jenkins2016-07-212-1/+111
|\ \ \ \ \ \
| * | | | | | Add unit tests for "host list" and "host show" commandsHuanxuan Ao2016-06-272-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing unit tests for "host list" and "host show" commands in computev2, this patch add them. Change-Id: Ib157920fa2267ec96d206cdf46213563a105501b
* | | | | | | Merge "Implement rbac list and show command"Jenkins2016-07-202-0/+173
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | |
| * | | | | | Implement rbac list and show commandting wang2016-06-272-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. implement "openstack network rbac list" 2. implement "openstack network rbac show" 3. also add FakeRBACPolicy to test "network rbac xxx" command The unit test class similar to FakeRouter, which is able to fake one or more rbac policies. It will be used by the rbac CRUD patches. Change-Id: I6c97bc8819698546895fd530464a2cbb347bf77d Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn> Partially-Implements: blueprint neutron-client-rbac Depends-On: I88f409a24947b67146c0f93ec8480834cef56d2f
* | | | | | | Merge "Add port security option to network commands"Jenkins2016-07-202-0/+21
|\ \ \ \ \ \ \
| * | | | | | | Add port security option to network commandsRichard Theis2016-06-292-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the "--enable-port-security" and "--disable-port-security" options to the "network create" and "network set" commands. This supports setting the default port security for ports created on a network. Change-Id: I1deb505bd77cef2e4bc3c2dbbb0c450665136f47 Implements: blueprint neutron-client