summaryrefslogtreecommitdiff
path: root/openstackclient
Commit message (Collapse)AuthorAgeFilesLines
* move all functional tests to tests moduleSteve Martinelli2016-09-0979-0/+4653
| | | | | | | | | | | | | | functional tests should be grouped with other tests (unit and integration tests). as part of this commit the "common" module was renamed to just "base", this was done for simplicity. the post_test_hook.sh file was also copied to the functional module since it should live there. a separate change to the infra repo will be made to call the new location, once that is merged we can remove the old one (a new change will also be posted for that) Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3 Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-08125-205/+491
| | | | | | | | this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded
* Merge "format token expires time to prevent json loading datetime data"Jenkins2016-09-086-9/+13
|\
| * format token expires time to prevent json loading datetime dataSteve Martinelli2016-09-056-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | When output to shell, the token issue time is fine; however when selecting the json formatter (via the --format json) option, an exception is raised when formatting the dataetime data. Rather than pass in the datetime data, we should format the data with the ISO 8601 formatting. Closes-Bug: 1619937 Change-Id: Iffebb2d5413fabfd283dfa94fc560fc37270f9dd
* | Merge "Add Subnet service-types to subnets"Jenkins2016-09-083-4/+141
|\ \
| * | Add Subnet service-types to subnetsBrian Haley2016-08-193-4/+141
| | | | | | | | | | | | | | | | | | | | | | | | Add '--service-type' to subnet arguments to support Subnet service-types. Change-Id: I215d83e4d4cf53e03fa35041c5e41a328641b3a9 Partially-implements: blueprint service-subnets
* | | Merge "Defer auth prompting until it is actually needed"Jenkins2016-09-083-3/+81
|\ \ \
| * | | Defer auth prompting until it is actually neededDean Troyer2016-09-083-3/+81
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auth option prompting happens waaaay to early in the default os-client-config flow, we need to defer it until adter the commands have been parsed. This is why ClientManager.setup_auth() exists, as it is not called until the first attempt to connect to a server occurs. Commands that do not require authentication never hit this. Also, required options were not being enforced. By doing this we handle when no authentication info is present, we fail on missing auth-url rather than attempt to prompt for a password (default auth is password). Closes-Bug: 1619274 Change-Id: Ia4eae350e6904c9eb2c8507d9b3429fe52418726
* | | Merge "Clean up FakeClient classes in volume fakes"Jenkins2016-09-066-78/+10
|\ \ \
| * | | Clean up FakeClient classes in volume fakesHuanxuan Ao2016-08-236-78/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put FakeTransferClient and FakeServiceClient classes into FakeVolumeClient class, I think we need not to create FakeClient classes for every objects, we can use only FakeVolumeClient for all volume objects. This can reduce repetition, unified codes and make codes look cleaner and easier. Change-Id: I2729ef0e80166f4d49ccd9a48b653e2f215e3bfe
* | | | Merge "Use assertIn(A, B) instead of assertTrue(A in B )"Jenkins2016-09-062-8/+8
|\ \ \ \
| * | | | Use assertIn(A, B) instead of assertTrue(A in B )Bin Zhou2016-09-022-8/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Developers should use assertIn(A, B) instead of assertTrue(A in B ). TrivialFix Change-Id: I0d7c542272315590536c427a8865e49660361e55
* | | | Merge "Add "volume service set" command"Jenkins2016-09-064-0/+402
|\ \ \ \ | |/ / / |/| | |
| * | | Add "volume service set" commandHuanxuan Ao2016-08-174-0/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "volume service set" command in volume v1 and v2 (v1 is the same as v2) to disable or enable volume service. Change-Id: Ibb2db7e93b24cb2e0d2a7c28b6fd8bcc851b8d2f Closes-Bug: #1613597
* | | | Rearrange integration testsDean Troyer2016-08-315-195/+411
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the integration tests into their final home... * Create tests/integ to hold the integration tests * Split tests/test_shell_integ.py into tests/integ/base.py and tests/integ/cli/test_shell.py * Rename TestXXXXInteg classes to TestIntegXXXX * Adds tests/integ/cli/test_project.py for some simple project argument tests Change-Id: I2cdd340d1d446d61784eae35dd5aa09d40d5899d
* | | | Provide fallback prompt function for current osc-libDean Troyer2016-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaving the pw_func uninitialize in osc-lib turned out to be a bad idea as the test to prompt in setup_auth() doesn't check for a callback of None. Also, release note Change-Id: I8f875fa8a942d02a040238359ee22c603a4e5956
* | | | Merge "Fix auth prompt brokenness"Jenkins2016-08-294-3/+102
|\ \ \ \
| * | | | Fix auth prompt brokennessDean Troyer2016-08-294-3/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We start by fixing this in the already-present OSC_Config class so OSC can move forward. This change needs to get ported down into os-client-config in the near future, maybe even soon enough to make the client library freeze this week. * Add the pw-func argument to the OSC_Config (or OpenStackConfig) __init__() * When looping through the auth options from the KSA plugin look for any that have a prompt defined and do not have a value already, so ask for one. Closes-bug: #1617384 Change-Id: Ic86d56b8a6844516292fb74513712b486fec4442
* | | | | Merge "Clean imports in code"Jenkins2016-08-291-2/+2
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Clean imports in codeCao Xuan Hoang2016-08-251-2/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. http://docs.openstack.org/developer/hacking/#imports Change-Id: I2eb35dc53f0fdb61c31022bb70293d1df8aaf482
* | | | Restore default auth-type for token/endpointDean Troyer2016-08-241-2/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | The split to osc-lib shell lost the detection of --os-token and --os-url to set --os-auth-type token_endpoint Closes-bug: 1615988 Change-Id: I248f776a3a7b276195c162818f41ba20760ee545
* | | Work around a version clash issue with os-client-config3.0.1Dean Troyer2016-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | Need to add the fixed_arguments arg to _validate_auth() so os-client-config 1.19.1 and 1.20.0 can call our version properly. Change-Id: I328e47ba2f8115e6b18bf1482fd4aa35056907a4
* | | 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-186-17/+447
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add support for domain specific rolesHenry Nash2016-08-106-17/+447
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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-182-4/+6
| |_|_|/ |/| | | | | | | | | | | Change-Id: I1ed2983cf574ebd565eeac4f8199fbc3a2e29c8e
* | | | Merge "Gate-unbreaking combo review"Jenkins2016-08-186-86/+232
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Gate-unbreaking combo reviewDean Troyer2016-08-186-86/+232
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-0/+47
|\ \
| * | Add '--dhcp' and '--no-dhcp' options to os subnet list cmdCao Xuan Hoang2016-08-102-0/+47
| |/ | | | | | | | | | | | | | | 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-113-35/+206
|\ \
| * | Rename backup commands in volume v1 and v2Huanxuan Ao2016-08-113-35/+206
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-0/+116
|/ | | | | | | | | | 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-062-14/+62
|\
| * Support multi REST API calls error handling for "volume set" commandHuanxuan Ao2016-08-062-14/+62
| | | | | | | | | | | | | | | | 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-069-868/+146
|\ \
| * | osc-lib: shellDean Troyer2016-08-059-868/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-0/+405
|\ \ \
| * | | Implement network agents functionalityMichael Gugino2016-08-053-0/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-4/+4
|\ \ \ \ | |_|_|/ |/| | |
| * | | Show "target_project_id" attribute properly for network rbac objectHuanxuan Ao2016-08-053-4/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-052-30/+59
|\ \ \
| * | | Add support of setting volume's stateXi Yang2016-08-032-30/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-032-0/+97
|\ \ \ | |/ / |/| |