Move calculating new capacity to a function

This is part of the refactoring to fix the
inheritance hierarchy of AutoScaleResourceGroup.
In this case, attempting to move some common
functionality out of the inheritance hierarchy
entirely (perhaps to the heat/scaling module).

Calculating the new capacity while taking
min/max constraints into account, seems like
some common functionality to any type of
scaling.  This way, the extra bounds checking
in handle_update can be eliminated as well.

Change-Id: I0f4c78df15d3d973394ccfa14178941d170c9944
Show correct error messages

When a ResourceFailure exception raised in heat/engine/stack.py,
the error message is not correctly printed. This patch fixes it.

Change-Id: I0636b0d14f0169117fe96df7a4360b1349f7b12d
Amend docs with `immutable` property attribute.

Include warning about updates not being supported for a propety
based on its `immutable` value being True.

Change-Id: I10fe495a2a35429b3d6e254c23ae91732e2e4dd8
Implements: blueprint implement-aws-updates-not-supported
Deny updates to AWS::EC2::Volume resource

According to AWS docs [1] Volume resource does not support updates
(including resource replacement) of any of its properties.
To align our AWS-compatible resource with such behavior, all properties
of AWS::EC2::Volume resource are marked as immutable.

[1] http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html

Change-Id: I7fea68f11c58d395c1eb31fae834afcab5dc4d1e
Closes-Bug: #1340093
Appropriate exception for signal handling failure

Raise an appropriate exception, mapped to a 400 error for signals
to resources which cannot handle signals.  In this case, the request
is inherently impossible to satisfy, because the plugin doesn't
support signals, so we should alert the user to this by saying it's
a bad request (rather than the current response which is a 500 error)

Change-Id: I8e47ee94e15309f378f62f2a9f6534a4eeddb389
Closes-Bug: #1346849
Fix DBError output in test logs

After patch If48ba9d3deb54f8e9ea1ed1987f832ddbaed33fc a (non-fatal) DBError
is displayed during unit tests run.
This patch fixes that by proper mocking (and stops mixing mock and mox
in single unit test).

Change-Id: I2bd857492d2fca7f3683f7b7a6b062e3dddcbeed
Template get_version breaks with Template object

The get_version method on template expects a dict, breaking
stack preview. This patch modifies StackResource preview
to always call the Template constructor with a dict

Change-Id: I6e75a78b4d496e235f11ec3d94ee58a069ab5336
Closes-bug: #1351005
Implement check for Instance resource

Instance resource will raise an error if it's not active at the time of
the check.

Co-Authored-By: Richard Lee <rblee88@gmail.com>
Implements: blueprint stack-check (partial)
Change-Id: Id34b461f5c76187928dd0419d8537e9a6cb6178c
Use new template for resource update reparse

If the stack-update is switching from pre-HOT to HOT then
the update will fail because the functions are resolved
using the pre-HOT template.

This change uses the new template for the reparse instead of the
old one. It fixes the issue observed but any other effects are
unknown.

Change-Id: I2f749375ccd7ca917387ef96856b1fc248c8567b
Closes-Bug: #1356097
test_parser.py remove some spurious Replay/Verify calls

There are some Replay/Verify calls which don't do anything, so
remove them, for the avoidance of perpetuating them in cut/paste
for new tests.

Change-Id: I4c08732d37ca9c1e15d13217ba257fff1bc2f518
Fix typos in comments and help strings

Change-Id: I68446dd652186191d19551032a634aee03f9e637
Remove function get_software_config

This change removes the function get_software_config
and replaces it with direct calls to heatclient.

This allows the heat client plugin's ignore_not_found handling
to be used.

The SoftwareConfigMissing exception is also no longer required.

Change-Id: I61fbe9556d9988fffd4afddf3fad5d2fa211475a
Add constraints to check whether image/keypair exists

Add constraints for "KeyName" and "ImageId" to check whether keypair/image
exists on "AWS::AutoScaling::LaunchConfiguration" resource.

Change-Id: I23dc126e621f3cfa7ca86b3a1c27dd949d3f5093
Closes-Bug: #1312564
Use Constraint stubs in common.py

Migrate to use functions: stub_KeypairConstraint_validate() and
stub_ImageConstraint_validate() in tests/common.py which defined 
in patch I23dc126e621f3cfa7ca86b3a1c27dd949d3f5093.

Change-Id: I63d578a9291d0fe08815d6a33323324432ae21cb
Merge "Amend docs with `immutable` property attribute."
Merge "Deny updates to AWS::EC2::Volume resource"
Merge "Move calculating new capacity to a function"
Cinder, trove, ceilo use ignore_not_found etc

Change-Id: I7dc38cba8cb9a51fed616c7bb9c8eb58e897a110
Merge "Remove function get_software_config"
Merge "Add constraints to check whether image/keypair exists"