summaryrefslogtreecommitdiff
path: root/openstackclient/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Support listing network availability zones"Jenkins2016-02-041-10/+56
|\
| * Support listing network availability zonesRichard Theis2016-02-021-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "os availability zone list" command to support listing network availability zones along with the currently listed compute and volume availability zones. This adds the --network option to the command in order to only list network availability zones. By default, all availability zones are listed. The --long option was also updated to include a "Zone Resource" column which is applicable to network availability zones. Example zone resources include "network" and "router". If the Network API does not support listing availability zones then a warning message will be issued when the --network option is specified. This support requires an updated release of the SDK in order to pull in [1]. [1] https://bugs.launchpad.net/python-openstacksdk/+bug/1532274 Change-Id: I78811d659b793d9d2111ea54665d5fe7e4887264 Closes-Bug: #1534202
* | Merge "Allow wait_for_delete to work for all clients"Jenkins2016-02-041-2/+6
|\ \
| * | Allow wait_for_delete to work for all clientsMark Vanderwiel2016-01-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the exception and error status strings to be passed in such that other plugins can make use of this function. There is a comment in find_resource: The exception to catch here is dependent on which client library the manager passed in belongs to. Eventually this should be pulled from a common set of client exceptions. Since I think that is a long ways off, this change will work now and also work when a common exception is defined and used. Change-Id: Iab56cd1166028caed4f1e657e0b1ee81af3f48d8
* | | Merge "Add "os port show" command"Jenkins2016-02-031-0/+10
|\ \ \
| * | | Add "os port show" commandRichard Theis2016-02-021-0/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add "os port show" command. Change-Id: Id87c81640e74c60ae8f247c722c64fdadff022a2 Partial-Bug: #1519909 Partially-Implements: blueprint neutron-client
* | | Merge "Drop log_method decorator"Jenkins2016-02-021-27/+0
|\ \ \ | |/ / |/| |
| * | Drop log_method decoratorAkihiro Motoki2016-02-021-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a result of the recent logging refactoring, log_method decorator is no longer required. oslo.log provides a similar decorator oslo_log.helpers.log_method_call. If a similar feature is needed, we can use the decorator from oslo_log. searchlightclient is the only OSC external plugin which uses this decorator. The depending patch removes it, so we can safely drop the decorator. Change-Id: If3df09cf6aa0a401d9f89e8924adce851d0c6dec Depends-On: Ib94e7ba77262a9a8cbfce71f3083c47cb1973364
* | | Merge "Fix showing network quotas for a project"Jenkins2016-02-021-4/+7
|\ \ \ | |/ / |/| |
| * | Fix showing network quotas for a projectRichard Theis2016-02-021-4/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenStack SDK is now used for the network client. However, the 'openstack quota show' command wasn't updated for the client change. As a result, the command will fail to show network quotas when a project name is specified. For example: $ openstack quota show admin 'Proxy' object has no attribute 'show_quota' This patch set fixes the command by using the OpenStack SDK to get network quotas for a project. Change-Id: I59a7b6780a7b80cd09e79d40d214751b25d3016e Related-To: blueprint neutron-client Closes-Bug: #1528249
* | log take_action parameters in a single placeAkihiro Motoki2016-02-028-60/+19
|/ | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Merge "Support listing volume availability zones"Jenkins2016-01-221-14/+61
|\
| * Support listing volume availability zonesRichard Theis2016-01-141-14/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "os availability zone list" command to support listing volume availability zones along with the currently listed compute availability zones. This adds a --compute and --volume option to the command in order to select the availability zones to list. By default, all availability zones are listed. If the Block Storage API does not support listing availability zones then an warning message will be issued. Change-Id: I8159509a41bd1fb1b4e77fdbb512cf64a5ac11a9 Closes-Bug: #1532945
* | Merge "Refactor "os availability zone list""Jenkins2016-01-221-0/+102
|\ \ | |/
| * Refactor "os availability zone list"Richard Theis2016-01-141-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | log_method: get logger from decorated method if unspecifiedAkihiro Motoki2016-01-201-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes 'log' optional. 'log' attribute of each command class does not exist when the class is defined because 'log' is now setup dynamically when a class is instantiated. Instead log_method looks for a logger from a decorating method. compute.v2.server is changed in this commit as an example. Change-Id: Ic4d128f8e027d3b8e6f884f31369e9085c0f0871 Partial-Bug: #1532294
* | Set up logger of each command by metaclassAkihiro Motoki2016-01-201-0/+42
| | | | | | | | | | | | | | compute.v2.flavor is changed in this commit as an initial example. Partial-Bug: #1532294 Change-Id: I262af6ade0ae03fbe1cd2ad198faf4ebb4ecf7ce
* | Merge "Refactor network endpoint enablement checking"Jenkins2016-01-141-0/+20
|\ \ | |/ |/|
| * Refactor network endpoint enablement checkingRichard Theis2016-01-041-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Trivial: Remove useless string_to_bool()"Jenkins2016-01-081-4/+0
|\ \
| * | Trivial: Remove useless string_to_bool()Tang Chen2015-12-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string_to_bool() is not used by anyone. Furthermore, it is not well designed. It tries to convirt 't', '1' to True, which could be confused. So remove it. If we need something similar, let's make a better one. Change-Id: Ic1f63480c806bf7bcc9f541fc806eed297ddf718
* | | Delete the unused LOG configure codezhurong2016-01-051-4/+0
| | | | | | | | | | | | | | | | | | Delete the unused LOG configure code and import code Change-Id: I1fb0cacfe44b6a2fd4e4b3f504b6d1dec055c5c4
* | | Merge "Use Block Storage instead of Volume"Jenkins2016-01-042-3/+3
|\ \ \ | |_|/ |/| |
| * | Use Block Storage instead of VolumeXi Yang2015-11-272-3/+3
| | | | | | | | | | | | | | | | | | | | | Volume is better to be replaced by Block Storage in the doc. Change-Id: I736669ee01c7385b6e701cb20f4334eff1c49286
* | | Improve output for "os security group show"Richard Theis2015-12-231-3/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | SDK integration extensions and server create networksTerry Howe2015-12-091-2/+2
| | | | | | | | | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* | Switch to ksa SessionDean Troyer2015-12-021-2/+2
| | | | | | | | | | | | | | | | * Change session imports to keystoneauth1 * Change keystoneclient.exception imports to keystoneauth1 * Change exceptions raised from internal API from keystoneclient to openstack.common Change-Id: I046d89f561d6fe04baae53726f9749d2e7fe2056
* | Add project name/ID validation for "openstack quota show"xiexs2015-11-291-3/+9
|/ | | | | | | A validation is necessary to check the existence of project. This patch is similar to Ia2d8c96527820e25b074e6486d3f39c5ad7eae60. Change-Id: Id8895ba7a21ecad05942619a82a87c0dc68eae53
* Trivial: Fix a typo.Tang Chen2015-11-271-1/+1
| | | | Change-Id: I236b4f53ee23cc97900e6244ab709404cc44a4ca
* Trivial: Add missing doc for parameter in wait_for_delete().Tang Chen2015-11-261-0/+1
| | | | | | The doc of parameter manager is missing. Change-Id: I4e99c06ab713532d73615670ada0a61462285d76
* Merge "Unable to set some compute quotas"Jenkins2015-11-251-0/+1
|\
| * Unable to set some compute quotasRichard Theis2015-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Trivial: Fix wrong doc for wait_for_status()."Jenkins2015-11-231-1/+2
|\ \
| * | Trivial: Fix wrong doc for wait_for_status().Tang Chen2015-11-241-1/+2
| |/ | | | | | | | | | | | | | | Two trivial fixes: 1. docs for parameters are not sorted correctly 2. missing doc for a parameter Change-Id: I0cfb65e0f897c391b9b6e7225251e88855b07a56
* | Trivial: Remove doc for non-existing param in format_dict().Tang Chen2015-11-211-1/+0
|/ | | | | | There is no parameter named format. Change-Id: I286006430efb2850b978b6f2abaed87216156d12
* Allow error status to be specifiedMark Vanderwiel2015-11-181-1/+2
| | | | | | | | 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 "validate non-ascii values for swift properties"Jenkins2015-11-121-0/+8
|\
| * validate non-ascii values for swift propertiesSteve Martinelli2015-11-121-0/+8
| | | | | | | | | | | | | | | | | | skip properties that are non-ascii values, but proceed with properties that work. log these failed values back to the user. Change-Id: Iaca8909f4465a01c8aebfd290b1a322823702359 Closes-Bug: 1503898
* | Merge "Add project-name/-id validation for the OSC "openstack quota set""Jenkins2015-11-121-4/+11
|\ \
| * | Add project-name/-id validation for the OSC "openstack quota set"xiexs2015-11-041-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+15
|/ / | | | | | | | | | | | | | | 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-0/+0
|\ \ | |/ |/|
| * Rename context.py to logs.pyTerry Howe2015-10-301-0/+0
| | | | | | | | | | | | | | | | | | 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
* | Mask the sensitive values in debug loglin-hua-cheng2015-10-121-1/+3
| | | | | | | | | | Change-Id: I0eb11a648c3be21749690f079229c8e63a678e6c Closes-Bug: #1501598
* | attempt to find resource by listingSteve Martinelli2015-09-301-2/+18
| | | | | | | | | | | | | | | | | | | | | | add a last-ditch effort to find the resource in question by listing all the resources and doing a simply match for name and id. if no match is found then raise an error, if the list call is unsuccessful, raise the same error. we have failed this city. Closes-Bug: #1501362 Change-Id: I0d3d7002e9ac47b17b1ef1a5534406c85b1fc753
* | Additional exception handling for find_resourceSteve Martinelli2015-09-301-7/+11
| | | | | | | | | | | | | | | | | | | | A few things here: 1) we need to check if the client class even has a 'resource_class', in the case of glanceclient, it does not. 2) If everything fails we should print a better error message, rather than a "find" failed, since some clients don't support find. Change-Id: I6277322639e75b1635f9f3d159753efadbce1031
* | Merge "Add tests for volume quota set"Jenkins2015-09-191-2/+1
|\ \
| * | Add tests for volume quota setTerryHowe2015-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | 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 "Use a common decorator to log 'take_action' activation"Jenkins2015-09-115-6/+35
|\ \ \
| * | | Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-015-6/+35
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79