Use ResourceDefinition for creating Resources

Initialise resources with a ResourceDefinition object rather than a JSON
snippet from a template. We no longer need to store the json_snippet (since
the resolving of intrinsic functions is reversible when necessary), so get
rid of it.

Change-Id: I23d183d986ab1d771407502ec926e736d1f48d79
Get the dependency graph directly from functions

Prior to this change, while template formats were pluggable, only the
intrinsic functions defined by HOT and CloudFormation could affect
the dependency graph. This moves knowledge of the template format out of
the Resource class and allows the ResourceDefinition to determine it in a
format-independent manner by collecting it from the intrinsic functions
defined by the template plugin.

Change-Id: I592ac2074a600a44578ce97309def1280c72e61d
Merge "test_engine_service remove redundant DummyThreadGroups"
Move Engine initialization into service start()

Currently we create the ThreadGroupManager and EngineListener
objects in the service constructor, which is not necessarily
going to work if multiple worker processes are specified in
the config file (which fork multiple workers after the constructor).

The ThreadGroupManager appears to work, even when it is created before
the fork, but this is due to some magic in the oslo ProcessLauncher
implementation which decouples parent/child use of the eventlet hub.

So instead, we move all service startup code into the start() method,
which is the entry point for services, triggered via the oslo Services
class run_service method:

- Don't create anything common to the workers in the constructor
- Move ThreadGroup and EngineListener creation into start()
- Create the periodic tasks from bin/heat-engine, which means
  the periodic tasks will only be created by the parent, not
  duplicated in every worker process.

These changes should mean we work correctly with both the ServiceLauncher
(num_engine_workers==1) and ProcessLauncher(num_engine_workers>1) oslo
abstractions, and solves the issues observed when running multiple
workers with the impl_qpid rpc_backend.

Change-Id: If3a11050a03660560a364dec871f85c4b56c1c25
Closes-Bug: #1321303
Remove translation from loguserdata

The logs in loguserdata don't need to be translated because it's sent
with the po files to instances, and actually break because of gettext
not being used

Closes-Bug: #1325313
Change-Id: I365f3d882b8f64f9710eea4901ac266f9fcf0da3
Set rollback status early in update if triggered

Before when rollback was triggered during stack update, the stack continued to
have status UPDATE_IN_PROGRESS, and only at the very end flipped to
ROLLBACK_COMPLETE.
This patch sets the stack state to ROLLBACK as soon as
rollback is started to notify the user properly on the action being
performed.

Change-Id: Idbd78a3a2a8d0c32fb26c7d0c38c87857d1565d8
Closes-Bug: #1316558
Fix requirements_style_check on BSD platforms

On Linux, the sort command implicitly ignore non-alphanumeric characters
when sorting.  Since the '>' character has an ASCII value greater than
the '-' character, the following list will be sorted on Linux, but not
on a Mac:

SQLAlchemy>=0.7.8,<=0.9.99
sqlalchemy-migrate>=0.9.1

This makes sort explicitly ignore such characters and will keep the
tests consistent across different environments.

Closes-Bug: #1324945
Change-Id: I559ae4b4c3e2a7d190af9d4b1517dfaf23d114b1
Support of regional endpoinds using Keystone v2

Handles the configuration region_name_for_services
with the keystone V2 authentication.

Change-Id: Ibba4d617937da8ba6018471e9614259e90409a47
Include parameter name in error message

Including parameter name in StackValidationFailed exception
message.

Change-Id: I9d8f4e4a1986496d9be96f0e2a272cbc4da92b49
Closes-Bug: #1324968
Merge "Add a ResourceDefinition class"
Fix default template for AWS::CloudWatch::Alarm with Ceilometer

Existing template assumes certain parameters to be delimited
strings rather than lists and uses 'Fn::Split' to convert them
to list. However, delimitedstring representations of parameters
are by default converted to list for CommaDelimitedList types.
Also includes change for CommaDelimitedList to accept empty string.

Change-Id: Ib566f1d098c575a80c4f1a975eaaaac93d70af34
Closes-Bug: #1316842
Merge "Use ResourceDefinition for creating Resources"
Merge "Get the dependency graph directly from functions"
Adding error message for output description

All caught exceptions should be displayed in output section.

Change-Id: I217bb52e33c3f0d20c3d01e75326687cc713d90a
Related-Bug: #1273490
Added field parameter identifying the custom validation

In the template file a field with custom constrain should
return in the parameter arguments a custom constrain value.

Change-Id: I7df56a840eabb2f8093ea82eb822a764e9267b40
Closes-bug: #1313835
Merge "Remove translation from loguserdata"
Heat and Openstack incomplete documentation

Improve documentation running a heat template with devstack

Change-Id: Ifb6abd30a882d4c5197090c87498781702488b9c
Closes-Bug: #1326089
Fix spelling in a doc string

Change-Id: I7f09cfd7892fce64c99484a36b22ec6a6bada6b1
Merge "Add OS:Barbican:Secret resource"
Merge "Add OS:Barbican:Order resource"