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
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
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
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"
Merge "Raise and catch a specific error during validation"
Merge "Check top-level sections when parsing a template"
Disable check_uptodate.sh check in pep8

Running generate_sample.sh currently produces an invalid heat.conf.sample
due to bug #1288586.

This change disables the check_uptodate.sh in the tox pep8 so that the
gate-heat-pep8 job passes while we find a more appropriate solution.

Change-Id: Ib20c4f892df68f7112d969d801a18a1a5bfbd474
Related-Bug: #1288586
Initial validation of functions

All template functions contain only 'result' function for resolving
snippet of template. Current patch presents initial implementation of
validate method and support function 'validate' similar to 'resolve'.

Related-Bug: #1273490
Change-Id: Id81493bd72e75da746101c4c741eaf846abd8360
Validation functions for resources and outputs

This patch add ability to validate values in outputs section and also
validate properties in resource snippets.

Related-Bug: #1273490
Change-Id: I9ccb880954751555709bd92f2412cf5606969e70
Fix incorrect logic during updating in unittest

The property image_update_policy has two ways for initialization during
update. One of them is when image_update_policy is not presented in
prop_diff and shoud be used from self.properties. So image_update_policy
should be used in old and new templates without any changes.

Related-Bug: #1298850
Change-Id: Ie9afa65ad6d095d4293be077536fb807919de789
Merge "Always answer empty list if deployments not ready"
Merge "Initial validation of functions"
Merge "Validation functions for resources and outputs"
Merge "Fix incorrect logic during updating in unittest"