From: Angus Salkeld Date: Mon, 2 Jul 2012 03:10:59 +0000 (+1000) Subject: Add the Fn::GetAZs() intrinsic function. X-Git-Tag: 2014.1~1657 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1439f85d72e420101289c02077bd0082b7079cde;p=openstack-build%2Fheat-build.git Add the Fn::GetAZs() intrinsic function. This just returns 'nova' right now. Change-Id: I5449123b912da0f2aaca8a16aee78d391db033dd Signed-off-by: Angus Salkeld --- diff --git a/heat/engine/parser.py b/heat/engine/parser.py index 8e77735e..2544cca4 100644 --- a/heat/engine/parser.py +++ b/heat/engine/parser.py @@ -328,6 +328,19 @@ class Stack(object): return _resolve(match, handle, s) + def _resolve_availability_zones(self, s): + ''' + looking for { "Fn::GetAZs" : "str" } + ''' + def match(key, value): + return (key == 'Fn::GetAZs' and + isinstance(value, basestring)) + + def handle(ref): + return ['nova'] + + return _resolve(match, handle, s) + def _resolve_find_in_map(self, s): def handle(args): try: @@ -380,6 +393,7 @@ class Stack(object): def resolve_static_data(self, snippet): return transform(snippet, [self._resolve_static_refs, + self._resolve_availability_zones, self._resolve_find_in_map]) def resolve_runtime_data(self, snippet):