Liang Chen [Sun, 18 Aug 2013 12:38:04 +0000 (20:38 +0800)]
Rename event logical_resource_id to resource_name
This is to address an unimplemented comment at
https://review.openstack.org/#/c/41290/2/heat/engine/event.py
Bascically, there is a logical_resource_id/resource_name mismatch to
address, and this patch is trying to resolve that.
Angus Salkeld [Wed, 14 Aug 2013 06:51:21 +0000 (16:51 +1000)]
Remove "lazy=joined" from the resource_data backref
This is having some weird interaction with the rsrc_metadata column.
In a later patch I add a call to resource_data_set() in signal_responder
and the metadata tests start failing.
Angus Salkeld [Thu, 22 Aug 2013 22:31:54 +0000 (08:31 +1000)]
Implement Fn::MemberListToMap
This is to allow the CloudWatch::Alarm to be implemented as
a resource template. The Dimensions need to be converted
from [{Name: bla, Value: foo}] into a normal dict.
So we define the Dimensions as a CommaDelimitedList in the template,
then in TemplateResource we see that the property is a list of dicts
and convert it into the aws style memberlist
'.member.0.Name=bla,.member.0.Value=green'
then in the CW template we can do the following:
Clint Byrum [Wed, 21 Aug 2013 20:24:17 +0000 (13:24 -0700)]
Limit maximum size of all templates
Templates of an extremely large size can eat up tons of CPU time,
memory and storage. By refusing to parse any template over a certain
size, we can prevent users from abusing the service.
Zane Bitter [Thu, 22 Aug 2013 11:01:21 +0000 (13:01 +0200)]
Pass the previous stack to StackUpdate
This starts out like the existing stack, but is not stored in the database
or updated as the stack update proceeds. This allows the StackUpdate object
to store any information that might be relevant to a future rollback.
Steve Baker [Mon, 19 Aug 2013 02:35:06 +0000 (14:35 +1200)]
Always validate auth_uri with allowed_auth_uris
The original intention was to allow heat to orchestrate
on any requested cloud when allowed_auth_uris is configured
with an empty list.
This change makes all requests be validated against
allowed_auth_uris for the following reasons:
- there is a potential security issue with requests
being authorised by a fake keystone, allowing an exploit in
heat to be executed without any valid authentication factors
first being presented.
- ec2token middleware will also need to be made multi-cloud aware
however as a compatible API it is not possible to specify the desired
auth_uri with each request. Instead ec2token will need a list of
configured endpoints so that it can try each one until a request
is authenticated.
Winson Chan [Fri, 16 Aug 2013 18:35:04 +0000 (11:35 -0700)]
Add UpdatePolicy attribute to Instance/AutoScalingGroup
This is the second part of a series to implement support
for AutoScaling UpdatePolicy.
Defined new update_policy attribute for InstanceGroup
and AutoScalingGroup, and modified init of InstanceGroup and
AutoScalingGroup to parse UpdatePolicy from the template.
Currently, only InstanceGroup and AutoScalingGroup manages
update using UpdatePolicy and so this is not implemented in the
Resource class. This can be revisited when UpdatePolicy is
applicable to other resource types. The resource validation
method is also overridden here to validate the UpdatePolicy.
Included tests to validate various uses cases of templates
with, with bad, without, and removal of UpdatePolicy. This
patch does not address handling of instances update with
UpdatePolicy yet. The next patch will address that.
Jeff Peeler [Wed, 3 Jul 2013 14:22:25 +0000 (10:22 -0400)]
Add new attributes to EIPAssociation resource
AllocationId
NetworkInterfaceId
The EIP resource also now supports the Domain property, which when set
creates the resource using neutron networking. (Neutron networking is
required for all VPC operations.)
The EIP test covers the new functionality as well as some of the old
using both nova and neutron.
Zane Bitter [Wed, 21 Aug 2013 14:52:13 +0000 (16:52 +0200)]
Use Template to instantiate TemplateResource
Use the Template class, rather than the raw template data, to obtain the
information required to create the schema of a TemplateResource facade.
This will allow this feature to work with multiple template formats (e.g.
HOT vs. CloudFormation).
Clint Byrum [Tue, 20 Aug 2013 20:50:00 +0000 (13:50 -0700)]
Convert heat.common.template_format to use C yaml
Will fall back to pyyaml if CSafeLoader/CSafeDumper are not available.
This should increase template parsing performance by a factor of 9 and
reduce memory usage by an order of magnitude.
We also convert the one test that was directly calling yaml to use the
template_format.parse function, so that the same parsing is used
everywhere.
Clint Byrum [Mon, 19 Aug 2013 22:02:53 +0000 (15:02 -0700)]
Use LONGTEXT for templates in MySQL
TEXT in PostgreSQL is an unlimited column size. However, in MySQL, it is
limited to 2^16 bytes. LONGTEXT allows 2^32 bytes, which is overkill,
but will prevent MySQL from silently truncating this column and thus
rendering the entire tenant's API access moot.
Zane Bitter [Mon, 19 Aug 2013 18:51:45 +0000 (20:51 +0200)]
Allow Parameters to set defaults for TemplateResource
Although it is theoretically possible to infer default values for the
Properties of a TemplateResource from the Parameters of the provider
template, this presents a number of conversion issues that are presently
unhandled.
Instead, pass parameter values only for properties that are supplied. For
the others, allow the parameter defaults in the template to be used.
Ben Nemec [Thu, 15 Aug 2013 17:02:46 +0000 (12:02 -0500)]
Translate user-facing exception messages
Exception messages should be translated because they can be
visible to users. Also convert these strings to use named
format parameters in case translation reorders them.
Winson Chan [Tue, 13 Aug 2013 07:37:48 +0000 (00:37 -0700)]
Updated LaunchConfig for AutoScaling UpdatePolicy
This is the first part of a series to implement support
for AutoScaling UpdatePolicy.
Updated LaunchConfiguration resource type to return
self.physical_resource_name() in FnGetRefId(). For both
InstanceGroup and AutoScalingGroup, the property
LaunchConfigurationName is added to the list of update allowed
properties. With this change, any property change to the
LaunchConfiguration resource will be result in a different
LaunchConfigurationName on reference resolution and thus will
trigger InstanceGroup and AutoScalingGroup to handle the update.