Add IP address to error message of failed stack

The error message that occurs when the heat-script.sh or cfn-userdata
script runs doesn't include the IP address of the server, and it's not
possible to find that info in the stack-show output of a failed stack.
Add the IP address to the error message so it is displayed in the
stack-show output to aid in debugging.

Change-Id: I35bd4fbc1a05fa8207f3eb4f501f5becf78415c9
Ensure that the NoCloud data source is loaded, part 2

The cloud-init config is now in /etc/cloud/cloud.cfg.d/90_dpkg.cfg
instead of /etc/cloud/cloud.cfg.d/10_rackspace.cfg, and that caused bug
1285891 to resurface.

Change all files in /etc/cloud/cloud.cfg.d to make this somewhat
future-proof.

Change-Id: I65e2c0795952a5807783bf272061550a4a3447e0
Closes-Bug: #1288920
Closes-Bug: #1285891
Order imports in alphabetical order (4/9)

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

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I66842c6a5d112f948e625e18ef6d01afcad61e57
Add events for automation statuses to Cloud Server

Previously, it was difficult to know if the server was stuck in
CREATE_IN_PROGRESS or if it was waiting for another automation to
complete.

Change-Id: I988a12fc520629a78d8215d4a9c529729a302741
Remove auth_token condition in clients

* Removed useless auth_token condition in clients
since we already have a condition in auth_token getter that returns
"self.context.auth_token or keystone().auth_token", keystoneclient
will raise an "AuthorizationFailure: A username and password or token
 is required" and the error message of the condition won't be shown.
* Added unit tests with no auth_token and with heat client cached

Closes-Bug: #1293806
Change-Id: Ic9ad0e60c09be1ac923f7ef8b669733d7e9c896e
Insertion port id in address attribute of server

Dictionary returned by server's attribute addresses does not contain
port id value. Current patch adds field port in this dictionary.

Change-Id: Ie458e67d976af0dd394c3fa4a6d77bce78161bef
Closes-bug: #1285899
Raise and catch a specific error during validation

This changes stack creation to return an error message instead of an
exception when (some) validation fails. It doesn't convert all validation
errors to keep the patch at a reasonable size.

Change-Id: I6364bccacbc1d447a99ea61565c96fcc90bd21f9
Partial-Bug: #1276623
Order imports in alphabetical order (8/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order).
It touches second half of tests (starting from test_n*).

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I5561d90a67eb5dc882200d432fda6b162011ac41
OS::Nova::Server depend on subnets related to nets

Nova supports creating network interfaces by network ID however
if the network and the subnet are part of the same stack as this
server then a race occurs between the creation of the subnet and
the creation of the server. Likewise for delete the subnet cannot
be deleted until all ports are removed from it.

This change adds the same add_dependencies workaround to
OS::Nova::Server that OS::Neutron::Port and OS::Neutron::RouterGateway
have.

The confirmation that this change fixes the race will be confirmed
by tempest test NeutronResourcesTestJSON once
https://review.openstack.org/#/c/82393/ lands.

Change-Id: I626b976446cda709d96823c9de331eafc29d3c68
Closes-Bug: #1243992
Imported Translations from Transifex

Change-Id: I54d40a2c1d46c1f06e48034c52be5107bf80a62a
Always answer empty list if deployments not ready

An empty deployments will cause json decode exception, and once
deployments=[] coming, it will trigger another refresh. Always answer
empty list when deployments not ready will solve above two issues.

Change-Id: Iaee3a3ef25cf9907aaefd941dcb316ecb25a29d6
Closes-Bug: #1298417
Don't log exception for None timeout_mins

If a request contains a timeout_mins key but it is None (which is
now the case for all requests sent via python-heatclient), we log
an exception, but really we just want to ignore the value and
continue (as well as other "None" values, ie '0' which was the
previous default for no key)

So split the test for a key and conversion to int, and only log
the exception if there is an error doing the type conversion,
not if we get a value which implies ignoring/doing nothing.

Change-Id: I6b8d1f053b47fd4c22a5df636481a95bd046b1df
Closes-Bug: #1297759
Merge "Imported Translations from Transifex"
Merge "Don't log exception for None timeout_mins"
Merge "OS::Nova::Server depend on subnets related to nets"
Fix incorrect error msg in validate_template()

The error message "At least one Resources member must be defined." raised
while checking the "resources" definition which has not supported in hot
template.

Change-Id: I69808bdd890929e00c9c74aa956c2def6dd256af
Closes-Bug: #1298444
Fix Jenkins translation jobs

The jobs heat-propose-translation-update and
heat-upstream-translation-update do not update from
transifex since our po files contain duplicate entries where
obsolete entries duplicate normal entries.

Remove all obsolete entries to fix the jobs.

Change-Id: I2071e3a792d107840449bbfe39e3a540ea1b626f
Closes-Bug: #1299349
Remove unused code in test_validate.py

Remove the mock of instances.Instance.nova() for some tests.

Change-Id: I48aaaacaa827cd96ad2372011daf48e386e87c01
Merge "Order imports in alphabetical order (8/9)"
version migration fails if version is an integer

The migration 043 fails to account for the case where the version
was specified as a string or version contains non-ascii characters.
This breaks migration for folks that have those incorrect templatesx
 in their database.

Change-Id: I9c2143c9d7a4d61ff41d32ee0f7b12a5640eec72
Closes-bug: 1299174