Rewrite get_secgroup_uuids to avoid resource_by_refid

get_secgroup_uuids has changed in the following ways:
* No longer attempts to find a security group name via
  a resource_by_refid lookup. resource_by_refid only exists
  as a workaround for AWS compatibility resource which are
  not backed by an API. Usage of resource_by_refid should be
  avoided in native resources if at all possible.
* If the security group looks like a UUID, assume it is
  a UUID for a security group that exists
* Call client.list_security_groups only once, and only if
  there is a non-uuid security group specified
* Do not attempt to reduce duplicate security groups to a unique
  list. If that is important for resources it can be done in
  validation.
* Raise PhysicalResourceNotFound if name maps to no group
* Raise PhysicalResourceNameAmbiguity if name maps to more than one
  group

Change-Id: I106adc15a7882192884d37c0806947470d139434
Closes-Bug: #1250286
Use get_secgroup_uuids in Instance

Instance._get_security_groups_id serves the same
purpose as neutron.get_secgroup_uuids. This change switches
Instance to using get_secgroup_uuids instead.

Updating the test has the side-effect on getting full test
coverage on get_secgroup_uuids, albeit indirectly.

Change-Id: I8cdc51692fd8d96e68c6c947891c9708f77d54c3
Related-Bug: #1250286
Refresh Cloud Server data for RackConnect check

Refresh Cloud Server data on each iteration of check_create_complete to
ensure the server metadata is up-to-date for the RackConnect check and
any subsequent checks.

Change-Id: Ia4ad04cfd5e76b639a0b98c21e381db70551090a
Closes-bug: #1250647
Managed Cloud compatibility for Cloud Servers

Make the Cloud Servers resource aware of the Managed Cloud automation.
The Cloud Servers resource should wait for the Managed Cloud automation
to complete before proceeding with the server configuration.

Blueprint managed-cloud
Change-Id: Iea331f1b275026d6189012528d376e01c986b0cb
Shorten physical resource name to custom limit

The default limit for resources is 255, which is
determined by the column size of the name columns in
other openstack project databases.

The limit for nova servers is 53 characters due to typical default
linux HOST_NAME_MAX of 64, minus the '.novalocal' appended to the name.

The reduced name will consist of the following:
* the first 2 characters of the name
* a hyphen
* the end of the name, truncated on the left to bring
  the name length within the limit

The validation fix from bug: #1238272 has been removed.
Closes-Bug: #1250291

Change-Id: Iccaf905b2e73433a671559c49223c2b635402853
Fix server update attribute test

This is testing if an attribute not in the update_allowed_keys
results in UpdateReplace. Whilst this is true here, it's using
an attribute that is not a valid resource attribute. The only
valid resource attributes that I know of are:
(Properties, Metadata, UpdatePolicy, DeletionPolicy)

Just want to make sure we are testing the right thing.

Change-Id: Ic84239b0ff3960968293c2c367971f30d091e833
Move resource doc generation to doc/source/ext

This is similar to other projects, and removes this
code from the withering gaze of coverage reports.

Change-Id: Ie0acb2a203f2e69a7d84aba3915a8499ab51ecb6
Fix some direct imports from sqlalchemy

Directly import sqlalchemy might result in some inconsistent
behaviors. It would bypass the db_backend configuration.

Change-Id: Ic07c5d9f4898add6629a296ee1dff22be0e75262
Implement Tags for S3 bucket

Use the metadata to hold the tags.

Change-Id: I52d8bb9429a90529431622c72ff2484e6c38c58e
Remove unused db/sqlalchemy/manage.py

This has been superseded by the cmd/manage.py implementation

Partial-Bug: #1241826

Change-Id: I89ff643048ef28c098483c1b7cf55c564e5d6062
Update install.sh to reflect recent oslo.db format

The previous sql_connection option has been deprecated and replaced
with the database.connection option in oslo:

[database]
connection = mysql://heat:heat@localhost/heat

The old option still works, but the default is only respected from
the new option, which is confusing if you're relying on the previous
behavior where specifying nothing got you the sql_connection default.
So update the installed config to remove the deprecated options.

Change-Id: I0f5b4587358ec99b47c8ab3ee924191bbf2760a2
Closes-Bug: #1241826
Merge "Shorten physical resource name to custom limit"
Ensure autoscaling actions occur for percentage adjustment

Fixes bug 1251007

Previously if the AdjustmentType was set to PercentChangeInCapacity,
then depending on the choice of the instance group MinSize and the
scale-up policy ScalingAdjustment, no autoscaling actions may occur
even when the under-scaled alarm fires.

This situation occurred if:

   (MinSize * ScalingAdjustment / 100.0) < 1.0

in which case the group never get gets scaled up even if the under-
scaled alarm stays in the alarm state forever.

Now we follow the rounding rules used by AWS Autoscaling:

  http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html

Change-Id: I79e5e743de1944ace5ef2c4dbcb76c9cab7262bb
Merge "Fix server update attribute test"
Don't use the last server fake, but the one we want

This makes it *really* frustrating adding a new server fake.

Change-Id: I968d32ce27b34ee8dc7a6ff821de21fcee832741
Merge "Remove unused db/sqlalchemy/manage.py"
Merge "Don't use the last server fake, but the one we want"
Merge "Update install.sh to reflect recent oslo.db format"
Merge "Ensure autoscaling actions occur for percentage adjustment"
Merge "Refresh Cloud Server data for RackConnect check"