raw_template hot parameter type data migration

Changes were made to the hot syntax which prevent invalid templates
already present in the database from being loaded as part of a stack
list. This database migration forces the parameter schema type to
be lowercase.

Change-Id: Iaa4b16e9b5188e6e99cda95e1c7fb0dc11c206f7
Partial-Bug: #1274288
Raise the default max header to accommodate large tokens

PKI tokens hit the default limit if there is enough
services defined in the keystone catalog.

Also the v3 catalog is larger than the v2 catalog which would explain
why this bug is being hit just now.

This change adds the configuration option max_header_line to each of the
API confurations which has a default of 16384.

Closes-Bug: #1190149
Change-Id: I5da09aa08a1242c5e356bd8bf532baa9347ce075
Translate constraint description in validation

The patch modifies format_validate_parameter to include constraint
description in the CFN compatible output.

Change-Id: I31c6a4dc025a782e8951280e42652b12070476b3
Closes-Bug: #1274994
Handle API limit exception in OS::Trove::Instance

troveclient raises a RequestEntityTooLarge exception when an API limit
is encountered.  Previously, this would cause the stack action to fail.
Log a warning instead.

blueprint improve-api-polling

Change-Id: Ia7e5e321d5e1284880ee71fa0457be5726860aad
Add validation to KeyPair resource

Make sure a keypair with the name passed to the KeyPair resource doesn't
already exist.

Closes-Bug: #1278532
Change-Id: I466e035e207def85ded5b2978a7da8cfe5ffb6a8
Fix usage of resource_data_get_all in stack-abandon

Stack abandon was failing if any stack resource has resource data
because resource_data was not properly used in resource.py
get_abandon_data method.

Closes-Bug: #1278535
Change-Id: I0f41ddf530d34e7d27f740fb4f56e7ce17a43d1a
Display max_template_size when a template is too large

Show the value of the 'max_template_size' configuration variable in the
error message when a user uploads a template that is larger than the
configured maximum allowed size.

Change-Id: Iaef8f0a9fd2f9df81459539226bceb9146a13f8e
Closes-Bug: #1279888
RandomString use the random string as the resource_id

This allows template authors to ref the resource to get the string
as an alternative to getting the value attribute.

Change-Id: If2b51923414655befd7af21e2de701e83b7994b6
Native Nova Server compatibility for Cloud Server

Make the Rackspace Cloud Server resource compatible with the native
Nova Server resource so that a template author can replace
OS::Nova::Server with Rackspace::Cloud::Server, without making any other
changes, to make the resource use Rackspace Cloud Servers instead of
Nova.

Blueprint native-nova-cloud-server
Change-Id: I312ddc25e02843b0116b8a2cb88defef05ca88ac
Re-enable lazy translation

After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.

bp i18n-messages

Change-Id: I15ecffd678393c27c34336035d37915655e9f350
Don't disable SELinux in cloud-init's boothook.sh

This is a first step towards fixing #1257410 as outlined in the bug
report.

Disabling SELinux is not necessary, but the fact that we're using both
the `user` directive in cloudinit/config and `useradd` in boothook.sh
is a bit confusing so this documents the reasons for both.

Change-Id: Ife4fec99650341de698eb51741d96f95de00dcf0
Partial-Bug: #1257410
Remove empty unit test directory

We have an empty unit directory for tests that we don't use, let's
remove it.

Change-Id: Ic1ad62b00e56504c8cfdd3a23cfc0e2c595524b3
Refactor resource loading functions

All logic related to resource loading is currently put into
resource_mapping functions in each resource module and it doesn't
return the mapping information if the dependencies for a given
resources are not satisfied.

This refactors the way resources are loaded, so that the mapping
information is always available and if the dependencies are not met,
another function can be used to convey that information to heat:
available_resource_mapping().  To keep backwards compatibility, if
available_resource_mapping() is not callable for a given resource
module, the previous resource_mapping() will be used instead.

This allows the mapping information to be used in other places, such
as tests (without the need to hard code the mapping information when
registering the resource for the tests) or doc generation (to allow
the resources to be loaded even without their dependencies).

Related-Bug: #1271226
Change-Id: Iabd3da70f7ba35e0b43a2409e170be7f41a351a6
Add engine preview stack with Template and Params

Add support for the engine to return the preview of a stack given a
template and the necessary parameters.  No resource will actually be
created, just returned for visualization purposes.  This allows a user
to know beforehand what will happen to their stacks once they used such
template.

The response is a formatted stack plus formatted resources in it:

  {
      'stack': {
        // stack information similar to a call to stack_create/show
        'resources': [
            // resources similar to a call to resource_show
        ]
      }
  }

For now, grouped resources (any of the StackResource) will just be
returned as a single resource, but the preview will be overridden in the
future to allow for more specific behavior.

Implements: blueprint preview-stack (partial)
Change-Id: I8b862110f00ac0cf31d96a86cbc134df895cc19b
Add API support for stack preview

Add endpoint for previewing a stack as returned by the engine.  The call
is similar to a create_stack call and takes the same parameters, but
will issue a preview instead of a create.  The response will be the
formatted stack plus the formatted resources that would exist with that
template/parameters.

Implements: blueprint preview-stack (partial)
Change-Id: I5fcfa76e741c556a7edf222805b41923344becbe
Merge "Re-enable lazy translation"
Merge "Handle API limit exception in OS::Trove::Instance"
Merge "Translate constraint description in validation"
Remove spurious tracebacks from tests, part 2

Added the same fix that was applied to the other stack_delete tests in
ed7710cd3 to test_stack_delete_other_dead_engine_active_lock.

Change-Id: I3a81844bd6c21013e5956fce9ff9fe5508fcbd94
Closes-Bug: #1278836
Prevent user introspection of Python objects

The get_attr and get_param built-in functions in HOT allowed introspection
of Python objects as well as traversing lists and maps, which we very much
do not want.

Fixes bug #1280526

Change-Id: I5f8f4bfa37d33eb0a1df962b69a3b6e029ad0048