Commit Graph

9 Commits (cb80df4f4ab0e8de16d53c7fddff7c44dedd3f94)

Author SHA1 Message Date
Peter Razumovsky a2ec480f3c Fix [H405] pep rule in heat/scaling
Implements bp docstring-improvements

Change-Id: If1b98962ce20f28cefd01ccf7d6f88f7e908d0db
2015-09-21 14:51:45 +03:00
Zane Bitter 0dff4ba0a5 Allow member_definitions() to customise each member that it defines
This should be useful both for ResourceGroup, which does unspeakable things
to its member definitions in order to substitute in resource names, and for
distributing members across availability zones.

Change-Id: I541168ec947066f06a6a7813d52d1df4020eb4bb
Partially-Implements: blueprint scaling-group-common
2015-09-08 08:44:18 +12:00
Zane Bitter 3109d90ce5 Allow a custom new ID function for member_definitions()
Previously we always used a random short_id, and that is indeed what we
want for Autoscaling groups, but ResourceGroups generally use sequential
IDs, so pass a function that generates them instead of hard-coding it.

By happy accident, this makes the tests a bit nicer too.

Change-Id: I58ce67e4b58378f35d5690d653a113b03ee6e08e
Partially-Implements: blueprint scaling-group-common
2015-09-08 08:44:18 +12:00
Zane Bitter 00196a40ca Clarify name of scaling resource_templates() function
The naming in this function dates from an earlier era, before we had the
ResourceDefinition class. This modifies the function name from
resource_templates() to member_definitions() and also modifies the
parameter/variable names to make their meanings clearer. The documentation
is also improved with a more thorough description of what the function

Change-Id: Ie25a8de380ffc4a6eb4d5934118452b010c1872a
Partially-Implements: blueprint scaling-group-common
2015-09-07 08:38:13 +12:00
Rabi Mishra cc7e2d6cb3 Use latest stable version for RG & ASG nested templates
Change-Id: I5924db9fa2a49825baef2faf88c533aca76ea081
2015-08-27 16:45:47 +05:30
Angus Salkeld e3950a4e72 Pass the environment into the Template class and not Stack
When we moved parameters from the stack table to the template table
we did it in a "flexible" way, but this led to some difficult to
diagnose problems. So this patch totally removes "env" as an argument
to the Stack class to make absolutely sure that we are doing this
correctly. I came across these bugs when rebasing decouple-nested.

- env was not getting passed into instance group make_templates()
- template deepcopy was not working correctly (causing some problems
  when deleting backup stacks)

Change-Id: I85cfb01c68ff5a44e2ff4f6e446870efb7205933
2015-03-18 10:29:55 +10:00
Pavlo Shchelokovskyy 4279bd2923 Enable H305 and H307 style checks
Correct grouping and ordering of imports

Change-Id: I47ea0d53f80d7f0aeb01c1c6afd63713be87ddf4
2015-01-20 09:47:25 +02:00
Zane Bitter 8998897425 Use add_resource() to build autoscaling templates
Instead of building nested templates for Autoscaling manually, use the
Template.add_resource() method to build them up programmatically.

Change-Id: Ie4d6a869355cf0ddb6fce0edc6c7d49b8a2b7e75
2014-06-05 13:45:14 -04:00
Christopher Armstrong 22e96c022a Move resource_templates to heat.scaling
This introduces a new package for autoscaling code which is
intended for use outside of the Heat engine, and moves the
resource_templates function into a new module, heat.scaling.template.
The function hasn't been changed at all.

Change-Id: I78c420e7a188f2d14780a03b3ea220b9a5fbe86c
Implements: partial blueprint as-lib
2014-02-06 22:53:28 +00:00