Order imports in alphabetical order (2/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches API files.

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I81c7c79516ce1a17055c3b9c12a94312ed3d1940
Order imports in alphabetical order (3/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches common and cloudinit files.

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: Ie9838dba11323575165fc3bfdfbd0d0b93f653fa
Set statuscode=404 in NotFoundException in tests

when resource can'n be found,neutron will set
statuscode=404 in NotFoundException,so add statuscode
in exception to make fake client have same action.

Change-Id: I6597f080903501d9fe6050893054cc7dba6a595b
Retry logic for SSH connection in Cloud Server resource

There is a known issue with some Rackspace Cloud Server images where
they occasionally refuse SSH connections for a few seconds just after
becoming 'ACTIVE'.  This causes the stack creation to fail.

To avoid this, keep trying to initialize the SSH connection for up to 30
TaskRunner cycles.

Closes-Bug: #1287331
Change-Id: Icf28fb3c0de21cf733c4dd0d28a7b653af1bcd0b
Fix start_with_acquired_lock - pass kwargs to func

This method of ThreadGroupManager was not passing kwargs
to the function to be started.

Closes-Bug: #1288627
Change-Id: Icaaa012bcc65c67f3e8ecc2878dee2a78121e357
Fix InternalException raised on stack-show

Getting attributes of a OS::Nova::Server raises a 500 error if the server
doesn't exist. So stack show doesn't work. We should catch the exception
and return the default values of the output keys of the server while
getting attributes to make sure the api works.

Change-Id: If569b4d73abbce93d3c56c45a1eb284720c6e416
Closes-Bug: #1279085
Resource type implementations for structured software config

StructuredConfig takes configuration as a Map property, which
results in config that is stored and returned as a parsed dict.

This will be used for defining both cfn-init and tripleo software
configuration inline in a template as strucured yaml.

StructuredSoftwareDeployment will transform the config to substitute
{"get_input": "<input_name>"} with the current input values and storing
the result in the ephemeral derived config.

partial blueprint hot-software-config

Change-Id: I8029f469dfc2a77453abdab46c1a69ba317fc7ea
Remove unused versions define in template_format.py

Remove unused 'HEAT_VERSIONS' and 'CFN_VERSIONS' define in
template_format.py.

Change-Id: Icb6920fa481259868b6bf2feaab9859a13c59467
Return template based class in list resource types

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
Order imports in alphabetical order (1/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches contrib resources.

Change-Id: Icfe39ee206a70a25e78027a5d097d1208f8750cf
Implements: blueprint reduce-flake8-ignored-rules (partial)
Order imports in alphabetical order (6/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches engine resources files.

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I7ab23e1df0c5c0ceba4bb6e4f3d6558e06bee2dd
Improve compatibility between Keystone V2 and V3

To improve compatibility between Keystone V2 and V3, this renames the
client @property in both of them from self.client_v2 and self.client_v3
to just self.client.

This allows both of them to be used by third party contrib plugins in a
seamless manner.

Closes-Bug: 1289528
Co-Authored-By: Richard Lee <rblee88@gmail.com>
Change-Id: I60412ecb1665232ffeeeb869fb00d368604601d2
Allow update of disable_rollback

Previously, any change to disable_rollback was ignored during
stack-update.

Change-Id: I76aaf5be379dab5347e392392b2334ab1d8749b0
Closes-Bug: #1290943
Removing unnecessary required=True options

Property with a default value should not have required=True,
since it has no effect (the default value would be used if a property
were not given, making it not required).

Change-Id: I760ed5c010c9ff3c0e4dc0fc7860f1e18147921d
Refactor Template.parse()

Split out Template.parse() as a separate function. This saves an expensive
method call to self.functions() for every potential intrinsic function in
the template, plus makes a template parsing routine available to other
parts of the code that may want to use it, without being tied to a
Template's ideas of what the intrinsic functions available are.

Change-Id: I1d4b847967357dbe5c9960223a063377aec50e5d
Merge "Resource type implementations for structured software config"
Modify assert statement when comparing with None

Replace assertEqual(None, *) with assertIsNone in heat's
tests to have more clear messages in case of failure.
Also, replace assertNotEqual(None, *) with assertIsNotNone
for the same reason.

Change-Id: I34dbf9b87c7c8c6ca4949b53bd5ef763a9c2fc24
Closes-Bug: #1280522
Use stack ID to create domain project name

If the project for a given stack didn't get deleted for any reason then
launching a stack with the same name will fail as project names
are enforced to be unique.

By using the stack ID instead this issue is avoided if the project delete
didn't occur.

The resulting project name is truncated to the limit of 64.

Change-Id: Iba09cf94bdaa6a92d9520ed1743805862dc1b14d
Closes-Bug: #1288514
Fix HOT inconsistencies in resource sections

This patch fixes inconsistencies between keywords in resource
definitions in a HOT template as documented in the HOT specification
and the way they are processed by the code.

So far it was possible to use CFN like syntax or HOT syntax inside
resource definitions (e.g. both 'properties' and 'Properties' were
accepted) since the HOT processing code did tolerant processing.
Consequently, users had been able to produce CFN/HOT mixed templates.

This patch introduces strict enforcement of allowed keywords to
make HOT templates consistent with the spec by providing concrete
validation errors in case of invalid keywords.

This patch also adds a DB migration step to update existing templates
in the Heat database with potentially legacy keywords to comply with
the new strict syntax checking rules.

Change-Id: I44309acda86a930030cb70493f409e3ea4740130
Closes-Bug: #1274288
Closes-Bug: #1271008
Add space to description of stack_domain_admin

Without the space we have words being concatenated in the final
description.

Change-Id: I67dcd53bde64afccecd61af45cf7250473f3974a