summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | osc-lib: shellDean Troyer2016-08-0510-868/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Updated from global requirementsOpenStack Proposal Bot2016-08-051-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ic33376d005aa07d377af183ba3537c6c1ee22c21
* | | | Merge "Implement network agents functionality"Jenkins2016-08-058-0/+500
|\ \ \ \
| * | | | Implement network agents functionalityMichael Gugino2016-08-058-0/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-054-12/+5
|\ \ \ \ \
| * | | | | Show "target_project_id" attribute properly for network rbac objectHuanxuan Ao2016-08-054-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Document network trunk commands"Jenkins2016-08-051-0/+2
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Document network trunk commandsAbhishek Raut2016-07-281-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands were added for network trunk object as part of change I6fe1dbd81813fae234801a61c0e3d89f9e7c791e. This patch adds documentation for the same. Change-Id: If89478bb4b8af08de11ad521669ba2ee91b76f69 Partial-implements: blueprint vlan-aware-vms
* | | | | Merge "Updated from global requirements"Jenkins2016-08-051-1/+1
|\ \ \ \ \
| * | | | | Updated from global requirementsOpenStack Proposal Bot2016-08-041-1/+1
| |/ / / / | | | | | | | | | | | | | | | Change-Id: I61c1841fc28a9a493ee1e5383f14515840fe4337
* | | | | Merge "Add support of setting volume's state"Jenkins2016-08-055-30/+81
|\ \ \ \ \
| * | | | | Add support of setting volume's stateXi Yang2016-08-035-30/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Updated from global requirementsOpenStack Proposal Bot2016-08-031-1/+1
| |_|/ / |/| | | | | | | | | | | Change-Id: I202897c2d66cc9e20b3d2ef1564a37db26f88d47
* | | | Merge "Implement "network rbac set" command"Jenkins2016-08-036-6/+151
|\ \ \ \
| * | | | Implement "network rbac set" commandHuanxuan Ao2016-08-036-6/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Remove an outdated directory in tox.iniHuanxuan Ao2016-08-031-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory openstack/common from the exclude list of flake8 in tox.ini was used to keep codes from oslo-incubator, but oslo-incubator was retired, so don't use this directory any more. Change-Id: If1ea5dc167cfe4a09aad413b9eab0af807ebe603
* | | | Merge "Add a document for required options"Jenkins2016-08-021-0/+30
|\ \ \ \
| * | | | Add a document for required optionsHuanxuan Ao2016-08-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some options are required in some commands, I think we need a document to state what should we do in this case. Change-Id: Id345ca1790e2125b333b271b74288e1a73d39ba3
* | | | | 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 "Updated from global requirements"Jenkins2016-08-011-1/+1
|\ \ \ \
| * | | | Updated from global requirementsOpenStack Proposal Bot2016-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Iccc0deccc66dd82b101ca4fdd099cc55325ea516
* | | | | Merge "OS_DEFAULT_DOMAIN must be an ID"Jenkins2016-08-011-1/+1
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | OS_DEFAULT_DOMAIN must be an IDGhe Rivero2016-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the documentation to indicate that the value of OS_DEFAULT_DOMAIN must be the domain ID. A domain name is not valid here Change-Id: Id6d42aa10ef346fa5124ef841c5ce408e34d6424
* | | | | Merge "arguments are not locale decoded into Unicode"Jenkins2016-08-011-2/+13
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | arguments are not locale decoded into UnicodeJohn Dennis2016-07-261-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the openstackclient in Python2 passes command line arguments to a subcommand it fails to pass the arguments as text (e.g. Unicode). Instead it passes the arguments as binary data encoded using the current locales encoding. An easy way to see this is trying to pass a username with a non-ASCII character. % openstack user delete ñew No user with a name or ID of 'ñew' exists. What occurs internally is when the user data is retrieved it's it properly represented in a Unicode object. However the username pased from the command line is still a str object encoded in the locales encoding (typically UTF-8). A string comparison is attempted between the encoded data from the command line and the Unicode text found in the user representation. This seldom ends well, either the comparison fails to match or a codec error is raised. There is a hard and fast rule, all text data must be stored in Unicode objects and the conversion from binary encoded text to Unicode must occur as close to the I/O boundary as possible. Python3 enforces this behavior automatically but in Python2 it is the programmers job to do so. In the past there have been attempts to fix problems deep inside internal code by attempting to decode from UTF-8. There are two problems with this approach. First, internal code has no way to accurately know what encoding was used to encode the binary data. This is way it needs to be decoded as close to the I/O source as possible because that is the best place to know the actual encoding. Guessing UTF-8 is at best a heuristic. Second, there must be a canonical representation for data "inside" the program, you don't want dozens of individual modules, classes, methods, etc. performing conversions, instead they should be able to make the assumption in what format text is represented in, the format for text data must be Unicode. This is another reason to decode as close to the I/O as possible. In Python3 the argv strings are decoded from the locales encoding by the interpreter. By the time any Python3 code sees the argv strings they will be Unicode. However in Python2 there must be explicit code added to decode the argv strings into Unicode. The conversion of sys.argv into Unicode only occurs when argv is not passed to OpenStackShell.run(). If a caller of OpenStackShell.run() supplies their own arg it is their responsiblity to assure they are passing actual text objects. Consider this a requirement of the API. Note: This patch does not contain a unittest to exercise the behavior because it is difficult to construct a test that depends on command invocation from a shell. The general structure of the unit tests is to pass fake argv into OpenStackShell.run() as if it came from a shell. Because the new code only operates when argv is not passed and defaults to sys.argv it conflicts with the unittest design. Change-Id: I779d260744728eae8455ff9dedb6e5c09c165559 Closes-Bug: 1603494 Signed-off-by: John Dennis <jdennis@redhat.com>
* | | | | Updated from global requirementsOpenStack Proposal Bot2016-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie90dc3937e1991202a9af7aa38c5e510947cb219
* | | | | Merge "Implement network rbac create and delete commands"Jenkins2016-07-298-5/+528
|\ \ \ \ \
| * | | | | Implement network rbac create and delete commandsHuanxuan Ao2016-07-288-5/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-292-1/+49
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | server"
| * | | | | | Pass security group id to novaclient while adding securityRajasi Kulkarni2016-07-282-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Update the description of project in releasenotes."Jenkins2016-07-291-1/+1
|\ \ \ \ \ \ \
| * | | | | | | Update the description of project in releasenotes.qtang2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1fe0e52d2e049d34666a6d94bac1d85b91a78b19
* | | | | | | | Updated from global requirementsOpenStack Proposal Bot2016-07-291-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Change-Id: If225aca4a8b366b6657f46bc9478a88f9e9b1964
* | | | | | | Merge "Allow setting quotas for server groups and server group members"Jenkins2016-07-285-0/+30
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Allow setting quotas for server groups and server group membersElena Ezhova2016-07-275-0/+30
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-274-11/+76
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Add support for deleting volumes with associated snapshotswuyuting2016-07-274-11/+76
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-275-34/+96
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix error for find_service() in identitysunyajing2016-07-225-34/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-264-4/+67
|\ \ \ \ \
| * | | | | Add options to "volume type list" commandHuanxuan Ao2016-07-234-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2623-24/+51
|\ \ \ \ \ \
| * | | | | | Standardize import formatshizhihui2016-07-2223-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-264-3/+68
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | Add "--marker" and "--limit" options to "snapshot list"Huanxuan Ao2016-07-234-3/+68
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--marker" and "--limit" options to "snapshot list" command in volume v2 (v2 only). Change-Id: Ib60840b9b83dfe5e599e4037e8ec308844a9448b Closes-Bug: #1605475