# Path: heatclient/_i18n.py
# def get_available_languages():
# def enable_lazy():
# 
# 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/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):
# 
# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):


import logging
import time
from cliff.formatters import base
from osc_lib.command import command
from osc_lib import utils
from heatclient._i18n import _
from heatclient.common import event_utils
from heatclient.common import utils as heat_utils
from heatclient import exc

            if ":" in parsed_args.sort[0]:
                kwargs['sort_dir'] = parsed_args.sort[0].split(":")[1]

        if parsed_args.follow:
            if parsed_args.formatter != 'log':
                msg = _('--follow can only be specified with --format log')
                raise exc.CommandError(msg)

            marker = parsed_args.marker
            try:
                event_log_context = heat_utils.EventLogContext()
                while True:
                    events = event_utils.get_events(
                        client,
                        stack_id=parsed_args.stack,
                        event_args=kwargs,
                        nested_depth=nested_depth,
                        marker=marker)
                    if events:
                        marker = getattr(events[-1], 'id', None)
                        events_log = heat_utils.event_log_formatter(
                            events, event_log_context)
                        self.app.stdout.write(events_log)
                        self.app.stdout.write('\n')
                    time.sleep(5)
                    # this loop never exits
            except (KeyboardInterrupt, EOFError):  # ctrl-c, ctrl-d
                return [], []


# Path: heatclient/_i18n.py
# def get_available_languages():
# def enable_lazy():
# 
# 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/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):
# 
# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):


# Path: heatclient/osc/v1/event.py
import logging
import time
from cliff.formatters import base
from osc_lib.command import command
from osc_lib import utils
from heatclient._i18n import _
from heatclient.common import event_utils
from heatclient.common import utils as heat_utils
from heatclient import exc


            if ":" in parsed_args.sort[0]:
                kwargs['sort_dir'] = parsed_args.sort[0].split(":")[1]

        if parsed_args.follow:
            if parsed_args.formatter != 'log':
                msg = _('--follow can only be specified with --format log')
                raise exc.CommandError(msg)

            marker = parsed_args.marker
            try:
                event_log_context = heat_utils.EventLogContext()
                while True:
                    events = event_utils.get_events(
                        client,
                        stack_id=parsed_args.stack,
                        event_args=kwargs,
                        nested_depth=nested_depth,
                        marker=marker)
                    if events:
                        marker = getattr(events[-1], 'id', None)
                        events_log = heat_utils.event_log_formatter(
                            events, event_log_context)
                        self.app.stdout.write(events_log)
                        self.app.stdout.write('\n')
                    time.sleep(5)
                    # this loop never exits
            except (KeyboardInterrupt, EOFError):  # ctrl-c, ctrl-d
                return [], []


        events = event_utils.get_events(