]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Add UpdatePolicy attribute to Instance/AutoScalingGroup
authorWinson Chan <winson.c.chan@intel.com>
Fri, 16 Aug 2013 18:35:04 +0000 (11:35 -0700)
committerWinson Chan <winson.c.chan@intel.com>
Wed, 21 Aug 2013 23:06:32 +0000 (16:06 -0700)
commit167b9a58c7af34cae7103320b30a1e8ca444e263
tree8b7462bab0661e2fcdb6464ebe8714ebc6ebbca5
parent044a8aaf69d9874edfafb1c7658055141545d1cc
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.

Change-Id: I1faf1a8a3ba1faf063b6687b34b57b2a96c6bfa8
blueprint: as-update-policy
heat/engine/resources/autoscaling.py
heat/tests/test_autoscaling_update_policy.py [new file with mode: 0644]
heat/tests/test_instance_group_update_policy.py