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
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
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"
Merge "Raise and catch a specific error during validation"
Merge "Check top-level sections when parsing a template"
Add a resource_facade intrinsic function to HOT

Add a native version of the function, rather than continue to rely on
Fn::ResourceFacade from the Heat-flavoured-cfn templates.

Closes-bug: #1299205

Change-Id: Iee118aeaa72d59e4d6a27ed487b99e9aba9779cd
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