summaryrefslogtreecommitdiff
path: root/heatclient/v1/resources.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixTakashi Kajinami2022-05-091-1/+1
| | | | | | | This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
* Update stack_id clearify for heat client functionsricolin2019-08-031-4/+4
| | | | | | | | | | most of our client major function require stack_id. We should provide more specific information (at lest in function description) to clearify that it's allowed to feed in stack name to `stack_id` too. For example, both `heat.stacks.get($Stack_UUID)` and `heat.stacks.get($Stack_Name)` works. Change-Id: I4428097140e0391a77679f5c69e00966f249efd7
* Merge "Replace six.iteritems() with .items()"Jenkins2017-06-121-2/+1
|\
| * Replace six.iteritems() with .items()M V P Nitesh2017-03-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | 1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2.In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Change-Id: I3913e8876b34e112140788d7a405da6eedfb5f29
* | Don't encode path separatorsrabi2017-05-091-9/+9
|/ | | | | | | | | | Encoding the path separators results in urls refused by by apache with 404 unless AllowEncodedSlashes is turned on, which is not the default. The existing encoding of path separators seems unnecessary. Change-Id: I3b77aafc6104119503363e5db36b0379964daba5
* Move required modules from oslo-incubatorrabi2016-11-121-1/+1
| | | | | | | | | | | | Move the required module to heatclient/common. - heatclient/openstack/common/apiclient/base.py It also moves some required functions and exceptions from heatclient/openstack/common/cliutils.py and heatclient/openstack/common/exceptions.py. Change-Id: I68704c7fab9417492d8390ad05a9797f78d46907
* Standardize import formatshizhihui2016-08-031-1/+1
| | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format in heatclinet. Change-Id: I0200ddad88ee833d7de9d6df2c1519e4f4560db7
* Merge "Add heat client support for Resource set health"Jenkins2016-02-261-0/+21
|\
| * Add heat client support for Resource set healthAhmed Elkhouly2016-02-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | Add a new command to set resource's health. The command takes the following format: heat resource-mark-unhealthy [--reset] <NAME or ID> <RESOURCE> reason Change-Id: I4e0a127343e591c176f451172a1c8a59bf36f6eb Partially-implements: blueprint mark-unhealthy Depends-On: Ifa48b179723a2100fff548467db9e162bc669d13
* | Stack resource searchKanagaraj Manickam2016-02-201-0/+5
|/ | | | | | | | | | heat resource-list -f <filters> implements blueprint heat-stack-resource-search depends-on: Iaae88f3b32bc2ba7b41a4078ef3aa8ffc07079b7 Change-Id: I2d1f6ee68623e08bb9654dbcba28336364d14d6d
* Enable pep8 H405 testsricolin2015-11-161-3/+3
| | | | | | | Enabled H405 multi line docstring summary not separated with an empty line in tox testing. Change-Id: I89d063133154ae343315872b677fa06cc901cf3b
* add with_detail parameter in heat resource-list requestRico Lin2015-07-271-3/+10
| | | | | | DocImpact Change-Id: Ia8fad976819902c50df183925f410156395719db Closes-Bug: #1473086
* Support 'with_attr' parameter for resource-showhuangtianhua2015-07-211-1/+6
| | | | | | | | Support the 'with_attr' parameter when showing resource. Closes-Bug: #1428436 Change-Id: I430bf27ace4fedd55ee158f9f4fa3edc737892a4
* resource-list --nested-depth stack_name columnSteve Baker2015-06-261-0/+8
| | | | | | | | | | | | | | | | | | For resource-list --nested-depth an extra column parent_resource is added to the result. This has the following issues: - parent_resource values cannot be used as the stack argument to resource-show - templates with more than one ResourceGroup will have more than one parent_resource called "0", so there is no way of inferring the actual parent, and it is not possible to guess the correct parent resource - parent_resource is inconsistent with event-list --nested-depth, which adds a stack_name column that doesn't have the above disadvantages. This change replaces the parent_resource column with a stack_name column for resource-list --nested-depth. Change-Id: I6b4bc306db48e08931ff294bcbefeb6bbb195663 Closes-bug: #1467332
* Move usage methods *_request to get/post/etcPeter Razumovsky2015-06-091-6/+11
| | | | | | | | HTTPClient has methods get/post/put and others, which use json_request and raw_request, but other code uses requests method instead of them. Change-Id: I74ee34430afdae17f83ccdc877cc882f94651bce
* Migrate to new oslo_xxx namespacetengqm2015-03-231-2/+1
| | | | | | | | This patch migrates the namespace of oslo packages from oslo.foobar to oslo_foobar. The oslo_incubator code need to be resynced, which will be submitted in another patch. Change-Id: Id77207750556b71f20797a0ee6f2cafd62ea30e1
* Convert strutils to oslo.utils.encodeutilsSteven Hardy2014-11-121-5/+6
| | | | | | | | | | | | | | | Convert the encode/decode functions from oslo-incubator to use oslo.utils encodeutils, as the incubator functions are now deprecated. Also syncs oslo-incubator to 62394a3 to purge usage of strutils from the openstack/common modules. Note includes oslo fix https://review.openstack.org/#/c/133290/ which we need or the python3 tests won't pass. Change-Id: I630fe3f3ce14ae745a8417bfe6552acd31341c9c Partial-Bug: #1380629
* Add nested-depth option to resource-listAnderson Mesquita2014-08-151-1/+3
| | | | | | | | Add `--nested-depth` option to allow listing of nested resources up to `<DEPTH>` levels deep. Implements: blueprint explode-nested-resources Change-Id: I401f68d8c2e14179972928920003c75c851ad9cc
* Deprecate misleading cli command 'resource-template'Rabi Mishra2014-07-141-0/+3
| | | | | | | | | | | | | Current 'resource-template' command is misleading as it's providing template snippet for the 'resource-type' and not the 'resource'. This has been deprecated and a new command 'resource-type-template' added. ex. $heat resource-type-template -F json OS::Nova::KeyPair Change-Id: I373e2fa3c7891d2488704975ffdfb6d9afa5059a Closes-Bug: #1336306
* Remove dependent module py3kcompatllg82122014-03-181-11/+9
| | | | | | | | | | | Module py3kcompat was removed from oslo-incubator, we can use six directly. * Sync commit of removing py3kcompat from oslo * use six replace usage of py3kcompat Change-Id: If0f9397588b2180fe198e804cbbb5b5c8420fe76 Closes-Bug: #1280033
* Merge "Update apiclient.base and reuse new functional"Jenkins2014-03-011-5/+0
|\
| * Update apiclient.base and reuse new functionalAndrey Kurilin2014-02-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Module apiclient.base has several updates in oslo, so we need to sync latest code to have ability to reuse new functional. Updates in oslo which related to usage of apiclient.base in heatclient: - I491f9b54c7074546cf738c6150666bfcc3966a78 - I1db6c12a1f798de7f7fafd0c34fb0ef523610153 Related to bp common-client-library-2 Change-Id: I509d6efb0c8eef87ba2e4aa02ebb44ba149a9860
* | Support the native signal APIThomas Herve2014-02-191-0/+13
|/ | | | | | The patch adds a new command to send a signal to a resource. Change-Id: Ic0d7390e31114e1a58b700c57b838c059bf5b086
* Add to_dict() method to Resource classSimon Pasquier2014-01-131-0/+5
| | | | | | | | | | | | | Commit a07b8b0b introduces a regression when running 'heat resource-show' command because heatclient.v1.resources.Resource class didn't implement the to_dict() method. This commit adds unit tests for resource show and list commands. It also removes the use of MagicMock in these tests because it introduced a recursion issue (see https://review.openstack.org/#/c/65269/). Change-Id: I6c4c0e293d2955c67a0240136faa2721ef2e4ffa Closes-Bug: 1266678
* Reuse BaseManager and Resource from osloAndrey Kurilin2013-12-161-4/+4
| | | | | | | | | In the process of unification of the clients code we should reuse common functionality from Oslo. Related to blueprint common-client-library-2 Change-Id: I44a1344e3eb40220d8b795fd05e44623195116a2
* Fix i18n error when resource-name is non-englishchenxiao2013-11-251-10/+16
| | | | | | | | | | | | | When executing commands about event and resource with non-english resource-name, error "'ascii' codec can't decode byte...." will occur. Root cause is that heatclient can not generate a correct encoded url. This Patch will use quote and safe_encode functions to implement a url-encode process. Closes-Bug: #1249234 Change-Id: I4261fdaf6ccc60aebdb9df236f4eedce0f9baa14
* Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-201-1/+1
| | | | | Change-Id: I8f2697ca99192078d5db2adb4db98287520d9895 Fixes-Bug: #1214176
* Generate a template from a resourceAndrew Plunk2013-08-071-0/+6
| | | | | | | | | Setup the command line options and calls for generating a template from an installed resource. blueprint resource-template Change-Id: If533bd90b1ec73bbe2603b55a0a7621879d355ec
* Fix all the pep8 E* and F* errors.Angus Salkeld2013-06-271-4/+4
| | | | Change-Id: I34bab949e4795073544c64c9796237c60ace4d65
* Cleaned up code in anticipation of flake8.Monty Taylor2013-05-181-2/+0
| | | | Change-Id: Id710edb1a82110653e783fed13cd589cab75f38a
* Display resource metadata as indented jsonSteve Baker2013-03-271-1/+2
| | | | | | | displaying as a pretty table wasn't pretty. Change-Id: Ia25dd7d08b46b6b497f13707430664718f01d1cc Fixes: bug #1160689
* Support for events list and detailsSteve Baker2012-11-281-25/+15
| | | | | | | This also replaces resource_id with resource_name in the resources API. Change-Id: Ia5ccec5d94fb8106be2dfe89976db0fceeb73b58
* Implement client resource support.Steve Baker2012-11-201-0/+80
CLI now supports commands: resource-list resource resource-metadata Change-Id: I6c366279456f35e40928fc8f3654ab63ae0af6ca