summaryrefslogtreecommitdiff
path: root/heatclient/common
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixTakashi Kajinami2022-05-096-32/+19
| | | | | | | This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
* Replace deprecated import of ABCs from collectionsTakashi Kajinami2021-12-161-3/+3
| | | | | | | | ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Closes-Bug: #1936667 Change-Id: Ie312cb884537ec541bf2111fe8a647e939b6519e
* Replace oslo_utils.fnmatch with fnmatch2.4.0Takashi Kajinami2021-07-061-2/+1
| | | | | | | | | | | The oslo_utils.fnmatch module was added to solve an issue in py2.7 but it is no longer required because py2.7 is no longer supported. The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's fnmatch module should be used instead. [1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b Change-Id: I95535adeb45363500b3ed9729bb61cb4308d23b9
* Python 3.9: base64.encodestring is removedThomas Goirand2020-10-161-1/+1
| | | | | | | We should use base64.encodebytes instead, which is avaiable since Python 3.2. Change-Id: Ic945aff08d00bf2e602964cb1e25ea045e645b17
* Update hacking for Python3ussuri-em2.1.0Andreas Jaeger2020-03-314-5/+7
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
* Merge "Add files-container option for stack create and update"Zuul2020-02-211-25/+37
|\
| * Add files-container option for stack create and updaterabi2018-08-291-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If files-container option is specified: - All template/env files would be fetched by the heat engine relative to the files_container and no local files other than the root template would be sent to server. - Relative path of environment files would be sent in the environment_files list. Also adds the option to template validate. Change-Id: I1a703ab8798a003365be650886bb78be5af472b7 Story: #1755453 Task: 19319
* | Cleanup of .keys() from dict_object.keys() *in* operatorjacky062019-12-052-2/+2
| | | | | | | | Change-Id: I49bb58e5dc2618ee02424315e4e3bf1057a77068
* | Fix missing print formatzhufl2019-05-211-1/+1
| | | | | | | | | | | | | | | | This is to: 1. Add missing print format for "%(hook_type)". 2. Add ws between words in log message "notavailable". Change-Id: Iaee8697c95f66bff0536db9a266158a3cbc89412
* | Set Content-Type header explictly for SessionClientRabi Mishra2019-03-151-0/+3
| | | | | | | | | | | | | | | | | | | | SessionClient is subclassed from keystoneauth LegacyJsonAdapter. LegacyJsonAdapter does not set the Content-Type explicitly and results in decodeing issues in some cases. Change-Id: Idf23022b394607c332490331fc4b216de6ff1313 Story: 2005237 Task: 30027
* | Set X-Region-Name in header when using SessionClientrabi2018-09-191-0/+4
| | | | | | | | | | | | | | | | | | We don't seem to set the header for region name when using session client. It's used to look for service endpoints in the catalog. Change-Id: I10cfdfb88b3f09e4ceb69b1020e82c4eba733804 Story: #2003806 Task: 26550
* | Don't change pyyaml behaviorMehdi Abaakouk2018-09-041-4/+13
|/ | | | | | | | | | | When an application load heatclient, the default pyyaml behavior change. This ensures only heatclient use it's custom pyyaml stuffs. This currently breaks the telemetry gate if the tempest heat plugin is loaded with the telemetry. Change-Id: I5d7d1a1999e762f2285a0effc081252570f24de8
* Fix log_http_request function in http moduleliyi2018-02-011-1/+4
| | | | | Change-Id: I043f90541c8d2d604f3edb4e7ea082ec8adb4b25 Closes-Bug: #1746669
* Modify error message encountered during stack updatePriyaDuggirala2017-10-271-2/+4
| | | | | | | | | | | | | | | Parameters of an existing stack can be updated with openstack stack update <stack> --existing --parameter <parameter>=<newvalue> Example : openstack stack update stack1 --parameter p1=v1 If the --existing option is skipped, it leads to the below error Need to specify exactly one of --template-file, --template-url or --template-object This error is misleading as the user might think that stack update cannot be performed without specifying a new template. Modify the error message with --existing option. Change-Id: Idce88bde848378e00b1c873245600ba205939668 Closes-Bug: #1723864
* Don't override sections in deep_updateThomas Herve2017-10-051-0/+3
| | | | | | | | | When you comment all the elements in a YAML mapping, you end up with None instead of an empty mapping, which can have bad side effect when handling multiple environemnents. Let's handle that by ignoring the latest None value. Change-Id: I77ffabeb8d4cd2886ef4f41351e42ebe487b5d4b
* Merge "Decode content before checking"Jenkins2017-08-091-2/+2
|\
| * Decode content before checkingrabi2017-07-261-2/+2
| | | | | | | | | | | | | | Decode before checking for py3 compatibility. Change-Id: Ic62ebc385146ab1406dd64384044d92be8171052 Related-Bug: #1695144
* | Replace six.iteritems() with .items()M V P Nitesh2017-03-313-5/+5
|/ | | | | | | | | | | | 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
* Build event stack_name from linksThomas Herve2017-03-281-1/+11
| | | | | | | | | | When retrieving events from nested stacks, we used to do a query per stack and thus get the stack that way. We changed it to do only one API call, but didn't fix the way the stack name was set. We need to use the event links to retrieve the stack name, instead of the root stack. Closes-Bug: #1676896 Change-Id: I09ab1cc2c6aaab02036b124b1dfa561dd6132083
* Remove log translationsliyi2017-03-233-7/+4
| | | | | | | | | | | | Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: I601eee9f1fca65d5fb53e6b75482b74283908a29
* Use endpoint_type with session clientrabi2017-02-181-1/+5
| | | | | | | | if endpoint_type is provided, map it to interface for SessionClient as this endpoint_type is ignored. Change-Id: If5bd96578e5bc4389b9eee6e53c598f6ffaf0d8d Closes-Buf: #1665858
* Merge "Distinguish between stack and resource events when polling"Jenkins2017-01-101-1/+12
|\
| * Distinguish between stack and resource events when pollingZane Bitter2017-01-091-1/+12
| | | | | | | | | | | | | | Don't accidentally treat a resource event like a stack event. Change-Id: I0e4d97f9954adfac3124f6ed684b608f4da668b4 Closes-Bug: #1655142
* | Merge "Make method import_versioned_module work"Jenkins2017-01-101-8/+0
|\ \ | |/ |/|
| * Make method import_versioned_module workshizhihui2016-11-091-8/+0
| | | | | | | | | | | | | | | | | | | | Oslo.utils 3.17 provides similar function, just use it. For more information: [1] http://docs.openstack.org/developer/oslo.utils/history.html Closes-Bug: #1627313 Change-Id: Ie738e910cc72535fe97295d7e118eda2412ecd15
* | Remove LOG Warning from __eq__Rob Cresswell2017-01-041-8/+0
| | | | | | | | | | | | | | | | This causes a huge amount of spam on anything that does an equality check, like tests. We should just remove it. Change-Id: Ibb1a2132ab784ae357d965bd0997f419be568651 Closes-Bug: 1653975
* | Merge "Add convenience function for events over websocket"Jenkins2016-12-272-2/+29
|\ \
| * | Add convenience function for events over websocketThomas Herve2016-12-192-2/+29
| |/ | | | | | | | | | | | | This adds an alternative method of poll_for_events using a websocket connection. Change-Id: I1c46af3ab98b6d108af976e4fab5282c8756a626
* | Use default service_type with sessionrabi2016-12-021-0/+3
| | | | | | | | | | | | | | | | | | At present when using session with heatclient, you've to specify the service_type. Use the only service_type 'orchestration', if not specified. Change-Id: I994698784e5b30471f6d863034fa21aa8963fd9f Partial-Bug: #1646539
* | Merge "Don't resolve outputs when polling events"Jenkins2016-11-281-1/+1
|\ \
| * | Don't resolve outputs when polling eventsThomas Herve2016-11-241-1/+1
| |/ | | | | | | | | | | | | | | | | | | In poll_for_events, we retrieve the stack to check its status. As it stands we resolve the outputs as well, which is costly and useless in this scenario. We can simpley get the stack to retrieve its status without outputs. Change-Id: Idc2327f6be15a679d502b0cd3e9d8980fdf1e22a Related-Bug: #1638908
* | Merge "Move required modules from oslo-incubator"Jenkins2016-11-222-5/+611
|\ \
| * | Move required modules from oslo-incubatorrabi2016-11-122-5/+611
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | Use endpoint as endpoint_override1.6.1rabi2016-11-211-0/+2
|/ | | | | | | | | | | | Number of projects like rally pass endpoint rather than endpoint_override when using session with heatclient. Use endpoint as endpoint_override when not specified. Make it backward compatible. Change-Id: Iff977424a15ac2ce3ffdf8d7c98d5e72d25c1e91 Closes-Bug: #1643507
* Graduate to oslo.i18n and cleanup incubator usageChuck Short2016-11-088-12/+12
| | | | | | | | | Graduate from Oslo Incubator to oslo.i18n library. Cleanup of unused Oslo Incubator utils. Added optional enable_lazy() usage. Change-Id: I5ec02477f3f52f4d7097669120581e82cced3748 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* handle empty sections in environment filesLars Kellogg-Stedman2016-10-071-0/+6
| | | | | | | | | | | | | | If an environment file has an *empty* section, as in: parameter_defaults: This would ultimately fail in deep_update (in heatclient/common/template_utils.py), which would get called with old == None. This patch handles this situation by explicitly setting old = {} if deep_update is called with old == None. Change-Id: Ia7bee87cdb99e29c63c9dc163f8490fef3f24f24 Closes-bug: 1631408
* Don't use endpoint_override with sessiontamilhce2016-09-091-1/+0
| | | | | | | | | | | | | We should not use endpoint_override by default and rather use service_type with session. This also refactors some of the associated code. However, if one wants to override the endpoint they can pass endpoint_override to the client constructor along with session. Change-Id: I7c27d8ff827de3b4bb3e70457c0b6a3f47b6d7bb Co-Authored-By: Rabi Mishra <ramishra@redhat.com> Closes-Bug: #1621505
* Merge "Show resource name path in event log formatter"Jenkins2016-09-072-3/+72
|\
| * Show resource name path in event log formatterSteve Baker2016-09-062-3/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resource name path was introduced in the 'openstack stack failures' command and is a user-friendly way of referring to a deeply nested resource. This change modifies the event log formatter to build and display the resource name path for each event based only off data in previous events. For building the full resource path, and omitting ugly stack names from the resource path, the following heat change is needed Ib8feb7752bd5736785d142216312bb35629b3601. However the output is still improved slightly when running against an older heat which does not have this change. Change-Id: I86b687fc516da215a6baeef8b365a520d12a8ab1 Closes-Bug: #1619415
* | Clean imports in codeCao Xuan Hoang2016-09-051-2/+2
|/ | | | | | | | | | This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I9b7c8c7e37ee9861a63489f5b8fd611f2d31946e
* Add parameter_merge_startegies sectionrabi2016-08-251-5/+11
| | | | | | | | | | | | This adds parameter_merge_strategies section to environment. This also adds the missing section parameter_encrypted_names. We use a server side module and a client side module that have deviated over a period of time. This patch syncs them. We probably should move these to a library and use use them for both server and client in the future. Change-Id: I9b20a7cedd416b6d8b788a30f66e472b85babf4a Blueprint: environment-merging
* Add a nested_depth argument to poll_for_eventsSteve Baker2016-08-251-2/+2
| | | | | | | | This will allow library calls to have more control over the depth of events which are logged. Change-Id: Iecb8c89745f916c50936e013a62176d586cfcc63 Closes-Bug: #1616682
* Standardize import formatshizhihui2016-08-035-6/+6
| | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format in heatclinet. Change-Id: I0200ddad88ee833d7de9d6df2c1519e4f4560db7
* Merge "Enhance error message"Jenkins2016-07-071-1/+1
|\
| * Enhance error messagezzxwill2016-06-271-1/+1
| | | | | | | | | | | | | | Need to add a space between '%(resource)s' and 'not' Change-Id: I554653609deb72acf0e0926de0eeb81426110c03
* | Merge "Implement client side of event list --nested-depth"Jenkins2016-07-061-22/+50
|\ \
| * | Implement client side of event list --nested-depthSteve Baker2016-06-101-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: - cleans up the usage of get_events so that marker and limit are only specified in their dedicated arguments, not also in event_args (also, specifying only in event_args still works) - first attempts server-side nested_depth support - falls back to the old recursive approach if the response data lacks a link with the ref root_stack Since there is a fallback for old heat APIs, the client change can land before or after the heat change I27e1ffb770e00a7f929c081b2a505e2007f5d584 Change-Id: I43d12ec61ec359222184f07c170de3c97481f1ba Closes-Bug: #1588561
* | | Use osc_lib instead of cliffTang Chen2016-06-291-2/+2
| |/ |/| | | | | | | | | | | | | | | Base classes of commands are defined in cliff, but have been encapsulated again in osc-lib for all plugin clients. So use osc-lib instead of cliff. Change-Id: I0e430457af3033ebf56e47f85c0cfd71d2227cf7
* | Merge "Implement "openstack stack failures list""Jenkins2016-06-241-0/+2
|\ \
| * | Implement "openstack stack failures list"Steve Baker2016-05-271-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A command which prints failed resources in the stack to help debug stack issues. Failed resources are added by recursing from the top level stack into failed nested stack resources. A failed nested stack resource is only added to the failed list if it contains no failed resources so that the user only sees root-cause failed resources. As an added convenience to debugging deployment resources, deployment outputs deploy_stdout and deploy_stderr are printed as well (the full outputs are printed when --long is specified). The output is a yamlish format where the key is a dot-delimited resource name path and the value is a dict of resource information. Change-Id: Ifa44175d8dbab2f7b62691b839e1696e3af7f4f3 Closes-Bug: #1585820