Merge "Pass stack to thread in resource_signal"
This commit is contained in:
commit
54f1ad927e
@ -1173,8 +1173,7 @@ class EngineService(service.Service):
|
||||
implementation.
|
||||
'''
|
||||
|
||||
def _resource_signal(rsrc, details):
|
||||
stack = rsrc.stack
|
||||
def _resource_signal(stack, rsrc, details):
|
||||
LOG.debug("signaling resource %s:%s" % (stack.name, rsrc.name))
|
||||
rsrc.signal(details)
|
||||
|
||||
@ -1199,11 +1198,11 @@ class EngineService(service.Service):
|
||||
rsrc = stack[resource_name]
|
||||
if callable(rsrc.signal):
|
||||
if sync_call:
|
||||
_resource_signal(rsrc, details)
|
||||
_resource_signal(stack, rsrc, details)
|
||||
return rsrc.metadata_get()
|
||||
else:
|
||||
self.thread_group_mgr.start(stack.id, _resource_signal,
|
||||
rsrc, details)
|
||||
stack, rsrc, details)
|
||||
|
||||
@context.request_context
|
||||
def find_physical_resource(self, cnxt, physical_resource_id):
|
||||
|
@ -2935,6 +2935,7 @@ class StackServiceTest(common.HeatTestCase):
|
||||
self.eng.thread_group_mgr.groups[stack.id] = tools.DummyThreadGroup()
|
||||
self.m.StubOutWithMock(self.eng.thread_group_mgr, 'start')
|
||||
self.eng.thread_group_mgr.start(stack.id,
|
||||
mox.IgnoreArg(),
|
||||
mox.IgnoreArg(),
|
||||
mox.IgnoreArg(),
|
||||
mox.IgnoreArg()).AndReturn(None)
|
||||
|
Loading…
Reference in New Issue
Block a user