# Path: cloudify_rollback_workflow/lifecycle.py
# def rollback_node_instances(graph,
#                             node_instances,
#                             related_nodes=None,
#                             name_prefix=''):
#     def __init__(self,
#                  graph,
#                  node_instances=None,
#                  related_nodes=None,
#                  modified_relationship_ids=None,
#                  ignore_failure=False,
#                  name_prefix=''):
#     def rollback(self):
#     def _process_node_instances(self,
#                                 ctx,
#                                 node_instance_subgraph_func,
#                                 graph_finisher_func):
#     def _finish_uninstall(self, graph, subgraphs):
#     def _finish_subgraphs(self, graph, subgraphs, intact_op, install):
#         def intact_on_dependency_added(instance, rel, source_task_sequence):
#     def _handle_dependency_creation(source_subgraph, target_subgraph,
#                                     operation, target_id, graph):
#     def _add_dependencies(self, graph, subgraphs, instances, install,
#                           on_dependency_added=None):
# def set_send_node_event_on_error_handler(task, instance):
# def _skip_nop_operations(task, pre=None, post=None):
# def _relationships_operations(graph,
#                               node_instance,
#                               operation,
#                               reverse=False,
#                               modified_relationship_ids=None):
# def _relationship_operations(relationship, operation):
# def is_host_node(node_instance):
# def _host_pre_stop(host_node_instance):
#     def __init__(self, instance=None, instance_id=None):
#     def dump(self):
#     def __call__(self, tsk):
# def _relationship_subgraph_on_failure(subgraph):
# def _node_get_state_handler(tsk):
# def rollback_node_instance_subgraph(instance, graph, ignore_failure):
#     def set_ignore_handlers(_subgraph):
# class UtilitiesLifecycleProcessor(object):
# class _SendNodeEventHandler(object):


from cloudify.decorators import workflow
from cloudify.workflows.tasks_graph import make_or_get_graph
from cloudify.plugins.lifecycle import uninstall_node_instances, \
    set_send_node_event_on_error_handler
from cloudify_rollback_workflow import lifecycle as utilitieslifecycle
         node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.stop',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def precreate(ctx, operation_parms, run_by_dependency_order, type_names,
              node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.precreate',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def create(ctx, operation_parms, run_by_dependency_order, type_names,
           node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.create',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def configure(ctx, operation_parms, run_by_dependency_order, type_names,
              node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.configure',
                      operation_parms, True, run_by_dependency_order,

# Path: cloudify_rollback_workflow/lifecycle.py
# def rollback_node_instances(graph,
#                             node_instances,
#                             related_nodes=None,
#                             name_prefix=''):
#     def __init__(self,
#                  graph,
#                  node_instances=None,
#                  related_nodes=None,
#                  modified_relationship_ids=None,
#                  ignore_failure=False,
#                  name_prefix=''):
#     def rollback(self):
#     def _process_node_instances(self,
#                                 ctx,
#                                 node_instance_subgraph_func,
#                                 graph_finisher_func):
#     def _finish_uninstall(self, graph, subgraphs):
#     def _finish_subgraphs(self, graph, subgraphs, intact_op, install):
#         def intact_on_dependency_added(instance, rel, source_task_sequence):
#     def _handle_dependency_creation(source_subgraph, target_subgraph,
#                                     operation, target_id, graph):
#     def _add_dependencies(self, graph, subgraphs, instances, install,
#                           on_dependency_added=None):
# def set_send_node_event_on_error_handler(task, instance):
# def _skip_nop_operations(task, pre=None, post=None):
# def _relationships_operations(graph,
#                               node_instance,
#                               operation,
#                               reverse=False,
#                               modified_relationship_ids=None):
# def _relationship_operations(relationship, operation):
# def is_host_node(node_instance):
# def _host_pre_stop(host_node_instance):
#     def __init__(self, instance=None, instance_id=None):
#     def dump(self):
#     def __call__(self, tsk):
# def _relationship_subgraph_on_failure(subgraph):
# def _node_get_state_handler(tsk):
# def rollback_node_instance_subgraph(instance, graph, ignore_failure):
#     def set_ignore_handlers(_subgraph):
# class UtilitiesLifecycleProcessor(object):
# class _SendNodeEventHandler(object):


# Path: cloudify_rollback_workflow/workflows.py
from cloudify.decorators import workflow
from cloudify.workflows.tasks_graph import make_or_get_graph
from cloudify.plugins.lifecycle import uninstall_node_instances, \
    set_send_node_event_on_error_handler
from cloudify_rollback_workflow import lifecycle as utilitieslifecycle

         node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.stop',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def precreate(ctx, operation_parms, run_by_dependency_order, type_names,
              node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.precreate',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def create(ctx, operation_parms, run_by_dependency_order, type_names,
           node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.create',
                      operation_parms, True, run_by_dependency_order,
                      type_names, node_ids, node_instance_ids, ignore_failure,
                      **kwargs)


@workflow(resumable=True)
def configure(ctx, operation_parms, run_by_dependency_order, type_names,
              node_ids, node_instance_ids, ignore_failure, **kwargs):
    execute_operation(ctx, 'cloudify.interfaces.lifecycle.configure',
                      operation_parms, True, run_by_dependency_order,

                      type_names, node_ids, node_instance_ids, ignore_failure,