On Python 3, the decorator does nothing. On Python 2, it aliases the
__str__ method to __unicode__ and creates a new __str__ method that
returns the result of __unicode__() encoded with UTF-8.
All instances of __unicode__ have been removed with the
aforementioned decorator in place instead.
Note: There are some instances of __str__ which aren't handled but
will be once we have actual python34 tests running in the gate.
partial blueprint heat-python34-support
Change-Id: I7271a2581e1c2bbc282933c7da73db810c7e09db
Add HIDDEN status to SupportStatus and it's supporting
in code: hiding objects with HIDDEN status in docs and
resousce-type-list.
bp deprecating-improvements
Change-Id: Iebd77d769966bab321aeaf3e23b7f54e9456ad13
Updates engine resource_type listing to consider the
availability of resource based on service deployed
and configured in keystone
implements blueprint keystone-based-resource-availability
Change-Id: Ide88e503a1c5501a6f7685c5f85d3c340c73824f
Since Ib0c191db2dccac6d467a9961062424bc1f924c24 we re-register a
template resource in case the global environment is changed. This
is fine but the path to the resource is not maintained. This patch
fixes that by passing the path through to the registration function.
Change-Id: I7a8ec66d0f12a12bb4e44d2eb7efd182d758fea1
When a resource that has a support status different than SUPPORTED is
registered, the heat engine prints the message associated with its
SupportStatus object as a warning. This change avoids an engine crash
that occurs when a resource's SupportStatus does not define a message.
Change-Id: Id86bf93baade5b4fb0a71a80275b20d70710f2f4
If hooks of resource breakpoint are invalid, should
raise error message to user, and then user will know
what happen and why no pause on updation/creation.
Change-Id: I53822ed96fafdd373d20c45cacb5e33ba0306292
Closes-Bug: #1452636
1. Add a configuration option to enable/disable template parameters
encryption.
2. Encrypt hidden parameters before storing them in the database and
decrypt on stack load.
Change-Id: Ie46c6a149f414f655600616da8deee463e55671c
Implements: blueprint encrypt-hidden-parameters
Co-Authored-By: Jason Dunsmore <jasondunsmore@gmail.com>
If change local language to other languages(like ja), heat-engine
will failed to start.
Closes-Bug: #1446958
Change-Id: Ia3cbcebb86257bc1c52ea758c1583191e5a52a2d
(cherry picked from commit 0b3dd7be3d)
generate_template and resource_schema methods of service.py
raises wrong type of exceptions after catching them.
Also resource validation failure should not raise stack
validation exception.
Change-Id: I44b8d37db7d2687cee2a7b675dd062b3af3ee167
Closes-Bug: #1447194
If change local language to other languages(like ja), heat-engine
will failed to start.
Closes-Bug: #1446958
Change-Id: Ia3cbcebb86257bc1c52ea758c1583191e5a52a2d
If env loaded from outer file, there is probability
that this outer file will be deleted. So, if template
uses some resource with resource registry env, we need
to store this env in db.
Change-Id: Ib0c191db2dccac6d467a9961062424bc1f924c24
Closes-bug: #1429141
This covers most of the features specified in:
http://specs.openstack.org/openstack/heat-specs/specs/juno/stack-breakpoint.html
The breakpoints are specified via hooks in the stack's environment.
The only thing missing from the blueprint is stepping through a stack.
Partial-Blueprint: stack-breakpoint
Change-Id: Iddc019464484af18ca6f21f11660649e30d63aca
Instead of going back through the stack linage, just remove the template
resource "mapping" from the environment when we go to create the
child environment. This is a lot more efficient when creating stacks
with RPC. We don't want to reload every stack in each stack.
part of blueprint decouple-nested
Change-Id: Ic93d08e41d2214e51c836be306a500e5c3939f0f
The oslo-incubator log modlule has been removed, so port to the oslo_log
library. Note this uses the new (non namespaced, e.g oslo.log) import
convention, we'll need to align other imports in a future commit.
Some import reordering was required due to pedantic H30[57] checks, and
the services have all been converted to initialize the oslo_log library
as this is done differently to the log.py in incubator.
Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
Use parentheses instead of backslash for line continuation.
Plus, usage of escaped quotes in long strings is avoided where it makes
sense.
Change-Id: If2e78012b85a4430c6f03f65784cac2d032cf116
This give the user a way to set defaults recursively down nested stacks
without having to create the parameter in every template (it's ignored
if the template does not have the parameter).
blueprint env-nested-usability
Change-Id: Ie6b4481417204a527d322fd532c341b9acbce473
For python3 compatible, using six.string_types instead of
basestring(). six.string_types represent basestring in
python2 and str in python3.
Change-Id: Ib4ba3d164f782601944023b99d6cc1ee2763ee85
This patch replaces the _nested_environment with a new method in the
environment module. The intent is to make it easy for some resources
(such as remote-stack) to use its own environment without having to
subclass from StackResource.
Change-Id: Ice0124aa21086788e957eb708b6bc423779202bc
Currently, Log translation is motivated by oslo's move to prioritized
translation of strings, as documented at
https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation
- add log translation hints for warning, error and info levels
- move from LOG.warning to LOG.warn
- remove use of % as a string formatter, use the log functionality
instead
Partial implements blueprint log-translation-hints
Change-Id: Ie2f5f7b1b3ce0e6868f0c9c513adf5e870481492
This also adds a deprecation warning.
This also changes the default to use Ceilometer.
Release message:
Anyone deploying Heat should not be using OS::Heat::CWLiteAlarm, but
OS::Ceilometer::Alarm.
CWLiteAlarm should be explictly disabled in /etc/heat/heat.conf by
setting "enable_cloud_watch_lite=false". This will stop Heat from
running a period task check for alarms.
DocImpact
Change-Id: I2a10c14772bdafc001e211d7e94502ac1f6b32b1
Closes-bug: #1322128
For stack-update, a new argument named clear-parameters with
a list is passed in from the CLI and the new PATCH ReST API
to delete the indicated parameters from the existing parameters
in the DB, allowing the default parameters in the template to
be used. A new method in environment handles the reset.
Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: Ia1270b679f27e264e6977c590d676b947c74c5da
For stack-update, add a new PATCH ReST API and a new CLI
argument named existing-parameters to indicate that the set
of parameters should be patched over the existing parameter
from the DB. A new method in environment handles
the patching.
Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: I802e0dca44926be3a3f45fcaa995c866a4abf998
According to https://wiki.openstack.org/wiki/Python3 dict.iteritems()
should be replaced with six.iteritems(dict).
Change-Id: I9e2881a006433c8b44a3caccebc73bae4973a041
We make sure that there is no infinite recursion by not repeating
a TemplateResource within a resources inheritance.
Change-Id: I1ffa66886923b15b52a8075089dd4042f0a55862
Fixes-bug: #1297396
Only support this in user environments.
Note: this is only when you have the following in your template
resources:
thingy:
type: http://example.com/foo.template
Doing this will avoid tenant-specific provider template URLs being
shown globally in the resource-type listing.
Co-Authored-By: Angus Salkeld <angus.salkeld@rackspace.com>
Closes-Bug: #1311223
Change-Id: Ifa18108afacbda390b19b46a8f41bc4f018e95d6
This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order).
It touches engine files (without resources).
Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: Ifd36fc49199c48af891bd8e7cc2d2262a53032eb
Trying to use an external template as a resource fails in obscure path
in the environment because TemplateResourceInfo value is not required.
Enforcing a value (with the template path) fixes the issue.
Change-Id: Ib92bc0827e9a94a3735493eb47cd227449552990
Closes-Bug: #1288541
Create a class with properties_schema and attributes_schema when
accessing a local template resource.
Partial-Bug: #1287164
Change-Id: I4b341a369046543c8e3ee1adf3906568d4d8161a
The function for registering information about provider templates
referenced via urls is causing a KeyError. This patch checks for
checks for the existance of the specified resource befor removing
from the registry. This will prevent KeyErrors in stacks referencing
provider templates that are persisted in the database.
Partial-Bug: #1288541
Change-Id: Id58d5bfeac896d0d52eb4262b25eff3a5fe2238c
Don't filter out TemplateResourceInfo in ResourceRegistry.get_types so
that they are available in the resource-type-list API.
Closes-Bug: #1286179
Change-Id: Ie26e3b12e9f05568f146458a0d0c5c120970978b
This adds a new registry of constraints and a CustomConstraint class to
be able to validate against external services.
blueprint param-constraints
Co-Authored-By: cedric.soulas@cloudwatt.com
Change-Id: Iffaf2c1179eaf5d88cdea02b63782cea9f3fc616
The template guide documentation references OS::Compute::Server in several
places, and there are similar errors in the environment code comments and
environment test code. Also there is a similar issue with template guide
reference to Rackspace::Compute::Server, and a minor typo/spelling issue.
Change-Id: Iafbf405a328bdd8222c277efe5b52d7f8f589635
Closes-Bug: #1270078
Now heat resources haven't support status. We want service providers
to have a way to assign support status metadata to resources. And
then user should be able to filter resource types by support status
when quering the api for resource types.
Add processing of query parameter support_status to list_resource_types
function in heat/api to filter resources by. List_resource_types
returns a list of resources with a certain status or a list of all
resource types by default.
Add filtering on the server.
Add changes to tests:
- test_rpc_client.py
- test_api_openstack_v1.py
- test_engine_service.py
Implements bp filter-resources-by-support
Change-Id: I719c0d690886153adb698aea4695ddd526e7a4af
Validation of resource type existence was missing.
The patch adds validation checks that in the template the resource
type is set and is not an empty string.
Change-Id: I171644010ec868e8acc4c29556889256e8bf51b6
Closes-Bug: #1257243
Resources may be registered multiple times. This
ensures that logs are only emitted the first time
a resource is registered.
Change-Id: Iedd12d55007ee24ea6ecbe4fe7152ff65ea665b0
In heat, almost 200 log message and at least 30 exception
message are not processed by _(), and will not been translated.
We should use '_("STRING ...")' to enable i18n support.
I split to two parts for review easier because the files
lost of _() are too much.
Change-Id: I36ccd119fc1dcb58e98b77b2c9d139af6a380a7a
Closes-Bug: #1249217
To remove a resource, you add the following to the global environment:
resource_registry:
'AWS::*':
implements blueprint exclude-resources-option
Change-Id: Ia7c6c78ad3c1850ea20dd942d8d52957b5ad2b11