# Path: heatclient/common/event_utils.py
# def get_hook_events(hc, stack_id, event_args, nested_depth=0,
#                     hook_type='pre-create'):
# def get_events(hc, stack_id, event_args, nested_depth=0,
#                marker=None, limit=None):
# def _get_nested_ids(hc, stack_id):
# def _get_nested_events(hc, nested_depth, stack_id, event_args):
# def _get_stack_name_from_links(event):
# def _get_stack_events(hc, stack_id, event_args):
# def poll_for_events(hc, stack_name, action=None, poll_period=5, marker=None,
#                     out=None, nested_depth=0):
#     def is_stack_event(event):
# def wait_for_events(ws, stack_name, out=None):
# 
# Path: heatclient/v1/events.py
# DEFAULT_PAGE_SIZE = 20
# class Event(base.Resource):
# class EventManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def list(self, stack_id, resource_name=None, **kwargs):
#     def get(self, stack_id, resource_name, event_id):
# 
# Path: heatclient/v1/resources.py
# DEFAULT_PAGE_SIZE = 20
# class Resource(base.Resource):
# class ResourceManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def stack_name(self):
#     def list(self, stack_id, **kwargs):
#     def get(self, stack_id, resource_name, with_attr=None):
#     def metadata(self, stack_id, resource_name):
#     def signal(self, stack_id, resource_name, data=None):
#     def mark_unhealthy(self, stack_id, resource_name,
#                        mark_unhealthy, resource_status_reason):
#     def generate_template(self, resource_name):


from unittest import mock
from heatclient.common import event_utils
from heatclient.v1 import events as hc_ev
from heatclient.v1 import resources as hc_res
import testtools
    @staticmethod
    def _mock_event(event_id, resource_id,
                    resource_status='CREATE_COMPLETE'):
        ev_info = {"links": [
                   {"href": "http://heat/foo", "rel": "self"},
                   {"href": "http://heat/stacks/astack", "rel": "stack"}],
                   "logical_resource_id": resource_id,
                   "physical_resource_id": resource_id,
                   "resource_name": resource_id,
                   "resource_status": resource_status,
                   "resource_status_reason": "state changed",
                   "event_time": "2014-12-05T14:14:30Z",
                   "id": event_id}
        return hc_ev.Event(manager=None, info=ev_info)

    @staticmethod
    def _mock_stack_event(event_id, stack_name,
                          stack_status='CREATE_COMPLETE'):
        stack_id = 'abcdef'
        ev_info = {"links": [{"href": "http://heat/foo", "rel": "self"},
                             {"href": "http://heat/stacks/%s/%s" % (stack_name,
                                                                    stack_id),
                              "rel": "stack"}],
                   "logical_resource_id": stack_name,
                   "physical_resource_id": stack_id,
                   "resource_name": stack_name,
                   "resource_status": stack_status,
                   "resource_status_reason": "state changed",
                   "event_time": "2014-12-05T14:14:30Z",
                   "id": event_id}

# Path: heatclient/common/event_utils.py
# def get_hook_events(hc, stack_id, event_args, nested_depth=0,
#                     hook_type='pre-create'):
# def get_events(hc, stack_id, event_args, nested_depth=0,
#                marker=None, limit=None):
# def _get_nested_ids(hc, stack_id):
# def _get_nested_events(hc, nested_depth, stack_id, event_args):
# def _get_stack_name_from_links(event):
# def _get_stack_events(hc, stack_id, event_args):
# def poll_for_events(hc, stack_name, action=None, poll_period=5, marker=None,
#                     out=None, nested_depth=0):
#     def is_stack_event(event):
# def wait_for_events(ws, stack_name, out=None):
# 
# Path: heatclient/v1/events.py
# DEFAULT_PAGE_SIZE = 20
# class Event(base.Resource):
# class EventManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def list(self, stack_id, resource_name=None, **kwargs):
#     def get(self, stack_id, resource_name, event_id):
# 
# Path: heatclient/v1/resources.py
# DEFAULT_PAGE_SIZE = 20
# class Resource(base.Resource):
# class ResourceManager(stacks.StackChildManager):
#     def __repr__(self):
#     def update(self, **fields):
#     def delete(self):
#     def data(self, **kwargs):
#     def stack_name(self):
#     def list(self, stack_id, **kwargs):
#     def get(self, stack_id, resource_name, with_attr=None):
#     def metadata(self, stack_id, resource_name):
#     def signal(self, stack_id, resource_name, data=None):
#     def mark_unhealthy(self, stack_id, resource_name,
#                        mark_unhealthy, resource_status_reason):
#     def generate_template(self, resource_name):


# Path: heatclient/tests/unit/test_event_utils.py
from unittest import mock
from heatclient.common import event_utils
from heatclient.v1 import events as hc_ev
from heatclient.v1 import resources as hc_res
import testtools

    @staticmethod
    def _mock_event(event_id, resource_id,
                    resource_status='CREATE_COMPLETE'):
        ev_info = {"links": [
                   {"href": "http://heat/foo", "rel": "self"},
                   {"href": "http://heat/stacks/astack", "rel": "stack"}],
                   "logical_resource_id": resource_id,
                   "physical_resource_id": resource_id,
                   "resource_name": resource_id,
                   "resource_status": resource_status,
                   "resource_status_reason": "state changed",
                   "event_time": "2014-12-05T14:14:30Z",
                   "id": event_id}
        return hc_ev.Event(manager=None, info=ev_info)

    @staticmethod
    def _mock_stack_event(event_id, stack_name,
                          stack_status='CREATE_COMPLETE'):
        stack_id = 'abcdef'
        ev_info = {"links": [{"href": "http://heat/foo", "rel": "self"},
                             {"href": "http://heat/stacks/%s/%s" % (stack_name,
                                                                    stack_id),
                              "rel": "stack"}],
                   "logical_resource_id": stack_name,
                   "physical_resource_id": stack_id,
                   "resource_name": stack_name,
                   "resource_status": stack_status,
                   "resource_status_reason": "state changed",
                   "event_time": "2014-12-05T14:14:30Z",
                   "id": event_id}

        return hc_ev.Event(manager=None, info=ev_info)