Make the first line of every file consistent.

Change-Id: I2e1a809cfca8e88693551d58d33e747f54ee5eb1
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
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
Make sure NetworkInterfaces and SubnetId updatable

We should make the properties 'NetworkInterfaces' and 'SubnetId'
updatable for AWS::EC2::Instance resource, so we can update the networks
for an instance.

Change-Id: I4a475fee6416696558807c189473a90d7517cfc0
Closes-Bug: #1280151
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
Ensure parameter timeout_mins available in update

The parameter timeout_mins is not available when
updating a stack. The updater gets it from the
old stack no matter whether timeout_mins is
offered or not.

If timeout_mins is not offered in the new stack,
get the timeout from the old stack, and update
this parameter using the new stack's timeout.

Change-Id: I7d04d0f0b7cc917d49d45c0d3e1d5a8ffb7bff0b
Closes-Bug: 1290603
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
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
Run pep8 check in run_tests.sh as in tox

Until now the flake8 tests run by tox and run_tests.sh were a bit
different - run_tests.sh was not checking heat-* python scripts in bin
folder and was checking the docs folder that is ignored in tox' pep8
check.

This patch brings pep8 style checking done by run_tests.sh in line with
what is done by tox (and thus the gate).

Change-Id: Ie3f2c25210075df6b941854737f0d926d141601b
Credentials for native heat os-collect-config polling

For Server software_config_transport=POLL_SERVER_HEAT the os-collect-config
configuration has been changed in the following way:
* included stack_id and resource_name
* replaced username with user_id, since domain users should always be
  referenced by ID.
* renamed the collector key from "heat_server_poll" to "heat" since that
  is the intended name for the heat collector in os-collect-config

Closes-Bug: #1299986

Change-Id: I42326c81c7276d7d305a05c00d72a6102e80abca
Open Juno development

Bump preversion to 2014.2 to formally open Juno development.
The Icehouse release branch (milestone-proposed) will be cut
from the last commit before this one.

Change-Id: If32c579c42b86946459e24ca15778297761d1498
Check top-level sections when parsing a template

This patch adds validation to template parsing to detect any sections
that do not comply with allowed sections in a template. In the past,
there have been cases where small typos in section names (e.g.
'output' instead of 'outputs') did not get detected and caused issues
at a later point, i.e. by simply not showing any stack outputs.

The place where the template.validate() call has been added to the
parser code only affects new stacks and rejects invalid templates
with an error message. This does not affect stacks that are already
in the database (I did some tests to check this).

Change-Id: Ifed4207badeb364675c905224ba762a9d8eaedd9
Closes-Bug: #1297761
Merge "Open Juno development"
Add a default DeletionPolicy for Fn::ResourceFacade

The provider template can't know whether this is explicitly included in the
facade resource's definition, and shouldn't need to.

Closes-bug: #1299202

Change-Id: I01177a84b86b69e221d83d87f3efd9e07e5b9c1f
Resolve data from Resource Facade

Since we are looking directly at the template data for the resource facade,
we need to resolve any intrinsic functions that may be present. (For
example, this would be expected if we ever had more than one level of
provider templates, or if e.g. the DeletionPolicy was passed as parameter
to the main stack).

Closes-bug: #1299204

Change-Id: Iaae2fe7be6618c1dee84f2c90bdc179dc2be67d6
Merge "Fix Jenkins translation jobs"
Merge "Add a default DeletionPolicy for Fn::ResourceFacade"
Merge "Resolve data from Resource Facade"