diff --git a/heat/engine/event.py b/heat/engine/event.py index e5ce5a9c4..3df6cf1f4 100644 --- a/heat/engine/event.py +++ b/heat/engine/event.py @@ -52,7 +52,7 @@ class Event(object): @classmethod def load(cls, context, event_id, event=None, stack=None): '''Retrieve an Event from the database.''' - from heat.engine import parser + from heat.engine import stack as parser ev = event if event is not None else\ db_api.event_get(context, event_id) diff --git a/heat/engine/service.py b/heat/engine/service.py index 2c8bed762..10e490280 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -38,10 +38,10 @@ from heat.engine import clients from heat.engine import environment from heat.engine.event import Event from heat.engine import parameter_groups -from heat.engine import parser from heat.engine import properties from heat.engine import resource from heat.engine import resources +from heat.engine import stack as parser from heat.engine import stack_lock from heat.engine import template as templatem from heat.engine import watchrule diff --git a/heat/engine/stack_resource.py b/heat/engine/stack_resource.py index fa2911203..7bb94ea5d 100644 --- a/heat/engine/stack_resource.py +++ b/heat/engine/stack_resource.py @@ -18,9 +18,9 @@ from heat.common import exception from heat.common.i18n import _ from heat.engine import attributes from heat.engine import environment -from heat.engine import parser from heat.engine import resource from heat.engine import scheduler +from heat.engine import stack as parser from heat.engine import template from heat.openstack.common import log as logging diff --git a/heat/engine/watchrule.py b/heat/engine/watchrule.py index d1cfca855..38359f473 100644 --- a/heat/engine/watchrule.py +++ b/heat/engine/watchrule.py @@ -19,7 +19,7 @@ from oslo.utils import timeutils from heat.common import exception from heat.common.i18n import _ from heat.db import api as db_api -from heat.engine import parser +from heat.engine import stack from heat.engine import timestamp from heat.openstack.common import log as logging from heat.rpc import api as rpc_api @@ -257,11 +257,11 @@ class WatchRule(object): else: s = db_api.stack_get(self.context, self.stack_id, eager_load=True) - stack = parser.Stack.load(self.context, stack=s) - if (stack.action != stack.DELETE - and stack.status == stack.COMPLETE): + stk = stack.Stack.load(self.context, stack=s) + if (stk.action != stk.DELETE + and stk.status == stk.COMPLETE): for refid in self.rule[self.ACTION_MAP[new_state]]: - actions.append(stack.resource_by_refid(refid).signal) + actions.append(stk.resource_by_refid(refid).signal) else: LOG.warning(_("Could not process watch state %s for stack") % new_state) diff --git a/heat/tests/test_engine_service.py b/heat/tests/test_engine_service.py index 8c5683474..ccc49e115 100644 --- a/heat/tests/test_engine_service.py +++ b/heat/tests/test_engine_service.py @@ -38,11 +38,11 @@ from heat.engine.clients.os import keystone from heat.engine.clients.os import nova from heat.engine import dependencies from heat.engine import environment -from heat.engine import parser from heat.engine.properties import Properties from heat.engine import resource as res from heat.engine.resources import instance as instances from heat.engine import service +from heat.engine import stack as parser from heat.engine import stack_lock from heat.engine import template as templatem from heat.engine import watchrule diff --git a/heat/tests/test_stack_resource.py b/heat/tests/test_stack_resource.py index 26e4ea720..276d47431 100644 --- a/heat/tests/test_stack_resource.py +++ b/heat/tests/test_stack_resource.py @@ -20,9 +20,9 @@ import mox from heat.common import exception from heat.common import template_format from heat.engine import environment -from heat.engine import parser from heat.engine import resource from heat.engine import scheduler +from heat.engine import stack as parser from heat.engine import stack_resource from heat.engine import template as templatem from heat.tests.common import HeatTestCase diff --git a/heat/tests/utils.py b/heat/tests/utils.py index dc4eae363..494b2e764 100644 --- a/heat/tests/utils.py +++ b/heat/tests/utils.py @@ -22,8 +22,8 @@ import sqlalchemy from heat.common import context from heat.db import api as db_api from heat.engine import environment -from heat.engine import parser from heat.engine import resource +from heat.engine import stack from heat.engine import template get_engine = db_api.get_engine @@ -89,12 +89,12 @@ def parse_stack(t, params=None, stack_name='test_stack', stack_id=None, params = params or {} ctx = dummy_context() templ = template.Template(t) - stack = parser.Stack(ctx, stack_name, templ, - environment.Environment(params), stack_id, - timeout_mins=timeout_mins) - stack.store() + stk = stack.Stack(ctx, stack_name, templ, + environment.Environment(params), stack_id, + timeout_mins=timeout_mins) + stk.store() - return stack + return stk class PhysName(object): @@ -111,7 +111,7 @@ class PhysName(object): def __eq__(self, physical_name): try: - stack, res, short_id = str(physical_name).rsplit('-', 2) + stk, res, short_id = str(physical_name).rsplit('-', 2) except ValueError: return False