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
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
Add a base class for pluggable functions

These functions can be substituted for their corresponding syntax in the
parse tree and lazily evaluated at the time their output is needed. Thus,
no distinction between statically-resolvable and runtime-resolvable
functions is required.

Change-Id: I3e89b6ee0d17b6755b35ab52b52a22a8d3db6c29
Refactor re-resolving of templates

In various places we are forced for various reasons to re-parse a resource
template snippet. Consolidate these into a single method call.

Change-Id: I087e4626082913617b962ba05c24d60537788504