Change pyrax identity_type of Rackspace resources

The Rackspace resources utilize the pyrax library. As of v1.4.11 of
pyrax, the manner in which default region is determined changed, such
that the keystone identity_type returned 'RegionOne' as the default
region rather than one of the Rackspace regions. Changing the
identity_type to rackspace fixes this.

Change-Id: I36cd61393a76fbb9b0bb1fd4b31f26f6a95df3a3
Closes-Bug: 1227387
Make the testing of resource loading easier

Pass an environment object around so tests don't have
to use the global object and then conflict with other tests.

Change-Id: I0d9a0d3bd825ac415847213ee4a5d7473f80dbd6
Partial-bug: #1236107
Move the registration of the global env to after plugin resources

This prevents a user's template resources from getting overridden
by a resource plugin.

Change-Id: Idd1a5155dd28d662df8cdc44d190e24c84fd7a81
Closes-bug: #1236107
Cleanup nested loop variables in TemplateResource

This patch makes these variables more verbose.

Change-Id: I40d6d3d2b0ffc9d792c75de51b5107e5fa73bd91
Partial-bug: #1235077
Don't try validate TemplateResource properties in template_validate

If the user runs "heat template-validate ..." and one of the resources
is a TemplateResource we won't be able to validate the properties
of that resource as we have to instantiate the TemplateResource
to kick off downloading the template and conversion of parameters to
properties.
Note: validation will happen properly when the user creates the stack
      so this just delays the validation of one resource type by one step.

Change-Id: I6ce53a9e78ae470b54320862fe910eef9f603941
Closes-bug: #1236327
Update some cases of iterating stack resources

Since https://review.openstack.org/#/c/49879 iterating over a
stack will return resource names instead of resources.

This change updates some cases of iterating on a stack, there
are likely others which remaint to be updated.

Change-Id: I3fff5d7d7fd0016d741151010d0e1ce969da01b3
Partial-Bug: #1236678
Create a better exception in Fn::Replace

if the replace value is the wrong type we get a generic exception
out of string.replace that does not really help with debugging
a template.

Change-Id: I2d6d5509b8900b11bfbf148230d57438e1f9962a
Save parse errors in TemplateResource for later

If there was a parse error re-raise it in the validate.

Change-Id: I25759c4f03fe8f9353c03f8fd4d9bb099ea1b478
Close-bug: #1232127
Increase support for the AllocationId property

This patch makes it possible to use the following snippet:

  "VpcIp": {
    "Type": "AWS::EC2::EIP",
    "Properties": {
      "Domain":"vpc"
    }
  },
  "VpcIPAssoc" : {
    "Type" : "AWS::EC2::EIPAssociation",
    "Properties" : {
       "InstanceId" : { "Ref" : "Server"},
       "AllocationId" : { "Ref" : "VpcIp" }
     }
  }

Previously the Heat service would fail the stack creation because it was
looking for the Neutron router created by means of AWS::EC2::VPC
resource.

Fixes bug: 1234671
Change-Id: I6fb6a5cd0d034d15516fcc0cb266c695836d972c
Don't install EPEL rpm on CentOS 6.4

Attempting to install the already-installed EPEL rpm on CentOS 6.4
causes stack-create to fail.

Change-Id: I0474622e3976113ec3b80855f3a04a3e339ab193
Catch the appropriate exception for missing instance

Catch ClientException instead of NotFound since this is
what the underlying client library actually throws.

Closes-Bug: #1236911
Change-Id: I1e7f3c69c216d19705cab9bdcd7302e1b917fdd4
Add help for purge_deleted command age argument

At a bare minimum explaining this argument helps understand what
purge_deleted is going to do.

Change-Id: If73ba272e8ea0742f8be93994ec2fac68d4ed3fd
Fail stack-create if script exits with non-zero status

If the heat-script or cfn-userdata script exits with a non-zero
status, the user will see which script failed and where to find
the debug log on the server.  This will allow the template author to
conditionally fail a stack-create in the user_data section.

Change-Id: Ibc3768d8192102b9057d4ba873058cb50abcd1b1
Rolling update support for Instance/AutoScalingGroup

This is the last part of the series to implement support
for AutoScaling UpdatePolicy.

Modified handle_update of InstanceGroup and AutoScalingGroup to
support rolling update if there is an update policy and when
there is a property difference in LaunchConfigurationName. A new
replace method is created to handle replacement of instances in
batches. Replacement of instances occurs prior to resize. The
_lb_reload is called appropriately for each batch. The resize
method is refactored to support underlying changes in
_create_template.

Change-Id: I8113a964fb6eb0ec16c2e3766d2771e64e1cf248
Implements: blueprint as-update-policy
Merge "Update some cases of iterating stack resources"
Merge "Cleanup nested loop variables in TemplateResource"
Merge "Don't try validate TemplateResource properties in template_validate"
Merge "Make the testing of resource loading easier"
Merge "Move the registration of the global env to after plugin resources"
Merge "Change pyrax identity_type of Rackspace resources"