'Calls resource\'s signal for the specified resource.
:param sync_call: indicates whether a synchronized call behavior is
expected. This is reserved for CFN WaitCondition
implementation.'

@context.request_context
def resource_signal(self, cnxt, stack_identity, resource_name, details, sync_call=False):

    def _resource_signal(stack, rsrc, details, need_check):
        LOG.debug(('signaling    resource    %s:%s' % (stack.name, rsrc.name)))
        needs_metadata_updates = rsrc.signal(details, need_check)
        if (not needs_metadata_updates):
            return
        for r in stack._explicit_dependencies():
            if (r.action != r.INIT):
                if (r.name != rsrc.name):
                    r.metadata_update()
                stk_defn.update_resource_data(stack.defn, r.name, r.node_data())
    s = self._get_stack(cnxt, stack_identity)
    stack = parser.Stack.load(cnxt, stack=s, use_stored_context=True)
    rsrc = stack.resource_get(resource_name)
    if (rsrc is None):
        raise exception.ResourceNotFound(resource_name=resource_name, stack_name=stack.name)
    if (rsrc.id is None):
        raise exception.ResourceNotAvailable(resource_name=resource_name)
    if callable(rsrc.signal):
        rsrc._signal_check_action()
        rsrc._signal_check_hook(details)
        if (sync_call or (not callable(getattr(rsrc, 'handle_signal', None)))):
            _resource_signal(stack, rsrc, details, False)
        else:
            self.thread_group_mgr.start(stack.id, _resource_signal, stack, rsrc, details, False)
        if sync_call:
            return rsrc.metadata_get()
