summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common
Commit message (Collapse)AuthorAgeFilesLines
...
| * Refactor "os availability zone list"Richard Theis2016-01-141-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | Refactor the "os availability zone list" command to make it a common command instead of a compute-only command. Since availability zones are common to compute, volume and network (new), this refactoring allows availability zone support to be added for volume and network. In addition to the refactor, unit and functional tests were added. Change-Id: I63e9d41d229b21cd38e5a083493042c096d65e05 Partial-Bug: #1532945
* | Set up logger of each command by metaclassAkihiro Motoki2016-01-201-0/+32
| | | | | | | | | | | | | | compute.v2.flavor is changed in this commit as an initial example. Partial-Bug: #1532294 Change-Id: I262af6ade0ae03fbe1cd2ad198faf4ebb4ecf7ce
* | Merge "Changed the abstract columns and datalists from test cases of common ↵Jenkins2016-01-143-37/+33
|\ \ | | | | | | | | | and Identity"
| * | Changed the abstract columns and datalists from test cases of common and ↵SaiKiran2016-01-123-37/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Identity columns and datalist has been set in each test case in compute, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I45a3582088161f12e60e7c933da8e7dcc0ae8e7b Closes-Bug: #1532384
* | | Merge "Refactor network endpoint enablement checking"Jenkins2016-01-141-0/+33
|\ \ \ | |_|/ |/| |
| * | Refactor network endpoint enablement checkingRichard Theis2016-01-041-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the network endpoint enablement checking from the 'server create' command to the common client manager. This allows future network commands to use either nova or neutron networking based on the cloud environment. This patch set also includes related unit test enhancements to the common client manager to trigger authentication on the tests. Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b Related-Bug: #1519511 Related-to: blueprint neutron-client
* | | Use assertTrue/False instead of assertEqual(T/F)Swapnil Kulkarni (coolsvap)2016-01-071-3/+3
|/ / | | | | | | | | | | | | | | The usage of assertEqual(True/False, ***) should be changed to a meaningful format of assertTrue/False(***). Change-Id: I3437634329fc8ecef25082b43b5fc0e1030cdbda Closes-Bug:#1512207
* | Merge "Improve output for "os security group show""Jenkins2015-12-281-0/+7
|\ \
| * | Improve output for "os security group show"Richard Theis2015-12-231-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the security group rules output when running the "os security group show" command. Each security group rule is now displayed on a separate line. Current output example: $ openstack security group show default +-------------+------------------------- ... ---+ | Field | Value ... | +-------------+------------------------- ... ---+ | description | Default security group ... | | id | 048a5fc3-3be1-407d-ae47-9... | | name | default ... | | project_id | 3b96bb2020c1459da76963f9e... | | rules | [u"id='5d812367-9829-4340...t"] | +-------------+------------------------- ... ---+ New output example: +-------------+------------------------- ... ---+ | Field | Value ... | +-------------+------------------------- ... ---+ | description | Default security group ... | | id | 048a5fc3-3be1-407d-ae47-9... | | name | default ... | | project_id | 3b96bb2020c1459da76963f9e... | | rules | id='5d812367-9829-4340-95...lt' | | | id='ee451d1c-ade3-4975-8e...lt' | +-------------+------------------------- ... ---+ Change-Id: I1386075310896c58a2b776e2bbec3603bd00eff1 Partial-Bug: #1519511 Related-To: blueprint neutron-client
* | Refactor: Initialize parser in setUp() in TestNonNegativeActionTang Chen2015-12-281-26/+10
| | | | | | | | Change-Id: I12846acc4450d31d19897bbdfc6846bde8c8f2ce
* | Refactor: Initialize parser in setUp() in TestKeyValueActionTang Chen2015-12-281-52/+9
| | | | | | | | | | | | | | | | No need to initialize parser in each test case. Do it in setUp(). Also remove the test_default_values case because it could be tested in the test_good_values case. Change-Id: Ia2ed7c9e46bf6baabbd62b9d50511c5e8103e5e2
* | Replace assertEqual(None, *) with assertIsNone(*)Xi Yang2015-12-251-1/+1
|/ | | | | | | | This patch is going to replace assertEqual(None, *) with assertIsNone(*) in unit test code to have more clear messages in case of failure. Change-Id: I6f85498347e8fc7cad5ea7afb832b9acda7daafc
* SDK integration extensions and server create networksTerry Howe2015-12-091-3/+3
| | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* Add project name/ID validation for "openstack quota show"xiexs2015-11-291-0/+121
| | | | | | | A validation is necessary to check the existence of project. This patch is similar to Ia2d8c96527820e25b074e6486d3f39c5ad7eae60. Change-Id: Id8895ba7a21ecad05942619a82a87c0dc68eae53
* Unable to set some compute quotasRichard Theis2015-11-201-0/+26
| | | | | | | | | | | | | | | | | | | | | | The OpenStackClient mapping of 'openstack quota set' arguments isn't correct for compute quota items that have to different names. For example, the --injected-file-size argument is mapped to injected_file_size, but the compute quotas item is actually injected_file_content_bytes. This incorrect mapping prevented the impacted compute quota items from being set. The problem impacts the following 'openstack quota set' arguments: --injected-file-size --injected-path-size --properties --secgroup-rules --secgroups This patch set also expands the compute quota unit tests to verify all compute quota items that can be set. Change-Id: I0a2f241e425f4811e4ae55be183ac0c8b0805c2a Closes-Bug: #1475831
* Allow error status to be specifiedMark Vanderwiel2015-11-181-0/+40
| | | | | | | | For some apis, heat, the error status is "failed". This patch changes the wait_for_status method to allow for the error status to be passed in the same way as the success status. Change-Id: I20db4051d3f5611a4b13fe23ea8798b82a40da81
* Merge "Add project-name/-id validation for the OSC "openstack quota set""Jenkins2015-11-121-6/+20
|\
| * Add project-name/-id validation for the OSC "openstack quota set"xiexs2015-11-041-6/+20
| | | | | | | | | | | | | | | | | | The quota info would be set into DB, even though the project actually does not exist. This patch tried to add a validation to forbid this undesirable behavior. Change-Id: Ia2d8c96527820e25b074e6486d3f39c5ad7eae60 Closes-Bug: #1512638
* | Fix the bug of "openstack console log show"xiexs2015-11-091-0/+55
|/ | | | | | | | The behaviors are inconsistent while different negative line numbers specified. Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b Closes-Bug: #1512263
* Merge "Rename context.py to logs.py"Jenkins2015-10-301-32/+32
|\
| * Rename context.py to logs.pyTerry Howe2015-10-301-32/+32
| | | | | | | | | | | | | | | | | | At one point this file contained the context for logging, but the reason for its existence is now for logging. Implements: blueprint logging-migration Change-Id: I4ba42bbef97b09d31236ac8c01b6fb23827b8bee
* | Add tests for find_resource()Dean Troyer2015-10-011-0/+54
| | | | | | | | | | | | | | Add a couple of tests for utils.find_resource() for the odd resources and managers without resource_class. Change-Id: I2ed9b491d1361b5259b3a5f80b4fac787a7087c1
* | Merge "Add tests for volume quota set"Jenkins2015-09-191-0/+45
|\ \
| * | Add tests for volume quota setTerryHowe2015-08-111-0/+45
| | | | | | | | | | | | | | | | | | | | | Add some tests for volume quota set and get rid of TODO about using the value instead of the key to get the attribute. Change-Id: I57aa57951aeea65965966e63af922cda532d759d
* | | Merge "Create log configuration class"Jenkins2015-09-091-42/+110
|\ \ \ | | |/ | |/|
| * | Create log configuration classTerryHowe2015-08-261-42/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configuration of logging gets triggered twice. The first time it uses the CLI options when the application is started and second it uses the configuration file after that is read. The state of the logging needs to be saved from the first to the second time, so I created a class. Implements: blueprint logging-migration Change-Id: I7b8d1a3b6fd128e98cafd7c16009c7b694a52146
* | | Merge "Optimize log formatting"Jenkins2015-09-091-37/+25
|\ \ \ | |/ /
| * | Optimize log formattingTerryHowe2015-08-131-37/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no way to change the configuration variables we want printed in log messages, so format them in the constructor. This will save us from overridding the format method and a couple cpu cycles every log message. This change also moves the _LOG* variables into the formatter since they aren't really globally needed. Change-Id: I706e9db7da3daec20332f9d1533fe665f2739dea Implements: blueprint logging-migration
* | | Merge "Extract log level from configuration file"Jenkins2015-09-091-0/+24
|\ \ \ | |/ /
| * | Extract log level from configuration fileTerryHowe2015-08-131-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract log_level from configuration file if the level was not overridden by the command line option. The default command line option is 1 and there is no command line option to set the verbose_level to 1, so if it is 1, it has not be set. Change-Id: I1be04367c72f83c1181f92ca4c2c83165b66995c Implements: blueprint logging-migration
* | | Merge "Move options to log level out of shell.py"Jenkins2015-09-091-0/+11
|\ \ \ | |/ /
| * | Move options to log level out of shell.pyTerryHowe2015-08-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Move the conversion of command line options to log level out of shell.py. Change-Id: I86cb45a85cd63927aa1c87c1eed27542981df659 Implements: blueprint logging-migration
* | | Merge "Move set warnings filters to logging module"Jenkins2015-09-081-0/+9
|\ \ \ | |/ /
| * | Move set warnings filters to logging moduleTerryHowe2015-08-131-0/+9
| | | | | | | | | | | | | | | | | | | | | This is the first step in moving logging out of shell.py Change-Id: I3dcb4e17bb4687988ddf9b793ad1a308ef89b242 Implements: blueprint logging-migration
* | | Merge "Set up every time record log in file"Jenkins2015-09-081-0/+102
|\ \ \ | |/ / | | / | |/ |/|
| * Set up every time record log in fileDaisuke Fujita2015-08-081-0/+102
| | | | | | | | | | | | | | | | | | This will allow users to record logs of all their commands into a predefined log file, in clouds.yaml. The log should have a format similar to that of oslo.log. Change-Id: I1b334bf429d575fc25809c9706fc0b11116be3f1 Implements: blueprint every-time-record-log-in-file
* | Merge "Fix quota set failed problem"Jenkins2015-08-061-0/+89
|\ \ | |/ |/|
| * Fix quota set failed problemjiaxi2015-07-281-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the command: openstack quota set, the compute quota below can't be set successfully,the value of compute quota stay unchanged, 'fixed-ips', 'floating-ips', 'injected-files', 'key-pairs'. What's more,I add a TODO comment in the code for two reason. 1. volume quota set works fine for the moment. 2. To indicate that this issue about volume needs discuss and report another bug, if it's confirmed. This bug is only about compute quota. Change-Id: Ic1028d561f5a0030cf65ac18fc117bf01e945478 Partial-Bug: #1420104
* | Add configuration show commandTerryHowe2015-07-231-0/+79
|/ | | | | | | | | | | | Create a `configuration show` command that displays the current configuration of the CLI. Different configurations can be displayed using options such as --os-cloud. Passwords and tokens are redacted by default unless the --unmask option is specified. Closes-Bug: #1476729 Change-Id: I0792365d0c5fa526cd09c0ed88c6bb1e2cb813a7
* Remove unnecessary test extension mockTerryHowe2015-07-171-7/+0
| | | | | | The network extension test does not need this. Change-Id: I8dd2cad759a813d7df0476afa6c56f455ddff616
* Rename endpoint type to interfaceTerryHowe2015-07-151-4/+4
| | | | | Change-Id: I4e21d09bc747e8210f4f79a1d6c4c7ccf2f25d1c Closes-Bug: #1454392
* Add --os-endpoint-type cli optional argumentRoxana Gherle2015-07-022-0/+21
| | | | | | | | | | | | User should be able to specify the endpoint type through a CLI optional argument/ENV variable setting. We will name this new optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and based on the value given, the service API will use that specific endpoint type. Possible values: public, admin, internal. DocImpact Closes-Bug: #1454392 Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
* Add --wait to server deleteMatt Riedemann2015-05-291-0/+39
| | | | | | | | | | | | | | This allows the server delete command to wait for the server to be deleted (obviously). The wait method is the same model that Tempest uses, i.e. wait for a 404 on server GET (successful deletion), fail if the server went to ERROR status, or fail if a timeout is reached. The default timeout of 300 seconds is also what Tempest uses. Closes-Bug: #1460112 Change-Id: I0e66c400903e82832944d1cad61e7eb30177c3e8
* Remove oslo serialization requirementSteve Martinelli2015-05-261-1/+2
| | | | | | | | | Recently oslo serialization has started to also include python-msgpack. Since we were only using it for json support, we should just use python's json support. Especially since it's only used by our tests. Change-Id: I0f8d939d6fca7608eaa3eea7ea4ca93296aaab3a
* Add --os-cloud supportDean Troyer2015-04-181-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new option --os-cloud that allows the configuration values for multiple clouds to be stored in a local file and selected with a single option. Internal option names have had 'os_' removed to be comptible with the options returned from OpenStackConfig().get_one_cloud(). The config file is ~/.config/openstack/clouds.yaml: Sample ------ clouds: devstack: auth: auth_url: http://192.168.122.10:35357/ project_name: demo username: demo password: 0penstack region_name: RegionOne devstack: auth: auth_url: http://192.168.122.10:35357/ project_name: demo username: demo password: 0penstack region_name: RegionOne Co-Authored-By: Monty Taylor <mordred@inaugust.com> Change-Id: I4939acf8067e44ffe06a2e26fc28f1adf8985b7d Depends-On: I45e2550af58aee616ca168d20a557077beeab007
* Merge "Defer client imports"Jenkins2015-04-191-0/+4
|\
| * Defer client importsDean Troyer2015-04-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | So we really weren't deferring the loading of client libs dadgummit, do that for real where possible. This shaves a couple of tenths off the static import times. Also defer as much import-time procesing as possible. This is a little ugly in api.auth but this also eliminates import of the auth plugins until they are needed. Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
* | Fix session timingDean Troyer2015-04-071-8/+9
|/ | | | | | | | | | | | Subclass keystoneclient.session.Session to add the timing hooks to record the elapsed time returned by requests.Response objects, including the redirection history. Redirects are included individually and not rolled into the total time for the original request. This works for all clients that use OSC's session. Closes-Bug: #1402577 Change-Id: I9360c90c151579b89a37edb8c11c17feb15b3cb9
* Move OSC auth plugins so they can be foundDean Troyer2015-03-101-1/+2
| | | | | | | | | | | | | | The plugin detection at the top of openstackclient.api.auth did not detect the plugins at the bottom of that file because, surprise, they had not been declared yet so the entry points were ignored. Move both plugin subclasses into openstackclient.api.auth_plugin. Fix a problem with the password callback that was otherwise made worse with this change. Closes-Bug: 1428912 Change-Id: Idc3b72534071e0013c8922884a8bc14137509a0f
* Merge "Fix auth-required for help command"Jenkins2015-03-021-21/+40
|\