Exemplo n.º 1
0
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'deleting', 'FileSystem_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'deleted', 'FileSystem_deleted',
                   custom_context)
    custom_context.register_native_delegate_wf_step('BlockStorage',
                                                    'BlockStorage_uninstall')
    set_state_task(ctx, graph, 'FileSystem', 'stopped', 'FileSystem_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopping', 'FileSystem_stopping',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.stop', 'stop_FileSystem',
                   custom_context)
    custom_context.register_native_delegate_wf_step(
        'DeletableBlockStorage', 'DeletableBlockStorage_uninstall')
    custom_context.register_native_delegate_wf_step('Compute',
                                                    'Compute_uninstall')
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'FileSystem_deleting', 'FileSystem_stopped',
               custom_context)
    link_tasks(graph, 'FileSystem_deleted', 'FileSystem_deleting',
               custom_context)
    link_tasks(graph, 'FileSystem_stopped', 'stop_FileSystem', custom_context)
    link_tasks(graph, 'stop_FileSystem', 'FileSystem_stopping', custom_context)
    link_tasks(graph, 'Compute_uninstall', 'FileSystem_deleted',
               custom_context)
Exemplo n.º 2
0
def uninstall_host_compute(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'deleting', 'FileSystem_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'deleted', 'FileSystem_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopped', 'FileSystem_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopping', 'FileSystem_stopping',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.delete', 'delete_FileSystem',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.stop', 'stop_FileSystem',
                   custom_context)
    custom_context.register_native_delegate_wf_step('Compute',
                                                    'Compute_uninstall')
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'delete_FileSystem', 'FileSystem_deleting',
               custom_context)
    link_tasks(graph, 'Compute_uninstall', 'FileSystem_deleted',
               custom_context)
    link_tasks(graph, 'FileSystem_deleting', 'FileSystem_stopped',
               custom_context)
    link_tasks(graph, 'stop_FileSystem', 'FileSystem_stopping', custom_context)
    link_tasks(graph, 'FileSystem_deleted', 'delete_FileSystem',
               custom_context)
    link_tasks(graph, 'FileSystem_stopped', 'stop_FileSystem', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'deleting', 'FileSystem_deleting', custom_context)
    custom_context.register_native_delegate_wf_step('AnotherScaleCompute', 'AnotherScaleCompute_uninstall')
    custom_context.register_native_delegate_wf_step('BlockStorage', 'BlockStorage_uninstall')
    set_state_task(ctx, graph, 'FileSystem', 'deleted', 'FileSystem_deleted', custom_context)
    custom_context.register_native_delegate_wf_step('NonScaledCompute', 'NonScaledCompute_uninstall')
    set_state_task(ctx, graph, 'FileSystem', 'stopped', 'FileSystem_stopped', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopping', 'FileSystem_stopping', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.delete', 'delete_FileSystem', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.stop', 'stop_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_uninstall')
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_uninstall')
    custom_context.register_native_delegate_wf_step('BlockStorage2', 'BlockStorage2_uninstall')
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'FileSystem_deleting', 'FileSystem_stopped', custom_context)
    link_tasks(graph, 'BlockStorage_uninstall', 'FileSystem_deleted', custom_context)
    link_tasks(graph, 'FileSystem_deleted', 'delete_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_stopped', 'stop_FileSystem', custom_context)
    link_tasks(graph, 'delete_FileSystem', 'FileSystem_deleting', custom_context)
    link_tasks(graph, 'stop_FileSystem', 'FileSystem_stopping', custom_context)
    link_tasks(graph, 'Compute_uninstall', 'FileSystem_deleted', custom_context)
    link_tasks(graph, 'BlockStorage2_uninstall', 'FileSystem_deleted', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'compute', 'deleting', 'compute_deleting', custom_context)
    operation_task(ctx, graph, 'compute', 'cloudify.interfaces.lifecycle.delete', 'delete_compute', custom_context)
    set_state_task(ctx, graph, 'compute', 'stopped', 'compute_stopped', custom_context)
    set_state_task(ctx, graph, 'compute', 'stopping', 'compute_stopping', custom_context)
    set_state_task(ctx, graph, 'compute', 'deleted', 'compute_deleted', custom_context)
    operation_task(ctx, graph, 'compute', 'cloudify.interfaces.lifecycle.stop', 'stop_compute', custom_context)
    link_tasks(graph, 'compute_deleting', 'compute_stopped', custom_context)
    link_tasks(graph, 'delete_compute', 'compute_deleting', custom_context)
    link_tasks(graph, 'compute_stopped', 'stop_compute', custom_context)
    link_tasks(graph, 'compute_deleted', 'delete_compute', custom_context)
    link_tasks(graph, 'stop_compute', 'compute_stopping', custom_context)
def uninstall_host_database(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting', custom_context)
    custom_context.register_native_delegate_wf_step('DataBase', 'DataBase_uninstall')
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'DataBase_uninstall', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
def uninstall_host_compute(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'deleting', 'FileSystem_deleting', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'deleted', 'FileSystem_deleted', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopped', 'FileSystem_stopped', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'stopping', 'FileSystem_stopping', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.delete', 'delete_FileSystem', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.stop', 'stop_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_uninstall')
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'delete_FileSystem', 'FileSystem_deleting', custom_context)
    link_tasks(graph, 'Compute_uninstall', 'FileSystem_deleted', custom_context)
    link_tasks(graph, 'FileSystem_deleting', 'FileSystem_stopped', custom_context)
    link_tasks(graph, 'stop_FileSystem', 'FileSystem_stopping', custom_context)
    link_tasks(graph, 'FileSystem_deleted', 'delete_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_stopped', 'stop_FileSystem', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    operation_task(ctx, graph, 'compute', 'cloudify.interfaces.lifecycle.stop',
                   'stop_compute', custom_context)
    set_state_task(ctx, graph, 'compute', 'stopped', 'compute_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'deleting', 'compute_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'stopping', 'compute_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'deleted', 'compute_deleted',
                   custom_context)
    operation_task(ctx, graph, 'compute',
                   'cloudify.interfaces.lifecycle.delete', 'delete_compute',
                   custom_context)
    link_tasks(graph, 'stop_compute', 'compute_stopping', custom_context)
    link_tasks(graph, 'compute_stopped', 'stop_compute', custom_context)
    link_tasks(graph, 'compute_deleting', 'compute_stopped', custom_context)
    link_tasks(graph, 'compute_deleted', 'delete_compute', custom_context)
    link_tasks(graph, 'delete_compute', 'compute_deleting', custom_context)
Exemplo n.º 8
0
def uninstall_host_database(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting',
                   custom_context)
    custom_context.register_native_delegate_wf_step('DataBase',
                                                    'DataBase_uninstall')
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'DataBase_uninstall', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
Exemplo n.º 9
0
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start',
                   'start_Java', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'starting',
                   'Artifact_Directory_Test_starting', custom_context)
    set_state_task(ctx, graph, 'Server', 'configuring', 'Server_configuring',
                   custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.create', 'create_Server',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'started', 'Server_started',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'initial', 'Server_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'created',
                   'Artifact_Directory_Test_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring',
                   custom_context)
    operation_task(ctx, graph, 'War',
                   'cloudify.interfaces.lifecycle.configure', 'configure_War',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.start',
                   'start_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Server', 'created', 'Server_created',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start',
                   'start_Tomcat', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.create',
                   'create_War', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configuring',
                   '_a4c_floating_ip_Server_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'creating', 'Server_creating',
                   custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start',
                   'start_War', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.start',
                   'start_Server', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configured',
                   '_a4c_floating_ip_Server_configured', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server',
                   'cloudify.interfaces.lifecycle.start',
                   'start__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.create',
                   'create_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'initial',
                   '_a4c_floating_ip_Server_initial', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configured',
                   'Artifact_Directory_Test_configured', custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Server', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'starting',
                   '_a4c_floating_ip_Server_starting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'started',
                   'Artifact_Directory_Test_started', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    operation_task(ctx, graph, 'Java',
                   'cloudify.interfaces.lifecycle.configure', 'configure_Java',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'creating',
                   '_a4c_floating_ip_Server_creating', custom_context)
    set_state_task(ctx, graph, 'Server', 'starting', 'Server_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'initial',
                   'Artifact_Directory_Test_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'creating',
                   'Artifact_Directory_Test_creating', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configuring',
                   'Artifact_Directory_Test_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create',
                   'create_Java', custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.create', 'create_Tomcat',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'started',
                   '_a4c_floating_ip_Server_started', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'created',
                   '_a4c_floating_ip_Server_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial',
                   custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server',
                   'cloudify.interfaces.lifecycle.create',
                   'create__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'configured', 'Server_configured',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started',
                   custom_context)
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_starting',
               'Artifact_Directory_Test_configured', custom_context)
    link_tasks(graph, 'Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'Server_configuring', '_a4c_floating_ip_Server_started',
               custom_context)
    link_tasks(graph, 'create_Server', 'Server_creating', custom_context)
    link_tasks(graph, 'Server_started', 'start_Server', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_created',
               'create_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'start_Artifact_Directory_Test',
               'Artifact_Directory_Test_starting', custom_context)
    link_tasks(graph, 'Server_created', 'create_Server', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'create_War', 'War_creating', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring', 'Server_created',
               custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring',
               '_a4c_floating_ip_Server_created', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'configure_Artifact_Directory_Test',
               'Artifact_Directory_Test_configuring', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'Server_creating', 'Server_initial', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'start_Server', 'Server_starting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configured',
               'configure__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'start__a4c_floating_ip_Server',
               '_a4c_floating_ip_Server_starting', custom_context)
    link_tasks(graph, 'create_Artifact_Directory_Test',
               'Artifact_Directory_Test_creating', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configured',
               'configure_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'configure_Server', 'Server_configuring', custom_context)
    link_tasks(graph, 'configure__a4c_floating_ip_Server',
               '_a4c_floating_ip_Server_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_starting',
               '_a4c_floating_ip_Server_configured', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_started',
               'start_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_creating',
               '_a4c_floating_ip_Server_initial', custom_context)
    link_tasks(graph, 'Server_starting', 'Server_configured', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_initial', 'Server_started',
               custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_creating',
               'Artifact_Directory_Test_initial', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_started', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configuring',
               'Artifact_Directory_Test_created', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_started',
               'start__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_created',
               'create__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_initial', 'Server_started', custom_context)
    link_tasks(graph, 'create__a4c_floating_ip_Server',
               '_a4c_floating_ip_Server_creating', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
    link_tasks(graph, 'Server_configured', 'configure_Server', custom_context)
    link_tasks(graph, 'War_created', 'create_War', custom_context)
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopping',
                   'Artifact_Directory_Test_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleting',
                   'Artifact_Directory_Test_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping',
                   custom_context)
    custom_context.register_native_delegate_wf_step('NetPub',
                                                    'NetPub_uninstall')
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleted',
                   'Artifact_Directory_Test_deleted', custom_context)
    custom_context.register_native_delegate_wf_step('Server',
                                                    'Server_uninstall')
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopped',
                   'Artifact_Directory_Test_stopped', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop',
                   'stop_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleting',
               'Artifact_Directory_Test_stopped', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleted',
               'Artifact_Directory_Test_deleting', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Artifact_Directory_Test_deleted',
               custom_context)
    link_tasks(graph, 'Server_uninstall', 'Java_deleted', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_stopped',
               'Artifact_Directory_Test_stopping', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
def uninstall_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopping',
                   'Artifact_Directory_Test_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleting',
                   'Artifact_Directory_Test_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleted',
                   'Artifact_Directory_Test_deleted', custom_context)
    custom_context.register_native_delegate_wf_step('Server',
                                                    'Server_uninstall')
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopped',
                   'Artifact_Directory_Test_stopped', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop',
                   'stop_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'Artifact_Directory_Test_stopped',
               'Artifact_Directory_Test_stopping', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleted',
               'Artifact_Directory_Test_deleting', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Artifact_Directory_Test_deleted',
               custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Java_deleted', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleting',
               'Artifact_Directory_Test_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted', custom_context)
    set_state_task(ctx, graph, 'Server', 'stopped', 'Server_stopped', custom_context)
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleting', 'Artifact_Directory_Test_deleting', custom_context)
    set_state_task(ctx, graph, 'Server', 'stopping', 'Server_stopping', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleting', '_a4c_floating_ip_Server_deleting', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleting', 'Server_deleting', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleted', '_a4c_floating_ip_Server_deleted', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleted', 'Artifact_Directory_Test_deleted', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.delete', 'delete__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopped', 'Artifact_Directory_Test_stopped', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop', 'stop_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleted', 'Server_deleted', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopping', 'Artifact_Directory_Test_stopping', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopping', '_a4c_floating_ip_Server_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopped', '_a4c_floating_ip_Server_stopped', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping', custom_context)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.stop', 'stop__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.stop', 'stop_Server', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.delete', 'delete_Server', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted', custom_context)
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'Server_stopped', 'stop_Server', custom_context)
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleting', 'Artifact_Directory_Test_stopped', custom_context)
    link_tasks(graph, 'Server_stopping', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'Artifact_Directory_Test_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'Java_deleted', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleting', '_a4c_floating_ip_Server_stopped', custom_context)
    link_tasks(graph, 'Server_deleting', 'Server_stopped', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleted', 'delete__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleted', 'Artifact_Directory_Test_deleting', custom_context)
    link_tasks(graph, 'delete__a4c_floating_ip_Server', '_a4c_floating_ip_Server_deleting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_stopped', 'Artifact_Directory_Test_stopping', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'Server_deleted', 'delete_Server', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopping', 'Server_deleted', custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopped', 'stop__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'stop__a4c_floating_ip_Server', '_a4c_floating_ip_Server_stopping', custom_context)
    link_tasks(graph, 'stop_Server', 'Server_stopping', custom_context)
    link_tasks(graph, 'delete_Server', 'Server_deleting', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
Exemplo n.º 13
0
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create',
                   'create_Mysql', custom_context)
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial',
                   custom_context)
    operation_task(ctx, graph, 'Mysql',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Mysql', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configured',
                   'Wordpress_configured', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created',
                   custom_context)
    custom_context.register_native_delegate_wf_step('DataBase',
                                                    'DataBase_install')
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start',
                   'start_PHP', custom_context)
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring',
                   custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.start', 'start_Wordpress',
                   custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Apache', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating',
                   custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.create', 'create_Apache',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configuring',
                   'Wordpress_configuring', custom_context)
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Wordpress', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured',
                   custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating',
                   custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create',
                   'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start',
                   'start_Apache', custom_context)
    operation_task(ctx, graph, 'PHP',
                   'cloudify.interfaces.lifecycle.configure', 'configure_PHP',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.create', 'create_Wordpress',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start',
                   'start_Mysql', custom_context)
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_install', custom_context)
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress',
               custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured',
               custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Mysql_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created',
               custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring',
               custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial',
               custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_install', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    operation_task(
        ctx, graph, "Compute", "cloudify.interfaces.lifecycle.configure", "configure_Compute", custom_context
    )
    set_state_task(ctx, graph, "Mysql", "configuring", "Mysql_configuring", custom_context)
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.create", "create_Mysql", custom_context)
    set_state_task(ctx, graph, "Compute", "starting", "Compute_starting", custom_context)
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "configured",
        "_a4c_file_system_BlockStorage_configured",
        custom_context,
    )
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.configure", "configure_Mysql", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "starting", "BlockStorage_starting", custom_context)
    operation_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "cloudify.interfaces.lifecycle.configure",
        "configure__a4c_file_system_BlockStorage",
        custom_context,
    )
    set_state_task(ctx, graph, "Compute", "configured", "Compute_configured", custom_context)
    set_state_task(ctx, graph, "Mysql", "created", "Mysql_created", custom_context)
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "starting",
        "_a4c_file_system_BlockStorage_starting",
        custom_context,
    )
    set_state_task(ctx, graph, "Compute", "started", "Compute_started", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "creating", "BlockStorage_creating", custom_context)
    set_state_task(ctx, graph, "Mysql", "creating", "Mysql_creating", custom_context)
    set_state_task(ctx, graph, "Compute", "created", "Compute_created", custom_context)
    operation_task(ctx, graph, "Compute", "cloudify.interfaces.lifecycle.create", "create_Compute", custom_context)
    operation_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "cloudify.interfaces.lifecycle.start",
        "start__a4c_file_system_BlockStorage",
        custom_context,
    )
    set_state_task(
        ctx, graph, "_a4c_file_system_BlockStorage", "initial", "_a4c_file_system_BlockStorage_initial", custom_context
    )
    set_state_task(ctx, graph, "Mysql", "starting", "Mysql_starting", custom_context)
    set_state_task(ctx, graph, "Mysql", "configured", "Mysql_configured", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "configuring", "BlockStorage_configuring", custom_context)
    operation_task(
        ctx, graph, "BlockStorage", "cloudify.interfaces.lifecycle.start", "start_BlockStorage", custom_context
    )
    set_state_task(ctx, graph, "Mysql", "started", "Mysql_started", custom_context)
    set_state_task(
        ctx, graph, "_a4c_file_system_BlockStorage", "started", "_a4c_file_system_BlockStorage_started", custom_context
    )
    operation_task(ctx, graph, "Compute", "cloudify.interfaces.lifecycle.start", "start_Compute", custom_context)
    operation_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "cloudify.interfaces.lifecycle.create",
        "create__a4c_file_system_BlockStorage",
        custom_context,
    )
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "creating",
        "_a4c_file_system_BlockStorage_creating",
        custom_context,
    )
    set_state_task(
        ctx, graph, "_a4c_file_system_BlockStorage", "created", "_a4c_file_system_BlockStorage_created", custom_context
    )
    set_state_task(ctx, graph, "Compute", "initial", "Compute_initial", custom_context)
    set_state_task(ctx, graph, "Mysql", "initial", "Mysql_initial", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "created", "BlockStorage_created", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "initial", "BlockStorage_initial", custom_context)
    set_state_task(ctx, graph, "Compute", "configuring", "Compute_configuring", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "configured", "BlockStorage_configured", custom_context)
    operation_task(
        ctx, graph, "BlockStorage", "cloudify.interfaces.lifecycle.create", "create_BlockStorage", custom_context
    )
    set_state_task(ctx, graph, "BlockStorage", "started", "BlockStorage_started", custom_context)
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "configuring",
        "_a4c_file_system_BlockStorage_configuring",
        custom_context,
    )
    set_state_task(ctx, graph, "Compute", "creating", "Compute_creating", custom_context)
    operation_task(
        ctx, graph, "BlockStorage", "cloudify.interfaces.lifecycle.configure", "configure_BlockStorage", custom_context
    )
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.start", "start_Mysql", custom_context)
    link_tasks(graph, "configure_Compute", "Compute_configuring", custom_context)
    link_tasks(graph, "Mysql_configuring", "_a4c_file_system_BlockStorage_started", custom_context)
    link_tasks(graph, "Mysql_configuring", "Mysql_created", custom_context)
    link_tasks(graph, "create_Mysql", "Mysql_creating", custom_context)
    link_tasks(graph, "Compute_starting", "Compute_configured", custom_context)
    link_tasks(
        graph, "_a4c_file_system_BlockStorage_configured", "configure__a4c_file_system_BlockStorage", custom_context
    )
    link_tasks(graph, "configure_Mysql", "Mysql_configuring", custom_context)
    link_tasks(graph, "BlockStorage_starting", "BlockStorage_configured", custom_context)
    link_tasks(
        graph, "configure__a4c_file_system_BlockStorage", "_a4c_file_system_BlockStorage_configuring", custom_context
    )
    link_tasks(graph, "Compute_configured", "configure_Compute", custom_context)
    link_tasks(graph, "Mysql_created", "create_Mysql", custom_context)
    link_tasks(
        graph, "_a4c_file_system_BlockStorage_starting", "_a4c_file_system_BlockStorage_configured", custom_context
    )
    link_tasks(graph, "Compute_started", "start_Compute", custom_context)
    link_tasks(graph, "BlockStorage_creating", "BlockStorage_initial", custom_context)
    link_tasks(graph, "Mysql_creating", "Mysql_initial", custom_context)
    link_tasks(graph, "Compute_created", "create_Compute", custom_context)
    link_tasks(graph, "create_Compute", "Compute_creating", custom_context)
    link_tasks(graph, "start__a4c_file_system_BlockStorage", "_a4c_file_system_BlockStorage_starting", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_initial", "Compute_started", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_initial", "BlockStorage_started", custom_context)
    link_tasks(graph, "Mysql_starting", "Mysql_configured", custom_context)
    link_tasks(graph, "Mysql_configured", "configure_Mysql", custom_context)
    link_tasks(graph, "BlockStorage_configuring", "BlockStorage_created", custom_context)
    link_tasks(graph, "BlockStorage_configuring", "Compute_started", custom_context)
    link_tasks(graph, "start_BlockStorage", "BlockStorage_starting", custom_context)
    link_tasks(graph, "Mysql_started", "start_Mysql", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_started", "start__a4c_file_system_BlockStorage", custom_context)
    link_tasks(graph, "start_Compute", "Compute_starting", custom_context)
    link_tasks(graph, "create__a4c_file_system_BlockStorage", "_a4c_file_system_BlockStorage_creating", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_creating", "_a4c_file_system_BlockStorage_initial", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_created", "create__a4c_file_system_BlockStorage", custom_context)
    link_tasks(graph, "Mysql_initial", "Compute_started", custom_context)
    link_tasks(graph, "BlockStorage_created", "create_BlockStorage", custom_context)
    link_tasks(graph, "Compute_configuring", "BlockStorage_created", custom_context)
    link_tasks(graph, "Compute_configuring", "Compute_created", custom_context)
    link_tasks(graph, "BlockStorage_configured", "configure_BlockStorage", custom_context)
    link_tasks(graph, "create_BlockStorage", "BlockStorage_creating", custom_context)
    link_tasks(graph, "BlockStorage_started", "start_BlockStorage", custom_context)
    link_tasks(
        graph, "_a4c_file_system_BlockStorage_configuring", "_a4c_file_system_BlockStorage_created", custom_context
    )
    link_tasks(graph, "_a4c_file_system_BlockStorage_configuring", "Mysql_created", custom_context)
    link_tasks(graph, "Compute_creating", "Compute_initial", custom_context)
    link_tasks(graph, "configure_BlockStorage", "BlockStorage_configuring", custom_context)
    link_tasks(graph, "start_Mysql", "Mysql_starting", custom_context)
def install_host_compute(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'starting', 'FileSystem_starting', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configuring', 'FileSystem_configuring', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configured', 'FileSystem_configured', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'created', 'FileSystem_created', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'creating', 'FileSystem_creating', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.configure', 'configure_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_install')
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.start', 'start_FileSystem', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'started', 'FileSystem_started', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'initial', 'FileSystem_initial', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.create', 'create_FileSystem', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'start_FileSystem', 'FileSystem_starting', custom_context)
    link_tasks(graph, 'configure_FileSystem', 'FileSystem_configuring', custom_context)
    link_tasks(graph, 'FileSystem_starting', 'FileSystem_configured', custom_context)
    link_tasks(graph, 'FileSystem_configuring', 'FileSystem_created', custom_context)
    link_tasks(graph, 'create_FileSystem', 'FileSystem_creating', custom_context)
    link_tasks(graph, 'FileSystem_configured', 'configure_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'FileSystem_started', 'start_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_creating', 'FileSystem_initial', custom_context)
    link_tasks(graph, 'FileSystem_created', 'create_FileSystem', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, "Wordpress", "deleted", "Wordpress_deleted", custom_context)
    set_state_task(ctx, graph, "Apache", "stopped", "Apache_stopped", custom_context)
    set_state_task(ctx, graph, "Apache", "stopping", "Apache_stopping", custom_context)
    operation_task(ctx, graph, "DataBase", "cloudify.interfaces.lifecycle.delete", "delete_DataBase", custom_context)
    set_state_task(ctx, graph, "PHP", "stopping", "PHP_stopping", custom_context)
    operation_task(ctx, graph, "Server", "cloudify.interfaces.lifecycle.stop", "stop_Server", custom_context)
    set_state_task(ctx, graph, "DataBase", "deleting", "DataBase_deleting", custom_context)
    set_state_task(ctx, graph, "Server", "deleting", "Server_deleting", custom_context)
    set_state_task(ctx, graph, "PHP", "deleted", "PHP_deleted", custom_context)
    operation_task(
        ctx, graph, "InternalNetwork", "cloudify.interfaces.lifecycle.stop", "stop_InternalNetwork", custom_context
    )
    set_state_task(ctx, graph, "Wordpress", "stopped", "Wordpress_stopped", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "deleted", "InternalNetwork_deleted", custom_context)
    set_state_task(ctx, graph, "Mysql", "stopping", "Mysql_stopping", custom_context)
    set_state_task(ctx, graph, "Wordpress", "deleting", "Wordpress_deleting", custom_context)
    set_state_task(ctx, graph, "NetPub", "stopping", "NetPub_stopping", custom_context)
    operation_task(ctx, graph, "Server", "cloudify.interfaces.lifecycle.delete", "delete_Server", custom_context)
    operation_task(ctx, graph, "NetPub", "cloudify.interfaces.lifecycle.stop", "stop_NetPub", custom_context)
    set_state_task(ctx, graph, "Apache", "deleting", "Apache_deleting", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "stopped", "InternalNetwork_stopped", custom_context)
    set_state_task(ctx, graph, "NetPub", "deleted", "NetPub_deleted", custom_context)
    set_state_task(ctx, graph, "Server", "stopped", "Server_stopped", custom_context)
    set_state_task(ctx, graph, "Wordpress", "stopping", "Wordpress_stopping", custom_context)
    set_state_task(ctx, graph, "PHP", "deleting", "PHP_deleting", custom_context)
    set_state_task(ctx, graph, "Mysql", "deleting", "Mysql_deleting", custom_context)
    set_state_task(ctx, graph, "Server", "stopping", "Server_stopping", custom_context)
    set_state_task(ctx, graph, "NetPub", "deleting", "NetPub_deleting", custom_context)
    operation_task(ctx, graph, "DataBase", "cloudify.interfaces.lifecycle.stop", "stop_DataBase", custom_context)
    set_state_task(ctx, graph, "DataBase", "deleted", "DataBase_deleted", custom_context)
    set_state_task(ctx, graph, "PHP", "stopped", "PHP_stopped", custom_context)
    operation_task(
        ctx, graph, "InternalNetwork", "cloudify.interfaces.lifecycle.delete", "delete_InternalNetwork", custom_context
    )
    set_state_task(ctx, graph, "InternalNetwork", "stopping", "InternalNetwork_stopping", custom_context)
    set_state_task(ctx, graph, "NetPub", "stopped", "NetPub_stopped", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "deleting", "InternalNetwork_deleting", custom_context)
    set_state_task(ctx, graph, "DataBase", "stopped", "DataBase_stopped", custom_context)
    set_state_task(ctx, graph, "Server", "deleted", "Server_deleted", custom_context)
    set_state_task(ctx, graph, "Mysql", "stopped", "Mysql_stopped", custom_context)
    operation_task(ctx, graph, "NetPub", "cloudify.interfaces.lifecycle.delete", "delete_NetPub", custom_context)
    set_state_task(ctx, graph, "DataBase", "stopping", "DataBase_stopping", custom_context)
    set_state_task(ctx, graph, "Apache", "deleted", "Apache_deleted", custom_context)
    set_state_task(ctx, graph, "Mysql", "deleted", "Mysql_deleted", custom_context)
    link_tasks(graph, "Wordpress_deleted", "Wordpress_deleting", custom_context)
    link_tasks(graph, "Apache_stopped", "Apache_stopping", custom_context)
    link_tasks(graph, "Apache_stopping", "Wordpress_deleted", custom_context)
    link_tasks(graph, "delete_DataBase", "DataBase_deleting", custom_context)
    link_tasks(graph, "stop_Server", "Server_stopping", custom_context)
    link_tasks(graph, "DataBase_deleting", "DataBase_stopped", custom_context)
    link_tasks(graph, "Server_deleting", "Server_stopped", custom_context)
    link_tasks(graph, "PHP_deleted", "PHP_deleting", custom_context)
    link_tasks(graph, "stop_InternalNetwork", "InternalNetwork_stopping", custom_context)
    link_tasks(graph, "Wordpress_stopped", "Wordpress_stopping", custom_context)
    link_tasks(graph, "InternalNetwork_deleted", "delete_InternalNetwork", custom_context)
    link_tasks(graph, "Wordpress_deleting", "Wordpress_stopped", custom_context)
    link_tasks(graph, "delete_Server", "Server_deleting", custom_context)
    link_tasks(graph, "stop_NetPub", "NetPub_stopping", custom_context)
    link_tasks(graph, "Apache_deleting", "Apache_stopped", custom_context)
    link_tasks(graph, "InternalNetwork_stopped", "stop_InternalNetwork", custom_context)
    link_tasks(graph, "NetPub_deleted", "delete_NetPub", custom_context)
    link_tasks(graph, "Server_stopped", "stop_Server", custom_context)
    link_tasks(graph, "PHP_deleting", "PHP_stopped", custom_context)
    link_tasks(graph, "Mysql_deleting", "Mysql_stopped", custom_context)
    link_tasks(graph, "Server_stopping", "Apache_deleted", custom_context)
    link_tasks(graph, "Server_stopping", "PHP_deleted", custom_context)
    link_tasks(graph, "NetPub_deleting", "NetPub_stopped", custom_context)
    link_tasks(graph, "stop_DataBase", "DataBase_stopping", custom_context)
    link_tasks(graph, "DataBase_deleted", "delete_DataBase", custom_context)
    link_tasks(graph, "PHP_stopped", "PHP_stopping", custom_context)
    link_tasks(graph, "delete_InternalNetwork", "InternalNetwork_deleting", custom_context)
    link_tasks(graph, "NetPub_stopped", "stop_NetPub", custom_context)
    link_tasks(graph, "InternalNetwork_deleting", "InternalNetwork_stopped", custom_context)
    link_tasks(graph, "DataBase_stopped", "stop_DataBase", custom_context)
    link_tasks(graph, "Server_deleted", "delete_Server", custom_context)
    link_tasks(graph, "Mysql_stopped", "Mysql_stopping", custom_context)
    link_tasks(graph, "delete_NetPub", "NetPub_deleting", custom_context)
    link_tasks(graph, "DataBase_stopping", "Mysql_deleted", custom_context)
    link_tasks(graph, "Apache_deleted", "Apache_deleting", custom_context)
    link_tasks(graph, "Mysql_deleted", "Mysql_deleting", custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, "Apache", "created", "Apache_created", custom_context)
    operation_task(ctx, graph, "Server", "cloudify.interfaces.lifecycle.create", "create_Server", custom_context)
    set_state_task(ctx, graph, "Apache", "started", "Apache_started", custom_context)
    set_state_task(ctx, graph, "Apache", "configured", "Apache_configured", custom_context)
    operation_task(ctx, graph, "DataBase", "cloudify.interfaces.lifecycle.create", "create_DataBase", custom_context)
    set_state_task(ctx, graph, "DataBase", "started", "DataBase_started", custom_context)
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.configure", "configure_Mysql", custom_context)
    set_state_task(ctx, graph, "Mysql", "initial", "Mysql_initial", custom_context)
    set_state_task(ctx, graph, "Mysql", "creating", "Mysql_creating", custom_context)
    set_state_task(ctx, graph, "DataBase", "configured", "DataBase_configured", custom_context)
    set_state_task(ctx, graph, "Mysql", "configuring", "Mysql_configuring", custom_context)
    set_state_task(ctx, graph, "Wordpress", "created", "Wordpress_created", custom_context)
    set_state_task(ctx, graph, "Apache", "initial", "Apache_initial", custom_context)
    set_state_task(ctx, graph, "Mysql", "starting", "Mysql_starting", custom_context)
    set_state_task(ctx, graph, "NetPub", "starting", "NetPub_starting", custom_context)
    operation_task(ctx, graph, "Apache", "cloudify.interfaces.lifecycle.start", "start_Apache", custom_context)
    operation_task(ctx, graph, "Wordpress", "cloudify.interfaces.lifecycle.start", "start_Wordpress", custom_context)
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.create", "create_Mysql", custom_context)
    operation_task(ctx, graph, "NetPub", "cloudify.interfaces.lifecycle.create", "create_NetPub", custom_context)
    operation_task(ctx, graph, "PHP", "cloudify.interfaces.lifecycle.configure", "configure_PHP", custom_context)
    set_state_task(ctx, graph, "Wordpress", "starting", "Wordpress_starting", custom_context)
    set_state_task(ctx, graph, "NetPub", "creating", "NetPub_creating", custom_context)
    set_state_task(ctx, graph, "Apache", "configuring", "Apache_configuring", custom_context)
    set_state_task(ctx, graph, "Server", "creating", "Server_creating", custom_context)
    set_state_task(ctx, graph, "Wordpress", "creating", "Wordpress_creating", custom_context)
    operation_task(
        ctx, graph, "Wordpress", "cloudify.interfaces.lifecycle.configure", "configure_Wordpress", custom_context
    )
    operation_task(ctx, graph, "NetPub", "cloudify.interfaces.lifecycle.configure", "configure_NetPub", custom_context)
    set_state_task(ctx, graph, "Mysql", "started", "Mysql_started", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "initial", "InternalNetwork_initial", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "configuring", "InternalNetwork_configuring", custom_context)
    set_state_task(ctx, graph, "Server", "started", "Server_started", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "started", "InternalNetwork_started", custom_context)
    set_state_task(ctx, graph, "Server", "configuring", "Server_configuring", custom_context)
    set_state_task(ctx, graph, "Wordpress", "started", "Wordpress_started", custom_context)
    set_state_task(ctx, graph, "Apache", "starting", "Apache_starting", custom_context)
    set_state_task(ctx, graph, "PHP", "configuring", "PHP_configuring", custom_context)
    set_state_task(ctx, graph, "PHP", "configured", "PHP_configured", custom_context)
    set_state_task(ctx, graph, "Server", "initial", "Server_initial", custom_context)
    set_state_task(ctx, graph, "Server", "starting", "Server_starting", custom_context)
    operation_task(ctx, graph, "NetPub", "cloudify.interfaces.lifecycle.start", "start_NetPub", custom_context)
    operation_task(
        ctx,
        graph,
        "InternalNetwork",
        "cloudify.interfaces.lifecycle.configure",
        "configure_InternalNetwork",
        custom_context,
    )
    set_state_task(ctx, graph, "DataBase", "creating", "DataBase_creating", custom_context)
    operation_task(ctx, graph, "DataBase", "cloudify.interfaces.lifecycle.start", "start_DataBase", custom_context)
    set_state_task(ctx, graph, "DataBase", "created", "DataBase_created", custom_context)
    set_state_task(ctx, graph, "NetPub", "created", "NetPub_created", custom_context)
    operation_task(ctx, graph, "PHP", "cloudify.interfaces.lifecycle.create", "create_PHP", custom_context)
    set_state_task(ctx, graph, "Apache", "creating", "Apache_creating", custom_context)
    set_state_task(ctx, graph, "Wordpress", "initial", "Wordpress_initial", custom_context)
    set_state_task(ctx, graph, "Wordpress", "configuring", "Wordpress_configuring", custom_context)
    set_state_task(ctx, graph, "Wordpress", "configured", "Wordpress_configured", custom_context)
    set_state_task(ctx, graph, "Server", "configured", "Server_configured", custom_context)
    operation_task(
        ctx, graph, "DataBase", "cloudify.interfaces.lifecycle.configure", "configure_DataBase", custom_context
    )
    set_state_task(ctx, graph, "DataBase", "starting", "DataBase_starting", custom_context)
    set_state_task(ctx, graph, "DataBase", "configuring", "DataBase_configuring", custom_context)
    operation_task(
        ctx, graph, "InternalNetwork", "cloudify.interfaces.lifecycle.start", "start_InternalNetwork", custom_context
    )
    set_state_task(ctx, graph, "Mysql", "configured", "Mysql_configured", custom_context)
    set_state_task(ctx, graph, "PHP", "created", "PHP_created", custom_context)
    operation_task(ctx, graph, "PHP", "cloudify.interfaces.lifecycle.start", "start_PHP", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "configured", "InternalNetwork_configured", custom_context)
    operation_task(ctx, graph, "Apache", "cloudify.interfaces.lifecycle.configure", "configure_Apache", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "created", "InternalNetwork_created", custom_context)
    set_state_task(ctx, graph, "PHP", "started", "PHP_started", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "starting", "InternalNetwork_starting", custom_context)
    set_state_task(ctx, graph, "DataBase", "initial", "DataBase_initial", custom_context)
    set_state_task(ctx, graph, "NetPub", "initial", "NetPub_initial", custom_context)
    set_state_task(ctx, graph, "InternalNetwork", "creating", "InternalNetwork_creating", custom_context)
    set_state_task(ctx, graph, "PHP", "starting", "PHP_starting", custom_context)
    set_state_task(ctx, graph, "PHP", "initial", "PHP_initial", custom_context)
    set_state_task(ctx, graph, "PHP", "creating", "PHP_creating", custom_context)
    set_state_task(ctx, graph, "Mysql", "created", "Mysql_created", custom_context)
    operation_task(ctx, graph, "Apache", "cloudify.interfaces.lifecycle.create", "create_Apache", custom_context)
    operation_task(
        ctx, graph, "InternalNetwork", "cloudify.interfaces.lifecycle.create", "create_InternalNetwork", custom_context
    )
    set_state_task(ctx, graph, "NetPub", "configured", "NetPub_configured", custom_context)
    set_state_task(ctx, graph, "NetPub", "configuring", "NetPub_configuring", custom_context)
    operation_task(ctx, graph, "Mysql", "cloudify.interfaces.lifecycle.start", "start_Mysql", custom_context)
    operation_task(ctx, graph, "Server", "cloudify.interfaces.lifecycle.configure", "configure_Server", custom_context)
    set_state_task(ctx, graph, "NetPub", "started", "NetPub_started", custom_context)
    operation_task(ctx, graph, "Wordpress", "cloudify.interfaces.lifecycle.create", "create_Wordpress", custom_context)
    operation_task(ctx, graph, "Server", "cloudify.interfaces.lifecycle.start", "start_Server", custom_context)
    set_state_task(ctx, graph, "Server", "created", "Server_created", custom_context)
    link_tasks(graph, "Apache_created", "create_Apache", custom_context)
    link_tasks(graph, "create_Server", "Server_creating", custom_context)
    link_tasks(graph, "Apache_started", "start_Apache", custom_context)
    link_tasks(graph, "Apache_configured", "configure_Apache", custom_context)
    link_tasks(graph, "create_DataBase", "DataBase_creating", custom_context)
    link_tasks(graph, "DataBase_started", "start_DataBase", custom_context)
    link_tasks(graph, "configure_Mysql", "Mysql_configuring", custom_context)
    link_tasks(graph, "Mysql_initial", "DataBase_started", custom_context)
    link_tasks(graph, "Mysql_creating", "Mysql_initial", custom_context)
    link_tasks(graph, "DataBase_configured", "configure_DataBase", custom_context)
    link_tasks(graph, "Mysql_configuring", "Wordpress_created", custom_context)
    link_tasks(graph, "Mysql_configuring", "Mysql_created", custom_context)
    link_tasks(graph, "Wordpress_created", "create_Wordpress", custom_context)
    link_tasks(graph, "Apache_initial", "Server_started", custom_context)
    link_tasks(graph, "Mysql_starting", "Mysql_configured", custom_context)
    link_tasks(graph, "NetPub_starting", "NetPub_configured", custom_context)
    link_tasks(graph, "start_Apache", "Apache_starting", custom_context)
    link_tasks(graph, "start_Wordpress", "Wordpress_starting", custom_context)
    link_tasks(graph, "create_Mysql", "Mysql_creating", custom_context)
    link_tasks(graph, "create_NetPub", "NetPub_creating", custom_context)
    link_tasks(graph, "configure_PHP", "PHP_configuring", custom_context)
    link_tasks(graph, "Wordpress_starting", "Wordpress_configured", custom_context)
    link_tasks(graph, "NetPub_creating", "NetPub_initial", custom_context)
    link_tasks(graph, "Apache_configuring", "Apache_created", custom_context)
    link_tasks(graph, "Server_creating", "Server_initial", custom_context)
    link_tasks(graph, "Wordpress_creating", "Wordpress_initial", custom_context)
    link_tasks(graph, "configure_Wordpress", "Wordpress_configuring", custom_context)
    link_tasks(graph, "configure_NetPub", "NetPub_configuring", custom_context)
    link_tasks(graph, "Mysql_started", "start_Mysql", custom_context)
    link_tasks(graph, "InternalNetwork_configuring", "DataBase_created", custom_context)
    link_tasks(graph, "InternalNetwork_configuring", "InternalNetwork_created", custom_context)
    link_tasks(graph, "InternalNetwork_configuring", "Server_created", custom_context)
    link_tasks(graph, "Server_started", "start_Server", custom_context)
    link_tasks(graph, "InternalNetwork_started", "start_InternalNetwork", custom_context)
    link_tasks(graph, "Server_configuring", "InternalNetwork_started", custom_context)
    link_tasks(graph, "Server_configuring", "NetPub_started", custom_context)
    link_tasks(graph, "Server_configuring", "Server_created", custom_context)
    link_tasks(graph, "Wordpress_started", "start_Wordpress", custom_context)
    link_tasks(graph, "Apache_starting", "Apache_configured", custom_context)
    link_tasks(graph, "PHP_configuring", "PHP_created", custom_context)
    link_tasks(graph, "PHP_configuring", "Wordpress_created", custom_context)
    link_tasks(graph, "PHP_configured", "configure_PHP", custom_context)
    link_tasks(graph, "Server_starting", "Server_configured", custom_context)
    link_tasks(graph, "start_NetPub", "NetPub_starting", custom_context)
    link_tasks(graph, "configure_InternalNetwork", "InternalNetwork_configuring", custom_context)
    link_tasks(graph, "DataBase_creating", "DataBase_initial", custom_context)
    link_tasks(graph, "start_DataBase", "DataBase_starting", custom_context)
    link_tasks(graph, "DataBase_created", "create_DataBase", custom_context)
    link_tasks(graph, "NetPub_created", "create_NetPub", custom_context)
    link_tasks(graph, "create_PHP", "PHP_creating", custom_context)
    link_tasks(graph, "Apache_creating", "Apache_initial", custom_context)
    link_tasks(graph, "Wordpress_initial", "Apache_started", custom_context)
    link_tasks(graph, "Wordpress_configuring", "Mysql_started", custom_context)
    link_tasks(graph, "Wordpress_configuring", "Wordpress_created", custom_context)
    link_tasks(graph, "Wordpress_configuring", "PHP_started", custom_context)
    link_tasks(graph, "Wordpress_configured", "configure_Wordpress", custom_context)
    link_tasks(graph, "Server_configured", "configure_Server", custom_context)
    link_tasks(graph, "configure_DataBase", "DataBase_configuring", custom_context)
    link_tasks(graph, "DataBase_starting", "DataBase_configured", custom_context)
    link_tasks(graph, "DataBase_configuring", "DataBase_created", custom_context)
    link_tasks(graph, "DataBase_configuring", "InternalNetwork_started", custom_context)
    link_tasks(graph, "start_InternalNetwork", "InternalNetwork_starting", custom_context)
    link_tasks(graph, "Mysql_configured", "configure_Mysql", custom_context)
    link_tasks(graph, "PHP_created", "create_PHP", custom_context)
    link_tasks(graph, "start_PHP", "PHP_starting", custom_context)
    link_tasks(graph, "InternalNetwork_configured", "configure_InternalNetwork", custom_context)
    link_tasks(graph, "configure_Apache", "Apache_configuring", custom_context)
    link_tasks(graph, "InternalNetwork_created", "create_InternalNetwork", custom_context)
    link_tasks(graph, "PHP_started", "start_PHP", custom_context)
    link_tasks(graph, "InternalNetwork_starting", "InternalNetwork_configured", custom_context)
    link_tasks(graph, "InternalNetwork_creating", "InternalNetwork_initial", custom_context)
    link_tasks(graph, "PHP_starting", "PHP_configured", custom_context)
    link_tasks(graph, "PHP_initial", "Server_started", custom_context)
    link_tasks(graph, "PHP_creating", "PHP_initial", custom_context)
    link_tasks(graph, "Mysql_created", "create_Mysql", custom_context)
    link_tasks(graph, "create_Apache", "Apache_creating", custom_context)
    link_tasks(graph, "create_InternalNetwork", "InternalNetwork_creating", custom_context)
    link_tasks(graph, "NetPub_configured", "configure_NetPub", custom_context)
    link_tasks(graph, "NetPub_configuring", "NetPub_created", custom_context)
    link_tasks(graph, "NetPub_configuring", "Server_created", custom_context)
    link_tasks(graph, "start_Mysql", "Mysql_starting", custom_context)
    link_tasks(graph, "configure_Server", "Server_configuring", custom_context)
    link_tasks(graph, "NetPub_started", "start_NetPub", custom_context)
    link_tasks(graph, "create_Wordpress", "Wordpress_creating", custom_context)
    link_tasks(graph, "start_Server", "Server_starting", custom_context)
    link_tasks(graph, "Server_created", "create_Server", custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'configuring', '_a4c_file_system_DataBaseStorage_configuring', custom_context)
    operation_task(ctx, graph, 'DataBase', 'cloudify.interfaces.lifecycle.create', 'create_DataBase', custom_context)
    set_state_task(ctx, graph, 'Server', 'configuring', 'Server_configuring', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'starting', 'DataBaseStorage_starting', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.create', 'create_Server', custom_context)
    set_state_task(ctx, graph, 'Server', 'initial', 'Server_initial', custom_context)
    set_state_task(ctx, graph, 'Server', 'started', 'Server_started', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.create', 'create_InternalNetwork', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.configure', 'configure_Mysql', custom_context)
    operation_task(ctx, graph, 'DataBaseStorage', 'cloudify.interfaces.lifecycle.start', 'start_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'configured', 'DataBaseStorage_configured', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configuring', 'InternalNetwork_configuring', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'created', 'DataBaseStorage_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'started', 'InternalNetwork_started', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial', custom_context)
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured', custom_context)
    operation_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'cloudify.interfaces.lifecycle.configure', 'configure__a4c_file_system_DataBaseStorage', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.configure', 'configure_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'starting', 'DataBase_starting', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configured', '_a4c_floating_ip_Server_configured', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.start', 'start__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'creating', 'InternalNetwork_creating', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'configured', 'InternalNetwork_subnet_configured', custom_context)
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'configured', 'DataBase_configured', custom_context)
    operation_task(ctx, graph, 'DataBase', 'cloudify.interfaces.lifecycle.start', 'start_DataBase', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configured', 'Wordpress_configured', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'created', 'InternalNetwork_subnet_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'starting', 'InternalNetwork_subnet_starting', custom_context)
    set_state_task(ctx, graph, 'Server', 'starting', 'Server_starting', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'created', 'InternalNetwork_created', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.configure', 'configure_Apache', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'started', 'InternalNetwork_subnet_started', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'configuring', 'InternalNetwork_subnet_configuring', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.configure', 'configure_Wordpress', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'starting', '_a4c_file_system_DataBaseStorage_starting', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create', 'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start', 'start_Apache', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'started', '_a4c_floating_ip_Server_started', custom_context)
    operation_task(ctx, graph, 'DataBaseStorage', 'cloudify.interfaces.lifecycle.configure', 'configure_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'initial', 'DataBaseStorage_initial', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.create', 'create__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'configuring', 'DataBase_configuring', custom_context)
    operation_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'cloudify.interfaces.lifecycle.start', 'start__a4c_file_system_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'created', '_a4c_file_system_DataBaseStorage_created', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'initial', 'DataBase_initial', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start', 'start_Mysql', custom_context)
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create', 'create_Mysql', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'starting', 'InternalNetwork_starting', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'created', 'DataBase_created', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.start', 'start_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'creating', 'DataBaseStorage_creating', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created', custom_context)
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'initial', 'InternalNetwork_initial', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'started', 'DataBase_started', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'configured', '_a4c_file_system_DataBaseStorage_configured', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.create', 'create_Apache', custom_context)
    operation_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'cloudify.interfaces.lifecycle.create', 'create__a4c_file_system_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating', custom_context)
    set_state_task(ctx, graph, 'Server', 'created', 'Server_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'creating', 'InternalNetwork_subnet_creating', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.create', 'create_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configuring', '_a4c_floating_ip_Server_configuring', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'started', '_a4c_file_system_DataBaseStorage_started', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'creating', '_a4c_file_system_DataBaseStorage_creating', custom_context)
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.configure', 'configure_PHP', custom_context)
    set_state_task(ctx, graph, 'Server', 'creating', 'Server_creating', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.start', 'start_Server', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configured', 'InternalNetwork_configured', custom_context)
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'initial', '_a4c_floating_ip_Server_initial', custom_context)
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created', custom_context)
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.configure', 'configure_Server', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.configure', 'configure__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'starting', '_a4c_floating_ip_Server_starting', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'initial', '_a4c_file_system_DataBaseStorage_initial', custom_context)
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'configuring', 'DataBaseStorage_configuring', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start', 'start_PHP', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'creating', '_a4c_floating_ip_Server_creating', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'creating', 'DataBase_creating', custom_context)
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.start', 'start_Wordpress', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configuring', 'Wordpress_configuring', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.start', 'start_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'started', 'DataBaseStorage_started', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.create', 'create_Wordpress', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'created', '_a4c_floating_ip_Server_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'initial', 'InternalNetwork_subnet_initial', custom_context)
    set_state_task(ctx, graph, 'Server', 'configured', 'Server_configured', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.configure', 'configure_InternalNetwork_subnet', custom_context)
    operation_task(ctx, graph, 'DataBaseStorage', 'cloudify.interfaces.lifecycle.create', 'create_DataBaseStorage', custom_context)
    operation_task(ctx, graph, 'DataBase', 'cloudify.interfaces.lifecycle.configure', 'configure_DataBase', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_configuring', '_a4c_file_system_DataBaseStorage_created', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'create_DataBase', 'DataBase_creating', custom_context)
    link_tasks(graph, 'Server_configuring', 'InternalNetwork_started', custom_context)
    link_tasks(graph, 'Server_configuring', 'InternalNetwork_subnet_started', custom_context)
    link_tasks(graph, 'Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'Server_configuring', '_a4c_floating_ip_Server_started', custom_context)
    link_tasks(graph, 'DataBaseStorage_starting', 'DataBaseStorage_configured', custom_context)
    link_tasks(graph, 'Mysql_configuring', '_a4c_file_system_DataBaseStorage_started', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'create_Server', 'Server_creating', custom_context)
    link_tasks(graph, 'Server_started', 'start_Server', custom_context)
    link_tasks(graph, 'create_InternalNetwork', 'InternalNetwork_creating', custom_context)
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'start_DataBaseStorage', 'DataBaseStorage_starting', custom_context)
    link_tasks(graph, 'DataBaseStorage_configured', 'configure_DataBaseStorage', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'InternalNetwork_created', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'DataBase_created', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured', custom_context)
    link_tasks(graph, 'DataBaseStorage_created', 'create_DataBaseStorage', custom_context)
    link_tasks(graph, 'InternalNetwork_started', 'start_InternalNetwork', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'configure__a4c_file_system_DataBaseStorage', '_a4c_file_system_DataBaseStorage_configuring', custom_context)
    link_tasks(graph, 'configure_InternalNetwork', 'InternalNetwork_configuring', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'DataBase_starting', 'DataBase_configured', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configured', 'configure__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'start__a4c_floating_ip_Server', '_a4c_floating_ip_Server_starting', custom_context)
    link_tasks(graph, 'InternalNetwork_creating', 'InternalNetwork_initial', custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_started', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configured', 'configure_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'DataBase_configured', 'configure_DataBase', custom_context)
    link_tasks(graph, 'start_DataBase', 'DataBase_starting', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_created', 'create_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_starting', 'InternalNetwork_subnet_configured', custom_context)
    link_tasks(graph, 'Server_starting', 'Server_configured', custom_context)
    link_tasks(graph, 'InternalNetwork_created', 'create_InternalNetwork', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_started', 'start_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configuring', 'DataBase_created', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configuring', 'InternalNetwork_subnet_created', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_starting', '_a4c_file_system_DataBaseStorage_configured', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_started', 'start__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'configure_DataBaseStorage', 'DataBaseStorage_configuring', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial', custom_context)
    link_tasks(graph, 'create__a4c_floating_ip_Server', '_a4c_floating_ip_Server_creating', custom_context)
    link_tasks(graph, 'DataBase_configuring', 'DataBaseStorage_created', custom_context)
    link_tasks(graph, 'DataBase_configuring', 'InternalNetwork_started', custom_context)
    link_tasks(graph, 'DataBase_configuring', 'InternalNetwork_subnet_started', custom_context)
    link_tasks(graph, 'DataBase_configuring', 'DataBase_created', custom_context)
    link_tasks(graph, 'start__a4c_file_system_DataBaseStorage', '_a4c_file_system_DataBaseStorage_starting', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_created', 'create__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'InternalNetwork_starting', 'InternalNetwork_configured', custom_context)
    link_tasks(graph, 'DataBase_created', 'create_DataBase', custom_context)
    link_tasks(graph, 'start_InternalNetwork_subnet', 'InternalNetwork_subnet_starting', custom_context)
    link_tasks(graph, 'DataBaseStorage_creating', 'DataBaseStorage_initial', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'DataBase_started', 'start_DataBase', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_configured', 'configure__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'create__a4c_file_system_DataBaseStorage', '_a4c_file_system_DataBaseStorage_creating', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'Server_created', 'create_Server', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_creating', 'InternalNetwork_subnet_initial', custom_context)
    link_tasks(graph, 'create_InternalNetwork_subnet', 'InternalNetwork_subnet_creating', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring', '_a4c_floating_ip_Server_created', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_started', 'start__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_creating', '_a4c_file_system_DataBaseStorage_initial', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Server_creating', 'Server_initial', custom_context)
    link_tasks(graph, 'start_Server', 'Server_starting', custom_context)
    link_tasks(graph, 'InternalNetwork_configured', 'configure_InternalNetwork', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_started', custom_context)
    link_tasks(graph, 'configure_Server', 'Server_configuring', custom_context)
    link_tasks(graph, 'configure__a4c_floating_ip_Server', '_a4c_floating_ip_Server_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_starting', '_a4c_floating_ip_Server_configured', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_initial', 'DataBaseStorage_started', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_initial', 'DataBase_started', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_started', custom_context)
    link_tasks(graph, 'DataBaseStorage_configuring', 'DataBaseStorage_created', custom_context)
    link_tasks(graph, 'DataBaseStorage_configuring', 'DataBase_started', custom_context)
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_creating', '_a4c_floating_ip_Server_initial', custom_context)
    link_tasks(graph, 'DataBase_creating', 'DataBase_initial', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Mysql_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'start_InternalNetwork', 'InternalNetwork_starting', custom_context)
    link_tasks(graph, 'DataBaseStorage_started', 'start_DataBaseStorage', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_created', 'create__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_initial', 'InternalNetwork_started', custom_context)
    link_tasks(graph, 'Server_configured', 'configure_Server', custom_context)
    link_tasks(graph, 'configure_InternalNetwork_subnet', 'InternalNetwork_subnet_configuring', custom_context)
    link_tasks(graph, 'create_DataBaseStorage', 'DataBaseStorage_creating', custom_context)
    link_tasks(graph, 'configure_DataBase', 'DataBase_configuring', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'stopping', 'DataBase_stopping', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleted', '_a4c_floating_ip_Server_deleted', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'deleted', 'DataBaseStorage_deleted', custom_context)
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'deleting', 'InternalNetwork_subnet_deleting', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped', custom_context)
    operation_task(ctx, graph, 'DataBase', 'cloudify.interfaces.lifecycle.delete', 'delete_DataBase', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'stopped', 'InternalNetwork_stopped', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.delete', 'delete_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopped', '_a4c_floating_ip_Server_stopped', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'deleting', 'DataBaseStorage_deleting', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.stop', 'stop_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'stopped', 'InternalNetwork_subnet_stopped', custom_context)
    operation_task(ctx, graph, 'DataBaseStorage', 'cloudify.interfaces.lifecycle.delete', 'delete_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'stopping', 'InternalNetwork_subnet_stopping', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.delete', 'delete_Server', custom_context)
    operation_task(ctx, graph, 'DataBase', 'cloudify.interfaces.lifecycle.stop', 'stop_DataBase', custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'stopped', 'DataBaseStorage_stopped', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'stopped', '_a4c_file_system_DataBaseStorage_stopped', custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'deleted', '_a4c_file_system_DataBaseStorage_deleted', custom_context)
    set_state_task(ctx, graph, 'Server', 'stopped', 'Server_stopped', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'stopping', '_a4c_file_system_DataBaseStorage_stopping', custom_context)
    set_state_task(ctx, graph, 'Server', 'stopping', 'Server_stopping', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleting', '_a4c_floating_ip_Server_deleting', custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleting', 'Server_deleting', custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'deleting', 'InternalNetwork_deleting', custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting', custom_context)
    operation_task(ctx, graph, 'DataBaseStorage', 'cloudify.interfaces.lifecycle.stop', 'stop_DataBaseStorage', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'deleted', 'InternalNetwork_subnet_deleted', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'deleted', 'InternalNetwork_deleted', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.delete', 'delete__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.stop', 'stop_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleted', 'Server_deleted', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping', custom_context)
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'stopped', 'DataBase_stopped', custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopping', '_a4c_floating_ip_Server_stopping', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'deleting', 'DataBase_deleting', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'deleted', 'DataBase_deleted', custom_context)
    set_state_task(ctx, graph, 'DataBaseStorage', 'stopping', 'DataBaseStorage_stopping', custom_context)
    set_state_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'deleting', '_a4c_file_system_DataBaseStorage_deleting', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.stop', 'stop__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'cloudify.interfaces.lifecycle.delete', 'delete__a4c_file_system_DataBaseStorage', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.delete', 'delete_InternalNetwork', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.stop', 'stop_Server', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'stopping', 'InternalNetwork_stopping', custom_context)
    operation_task(ctx, graph, '_a4c_file_system_DataBaseStorage', 'cloudify.interfaces.lifecycle.stop', 'stop__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped', custom_context)
    link_tasks(graph, 'DataBase_stopping', '_a4c_file_system_DataBaseStorage_deleted', custom_context)
    link_tasks(graph, 'DataBase_stopping', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleted', 'delete__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'DataBaseStorage_deleted', 'delete_DataBaseStorage', custom_context)
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_deleting', 'InternalNetwork_subnet_stopped', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
    link_tasks(graph, 'delete_DataBase', 'DataBase_deleting', custom_context)
    link_tasks(graph, 'InternalNetwork_stopped', 'stop_InternalNetwork', custom_context)
    link_tasks(graph, 'delete_InternalNetwork_subnet', 'InternalNetwork_subnet_deleting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopped', 'stop__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'DataBaseStorage_deleting', 'DataBaseStorage_stopped', custom_context)
    link_tasks(graph, 'stop_InternalNetwork_subnet', 'InternalNetwork_subnet_stopping', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_stopped', 'stop_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'delete_DataBaseStorage', 'DataBaseStorage_deleting', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_stopping', 'DataBase_deleted', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_stopping', 'Server_deleted', custom_context)
    link_tasks(graph, 'delete_Server', 'Server_deleting', custom_context)
    link_tasks(graph, 'stop_DataBase', 'DataBase_stopping', custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
    link_tasks(graph, 'DataBaseStorage_stopped', 'stop_DataBaseStorage', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_stopped', 'stop__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_deleted', 'delete__a4c_file_system_DataBaseStorage', custom_context)
    link_tasks(graph, 'Server_stopped', 'stop_Server', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_stopping', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'PHP_deleted', custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleting', '_a4c_floating_ip_Server_stopped', custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'Server_deleting', 'Server_stopped', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'InternalNetwork_deleting', 'InternalNetwork_stopped', custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'stop_DataBaseStorage', 'DataBaseStorage_stopping', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_deleted', 'delete_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_deleted', 'delete_InternalNetwork', custom_context)
    link_tasks(graph, 'delete__a4c_floating_ip_Server', '_a4c_floating_ip_Server_deleting', custom_context)
    link_tasks(graph, 'stop_InternalNetwork', 'InternalNetwork_stopping', custom_context)
    link_tasks(graph, 'Server_deleted', 'delete_Server', custom_context)
    link_tasks(graph, 'DataBase_stopped', 'stop_DataBase', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopping', 'Server_deleted', custom_context)
    link_tasks(graph, 'DataBase_deleting', 'DataBase_stopped', custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting', custom_context)
    link_tasks(graph, 'DataBase_deleted', 'delete_DataBase', custom_context)
    link_tasks(graph, 'DataBaseStorage_stopping', '_a4c_file_system_DataBaseStorage_deleted', custom_context)
    link_tasks(graph, 'DataBaseStorage_stopping', 'DataBase_deleted', custom_context)
    link_tasks(graph, '_a4c_file_system_DataBaseStorage_deleting', '_a4c_file_system_DataBaseStorage_stopped', custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping', custom_context)
    link_tasks(graph, 'stop__a4c_floating_ip_Server', '_a4c_floating_ip_Server_stopping', custom_context)
    link_tasks(graph, 'delete__a4c_file_system_DataBaseStorage', '_a4c_file_system_DataBaseStorage_deleting', custom_context)
    link_tasks(graph, 'delete_InternalNetwork', 'InternalNetwork_deleting', custom_context)
    link_tasks(graph, 'stop_Server', 'Server_stopping', custom_context)
    link_tasks(graph, 'InternalNetwork_stopping', 'InternalNetwork_subnet_deleted', custom_context)
    link_tasks(graph, 'stop__a4c_file_system_DataBaseStorage', '_a4c_file_system_DataBaseStorage_stopping', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start', 'start_Java', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'starting', 'Artifact_Directory_Test_starting', custom_context)
    set_state_task(ctx, graph, 'Server', 'configuring', 'Server_configuring', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.create', 'create_Server', custom_context)
    set_state_task(ctx, graph, 'Server', 'started', 'Server_started', custom_context)
    set_state_task(ctx, graph, 'Server', 'initial', 'Server_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'created', 'Artifact_Directory_Test_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.configure', 'configure_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.configure', 'configure_War', custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test', 'cloudify.interfaces.lifecycle.start', 'start_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Server', 'created', 'Server_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting', custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start', 'start_Tomcat', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.create', 'create_War', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configuring', '_a4c_floating_ip_Server_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating', custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test', 'cloudify.interfaces.lifecycle.configure', 'configure_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting', custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring', custom_context)
    set_state_task(ctx, graph, 'Server', 'creating', 'Server_creating', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start', 'start_War', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.start', 'start_Server', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'configured', '_a4c_floating_ip_Server_configured', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.start', 'start__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test', 'cloudify.interfaces.lifecycle.create', 'create_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'initial', '_a4c_floating_ip_Server_initial', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring', custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configured', 'Artifact_Directory_Test_configured', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.configure', 'configure_Server', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.configure', 'configure__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'starting', '_a4c_floating_ip_Server_starting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'started', 'Artifact_Directory_Test_started', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.configure', 'configure_Java', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'creating', '_a4c_floating_ip_Server_creating', custom_context)
    set_state_task(ctx, graph, 'Server', 'starting', 'Server_starting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'initial', 'Artifact_Directory_Test_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'creating', 'Artifact_Directory_Test_creating', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial', custom_context)
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configuring', 'Artifact_Directory_Test_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create', 'create_Java', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.create', 'create_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'started', '_a4c_floating_ip_Server_started', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'created', '_a4c_floating_ip_Server_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server', 'cloudify.interfaces.lifecycle.create', 'create__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating', custom_context)
    set_state_task(ctx, graph, 'Server', 'configured', 'Server_configured', custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started', custom_context)
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_starting', 'Artifact_Directory_Test_configured', custom_context)
    link_tasks(graph, 'Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'Server_configuring', '_a4c_floating_ip_Server_started', custom_context)
    link_tasks(graph, 'create_Server', 'Server_creating', custom_context)
    link_tasks(graph, 'Server_started', 'start_Server', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_created', 'create_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'start_Artifact_Directory_Test', 'Artifact_Directory_Test_starting', custom_context)
    link_tasks(graph, 'Server_created', 'create_Server', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'create_War', 'War_creating', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configuring', '_a4c_floating_ip_Server_created', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'configure_Artifact_Directory_Test', 'Artifact_Directory_Test_configuring', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'Server_creating', 'Server_initial', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'start_Server', 'Server_starting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_configured', 'configure__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'start__a4c_floating_ip_Server', '_a4c_floating_ip_Server_starting', custom_context)
    link_tasks(graph, 'create_Artifact_Directory_Test', 'Artifact_Directory_Test_creating', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configured', 'configure_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'configure_Server', 'Server_configuring', custom_context)
    link_tasks(graph, 'configure__a4c_floating_ip_Server', '_a4c_floating_ip_Server_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_starting', '_a4c_floating_ip_Server_configured', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_started', 'start_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_creating', '_a4c_floating_ip_Server_initial', custom_context)
    link_tasks(graph, 'Server_starting', 'Server_configured', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_initial', 'Server_started', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_creating', 'Artifact_Directory_Test_initial', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_started', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configuring', 'Artifact_Directory_Test_created', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_started', 'start__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_created', 'create__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_initial', 'Server_started', custom_context)
    link_tasks(graph, 'create__a4c_floating_ip_Server', '_a4c_floating_ip_Server_creating', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
    link_tasks(graph, 'Server_configured', 'configure_Server', custom_context)
    link_tasks(graph, 'War_created', 'create_War', custom_context)
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create', 'create_Mysql', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.configure', 'configure_Mysql', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'configured', 'Wordpress_configured', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created', custom_context)
    custom_context.register_native_delegate_wf_step('DataBase', 'DataBase_install')
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start', 'start_PHP', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.start', 'start_Wordpress', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.configure', 'configure_Apache', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.create', 'create_Apache', custom_context)
    custom_context.register_native_delegate_wf_step('InternalNetwork', 'InternalNetwork_install')
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'configuring', 'Wordpress_configuring', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.configure', 'configure_Wordpress', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured', custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create', 'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start', 'start_Apache', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.configure', 'configure_PHP', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.create', 'create_Wordpress', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start', 'start_Mysql', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_install', custom_context)
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Mysql_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial', custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_install', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
Exemplo n.º 22
0
def _build_tasks(ctx, graph, tasks):
    # just paste here the generated code
    set_state_task(ctx, graph, 'LoadBalancerServer', 'deleting', 'LoadBalancerServer_deleting', tasks)
    operation_task(ctx, graph, 'LoadBalancerServer', 'cloudify.interfaces.lifecycle.delete', 'delete_LoadBalancerServer', tasks)
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted', tasks)
    set_state_task(ctx, graph, 'WebServer', 'deleted', 'WebServer_deleted', tasks)
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting', tasks)
    operation_task(ctx, graph, 'LoadBalancerServer', 'cloudify.interfaces.lifecycle.stop', 'stop_LoadBalancerServer', tasks)
    operation_task(ctx, graph, 'WebServer', 'cloudify.interfaces.lifecycle.stop', 'stop_WebServer', tasks)
    set_state_task(ctx, graph, 'ApacheLoadBalancer', 'stopped', 'ApacheLoadBalancer_stopped', tasks)
    set_state_task(ctx, graph, 'ApacheLoadBalancer', 'deleting', 'ApacheLoadBalancer_deleting', tasks)
    operation_task(ctx, graph, 'ApacheLoadBalancer', 'cloudify.interfaces.lifecycle.stop', 'stop_ApacheLoadBalancer', tasks)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting', tasks)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping', tasks)
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping', tasks)
    operation_task(ctx, graph, 'WebServer', 'cloudify.interfaces.lifecycle.delete', 'delete_WebServer', tasks)
    set_state_task(ctx, graph, 'LoadBalancerServer', 'deleted', 'LoadBalancerServer_deleted', tasks)
    set_state_task(ctx, graph, 'WebServer', 'stopped', 'WebServer_stopped', tasks)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop', 'stop_Tomcat', tasks)
    set_state_task(ctx, graph, 'ApacheLoadBalancer', 'stopping', 'ApacheLoadBalancer_stopping', tasks)
    set_state_task(ctx, graph, 'LoadBalancerServer', 'stopping', 'LoadBalancerServer_stopping', tasks)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting', tasks)
    set_state_task(ctx, graph, 'WebServer', 'stopping', 'WebServer_stopping', tasks)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped', tasks)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping', tasks)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped', tasks)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', tasks)
    set_state_task(ctx, graph, 'WebServer', 'deleting', 'WebServer_deleting', tasks)
    set_state_task(ctx, graph, 'ApacheLoadBalancer', 'deleted', 'ApacheLoadBalancer_deleted', tasks)
    set_state_task(ctx, graph, 'LoadBalancerServer', 'stopped', 'LoadBalancerServer_stopped', tasks)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted', tasks)
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', tasks)
    set_state_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'stopping', '_a4c_floating_ip_LoadBalancerServer_stopping', tasks)
    operation_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'cloudify.interfaces.lifecycle.stop', 'stop__a4c_floating_ip_LoadBalancerServer', tasks)
    set_state_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'stopped', '_a4c_floating_ip_LoadBalancerServer_stopped', tasks)
    set_state_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'deleting', '_a4c_floating_ip_LoadBalancerServer_deleting', tasks)
    operation_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'cloudify.interfaces.lifecycle.delete', 'delete__a4c_floating_ip_LoadBalancerServer', tasks)
    set_state_task(ctx, graph, '_a4c_floating_ip_LoadBalancerServer', 'deleted', '_a4c_floating_ip_LoadBalancerServer_deleted', tasks)
    link_tasks(graph, 'LoadBalancerServer_deleting', 'LoadBalancerServer_stopped', tasks)
    link_tasks(graph, 'delete_LoadBalancerServer', 'LoadBalancerServer_deleting', tasks)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', tasks)
    link_tasks(graph, 'WebServer_deleted', 'delete_WebServer', tasks)
    link_tasks(graph, 'War_deleting', 'War_stopped', tasks)
    link_tasks(graph, 'stop_LoadBalancerServer', 'LoadBalancerServer_stopping', tasks)
    link_tasks(graph, 'stop_WebServer', 'WebServer_stopping', tasks)
    link_tasks(graph, 'ApacheLoadBalancer_stopped', 'stop_ApacheLoadBalancer', tasks)
    link_tasks(graph, 'ApacheLoadBalancer_deleting', 'ApacheLoadBalancer_stopped', tasks)
    link_tasks(graph, 'stop_ApacheLoadBalancer', 'ApacheLoadBalancer_stopping', tasks)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', tasks)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', tasks)
    link_tasks(graph, 'delete_WebServer', 'WebServer_deleting', tasks)
    link_tasks(graph, 'LoadBalancerServer_deleted', 'delete_LoadBalancerServer', tasks)
    link_tasks(graph, 'WebServer_stopped', 'stop_WebServer', tasks)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', tasks)
    link_tasks(graph, 'LoadBalancerServer_stopping', 'ApacheLoadBalancer_deleted', tasks)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', tasks)
    link_tasks(graph, 'WebServer_stopping', 'Tomcat_deleted', tasks)
    link_tasks(graph, 'WebServer_stopping', 'Java_deleted', tasks)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', tasks)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', tasks)
    link_tasks(graph, 'War_deleted', 'War_deleting', tasks)
    link_tasks(graph, 'WebServer_deleting', 'WebServer_stopped', tasks)
    link_tasks(graph, 'ApacheLoadBalancer_deleted', 'ApacheLoadBalancer_deleting', tasks)
    link_tasks(graph, 'LoadBalancerServer_stopped', 'stop_LoadBalancerServer', tasks)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', tasks)
    link_tasks(graph, 'War_stopped', 'War_stopping', tasks)
    link_tasks(graph, '_a4c_floating_ip_LoadBalancerServer_stopping', 'LoadBalancerServer_deleted', tasks)
    link_tasks(graph, 'stop__a4c_floating_ip_LoadBalancerServer', '_a4c_floating_ip_LoadBalancerServer_stopping', tasks)
    link_tasks(graph, '_a4c_floating_ip_LoadBalancerServer_stopped', 'stop__a4c_floating_ip_LoadBalancerServer', tasks)
    link_tasks(graph, '_a4c_floating_ip_LoadBalancerServer_deleting', '_a4c_floating_ip_LoadBalancerServer_stopped', tasks)
    link_tasks(graph, 'delete__a4c_floating_ip_LoadBalancerServer', '_a4c_floating_ip_LoadBalancerServer_deleting', tasks)
    link_tasks(graph, '_a4c_floating_ip_LoadBalancerServer_deleted', 'delete__a4c_floating_ip_LoadBalancerServer', tasks)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('LinuxFileSystem1')
    custom_context.add_customized_wf_node('FileSystem')
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.create', 'create_FileSystem', custom_context)
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'configured', 'LinuxFileSystem1_configured', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configuring', 'FileSystem_configuring', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'starting', 'FileSystem_starting', custom_context)
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'started', 'LinuxFileSystem1_started', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.start', 'start_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('AnotherScaleCompute', 'AnotherScaleCompute_install')
    operation_task(ctx, graph, 'LinuxFileSystem1', 'cloudify.interfaces.lifecycle.configure', 'configure_LinuxFileSystem1', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'initial', 'FileSystem_initial', custom_context)
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'created', 'LinuxFileSystem1_created', custom_context)
    operation_task(ctx, graph, 'LinuxFileSystem1', 'cloudify.interfaces.lifecycle.start', 'start_LinuxFileSystem1', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_install')
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'configuring', 'LinuxFileSystem1_configuring', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'creating', 'FileSystem_creating', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configured', 'FileSystem_configured', custom_context)
    custom_context.register_native_delegate_wf_step('Volume1', 'Volume1_install')
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'initial', 'LinuxFileSystem1_initial', custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    custom_context.register_native_delegate_wf_step('BlockStorage2', 'BlockStorage2_install')
    custom_context.register_native_delegate_wf_step('Compute3', 'Compute3_install')
    set_state_task(ctx, graph, 'FileSystem', 'started', 'FileSystem_started', custom_context)
    custom_context.register_native_delegate_wf_step('BlockStorage', 'BlockStorage_install')
    custom_context.register_native_delegate_wf_step('NonScaledCompute', 'NonScaledCompute_install')
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.configure', 'configure_FileSystem', custom_context)
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'starting', 'LinuxFileSystem1_starting', custom_context)
    set_state_task(ctx, graph, 'LinuxFileSystem1', 'creating', 'LinuxFileSystem1_creating', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'created', 'FileSystem_created', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'create_FileSystem', 'FileSystem_creating', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_configured', 'configure_LinuxFileSystem1', custom_context)
    link_tasks(graph, 'FileSystem_configuring', 'FileSystem_created', custom_context)
    link_tasks(graph, 'FileSystem_starting', 'FileSystem_configured', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_started', 'start_LinuxFileSystem1', custom_context)
    link_tasks(graph, 'start_FileSystem', 'FileSystem_starting', custom_context)
    link_tasks(graph, 'configure_LinuxFileSystem1', 'LinuxFileSystem1_configuring', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'BlockStorage2_install', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'BlockStorage_install', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_created', 'LinuxFileSystem1_creating', custom_context)
    link_tasks(graph, 'start_LinuxFileSystem1', 'LinuxFileSystem1_starting', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_configuring', 'LinuxFileSystem1_created', custom_context)
    link_tasks(graph, 'FileSystem_creating', 'FileSystem_initial', custom_context)
    link_tasks(graph, 'FileSystem_configured', 'configure_FileSystem', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_initial', 'Compute3_install', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_initial', 'Volume1_install', custom_context)
    link_tasks(graph, 'FileSystem_started', 'start_FileSystem', custom_context)
    link_tasks(graph, 'configure_FileSystem', 'FileSystem_configuring', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_starting', 'LinuxFileSystem1_configured', custom_context)
    link_tasks(graph, 'LinuxFileSystem1_creating', 'LinuxFileSystem1_initial', custom_context)
    link_tasks(graph, 'FileSystem_created', 'create_FileSystem', custom_context)
Exemplo n.º 24
0
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting',
                   custom_context)
    custom_context.register_native_delegate_wf_step('NetPub',
                                                    'NetPub_uninstall')
    custom_context.register_native_delegate_wf_step('DataBase',
                                                    'DataBase_uninstall')
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting',
                   custom_context)
    custom_context.register_native_delegate_wf_step('Server',
                                                    'Server_uninstall')
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped',
               custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting',
               custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, 'DataBase_uninstall', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping',
               custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Server_uninstall', 'PHP_deleted', custom_context)
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
Exemplo n.º 25
0
def install_host_database(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create',
                   'create_Mysql', custom_context)
    operation_task(ctx, graph, 'Mysql',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Mysql', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created',
                   custom_context)
    custom_context.register_native_delegate_wf_step('DataBase',
                                                    'DataBase_install')
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start',
                   'start_Mysql', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_install', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'starting', 'FileSystem_starting', custom_context)
    custom_context.register_native_delegate_wf_step('BlockStorage', 'BlockStorage_install')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'configured', 'FileSystem_configured', custom_context)
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'configuring', 'FileSystem_configuring', custom_context)
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'initial', 'FileSystem_initial', custom_context)
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'created', 'FileSystem_created', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.configure', 'configure_FileSystem', custom_context)
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'creating', 'FileSystem_creating', custom_context)
    operation_task(ctx, graph, 'FileSystem', 'cloudify.interfaces.lifecycle.start', 'start_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_install')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'started', 'FileSystem_started', custom_context)
    custom_context.register_native_delegate_wf_step('DeletableBlockStorage', 'DeletableBlockStorage_install')
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'FileSystem_starting', 'FileSystem_configured', custom_context)
    link_tasks(graph, 'FileSystem_configured', 'configure_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_configuring', 'FileSystem_created', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'BlockStorage_install', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'FileSystem_created', 'FileSystem_creating', custom_context)
    link_tasks(graph, 'configure_FileSystem', 'FileSystem_configuring', custom_context)
    link_tasks(graph, 'FileSystem_creating', 'FileSystem_initial', custom_context)
    link_tasks(graph, 'start_FileSystem', 'FileSystem_starting', custom_context)
    link_tasks(graph, 'FileSystem_started', 'start_FileSystem', custom_context)
Exemplo n.º 27
0
def uninstall_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting',
                   custom_context)
    custom_context.register_native_delegate_wf_step('Server',
                                                    'Server_uninstall')
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting',
               custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped',
               custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping',
               custom_context)
    link_tasks(graph, 'Server_uninstall', 'PHP_deleted', custom_context)
Exemplo n.º 28
0
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping',
                   custom_context)
    operation_task(ctx, graph, 'DataBase',
                   'cloudify.interfaces.lifecycle.delete', 'delete_DataBase',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping',
                   custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.stop',
                   'stop_Server', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'deleting', 'DataBase_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'deleting', 'Server_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    operation_task(ctx, graph, 'InternalNetwork',
                   'cloudify.interfaces.lifecycle.stop',
                   'stop_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'deleted',
                   'InternalNetwork_deleted', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'stopping', 'NetPub_stopping',
                   custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.delete', 'delete_Server',
                   custom_context)
    operation_task(ctx, graph, 'NetPub', 'cloudify.interfaces.lifecycle.stop',
                   'stop_NetPub', custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'stopped',
                   'InternalNetwork_stopped', custom_context)
    set_state_task(ctx, graph, 'NetPub', 'deleted', 'NetPub_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'stopped', 'Server_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'stopping', 'Server_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'deleting', 'NetPub_deleting',
                   custom_context)
    operation_task(ctx, graph, 'DataBase',
                   'cloudify.interfaces.lifecycle.stop', 'stop_DataBase',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'deleted', 'DataBase_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    operation_task(ctx, graph, 'InternalNetwork',
                   'cloudify.interfaces.lifecycle.delete',
                   'delete_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'stopping',
                   'InternalNetwork_stopping', custom_context)
    set_state_task(ctx, graph, 'NetPub', 'stopped', 'NetPub_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'deleting',
                   'InternalNetwork_deleting', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'stopped', 'DataBase_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'deleted', 'Server_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped',
                   custom_context)
    operation_task(ctx, graph, 'NetPub',
                   'cloudify.interfaces.lifecycle.delete', 'delete_NetPub',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'stopping', 'DataBase_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted',
                   custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting',
               custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'delete_DataBase', 'DataBase_deleting', custom_context)
    link_tasks(graph, 'stop_Server', 'Server_stopping', custom_context)
    link_tasks(graph, 'DataBase_deleting', 'DataBase_stopped', custom_context)
    link_tasks(graph, 'Server_deleting', 'Server_stopped', custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
    link_tasks(graph, 'stop_InternalNetwork', 'InternalNetwork_stopping',
               custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping',
               custom_context)
    link_tasks(graph, 'InternalNetwork_deleted', 'delete_InternalNetwork',
               custom_context)
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped',
               custom_context)
    link_tasks(graph, 'delete_Server', 'Server_deleting', custom_context)
    link_tasks(graph, 'stop_NetPub', 'NetPub_stopping', custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'InternalNetwork_stopped', 'stop_InternalNetwork',
               custom_context)
    link_tasks(graph, 'NetPub_deleted', 'delete_NetPub', custom_context)
    link_tasks(graph, 'Server_stopped', 'stop_Server', custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, 'Server_stopping', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'PHP_deleted', custom_context)
    link_tasks(graph, 'NetPub_deleting', 'NetPub_stopped', custom_context)
    link_tasks(graph, 'stop_DataBase', 'DataBase_stopping', custom_context)
    link_tasks(graph, 'DataBase_deleted', 'delete_DataBase', custom_context)
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'delete_InternalNetwork', 'InternalNetwork_deleting',
               custom_context)
    link_tasks(graph, 'NetPub_stopped', 'stop_NetPub', custom_context)
    link_tasks(graph, 'InternalNetwork_deleting', 'InternalNetwork_stopped',
               custom_context)
    link_tasks(graph, 'DataBase_stopped', 'stop_DataBase', custom_context)
    link_tasks(graph, 'Server_deleted', 'delete_Server', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
    link_tasks(graph, 'delete_NetPub', 'NetPub_deleting', custom_context)
    link_tasks(graph, 'DataBase_stopping', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
Exemplo n.º 29
0
def install_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configured',
                   'Wordpress_configured', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting',
                   custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start',
                   'start_PHP', custom_context)
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring',
                   custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.start', 'start_Wordpress',
                   custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Apache', custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.create', 'create_Apache',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configuring',
                   'Wordpress_configuring', custom_context)
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Wordpress', custom_context)
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating',
                   custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create',
                   'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start',
                   'start_Apache', custom_context)
    operation_task(ctx, graph, 'PHP',
                   'cloudify.interfaces.lifecycle.configure', 'configure_PHP',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.create', 'create_Wordpress',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured',
               custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial',
               custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring',
               custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress',
               custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created',
               custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    operation_task(ctx, graph, 'compute',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_compute', custom_context)
    set_state_task(ctx, graph, 'compute', 'created', 'compute_created',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'starting', 'compute_starting',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'configuring', 'compute_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'started', 'compute_started',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'initial', 'compute_initial',
                   custom_context)
    operation_task(ctx, graph, 'compute',
                   'cloudify.interfaces.lifecycle.start', 'start_compute',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'configured', 'compute_configured',
                   custom_context)
    set_state_task(ctx, graph, 'compute', 'creating', 'compute_creating',
                   custom_context)
    operation_task(ctx, graph, 'compute',
                   'cloudify.interfaces.lifecycle.create', 'create_compute',
                   custom_context)
    link_tasks(graph, 'configure_compute', 'compute_configuring',
               custom_context)
    link_tasks(graph, 'compute_created', 'create_compute', custom_context)
    link_tasks(graph, 'compute_starting', 'compute_configured', custom_context)
    link_tasks(graph, 'compute_configuring', 'compute_created', custom_context)
    link_tasks(graph, 'compute_started', 'start_compute', custom_context)
    link_tasks(graph, 'start_compute', 'compute_starting', custom_context)
    link_tasks(graph, 'compute_configured', 'configure_compute',
               custom_context)
    link_tasks(graph, 'compute_creating', 'compute_initial', custom_context)
    link_tasks(graph, 'create_compute', 'compute_creating', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'compute1', 'creating', 'compute1_creating', custom_context)
    operation_task(ctx, graph, 'compute2', 'cloudify.interfaces.lifecycle.start', 'start_compute2', custom_context)
    set_state_task(ctx, graph, 'compute2', 'configured', 'compute2_configured', custom_context)
    set_state_task(ctx, graph, 'compute1', 'starting', 'compute1_starting', custom_context)
    operation_task(ctx, graph, 'compute1', 'cloudify.interfaces.lifecycle.configure', 'configure_compute1', custom_context)
    operation_task(ctx, graph, 'compute1', 'cloudify.interfaces.lifecycle.start', 'start_compute1', custom_context)
    set_state_task(ctx, graph, 'compute2', 'starting', 'compute2_starting', custom_context)
    set_state_task(ctx, graph, 'compute1', 'initial', 'compute1_initial', custom_context)
    set_state_task(ctx, graph, 'compute2', 'creating', 'compute2_creating', custom_context)
    operation_task(ctx, graph, 'compute2', 'cloudify.interfaces.lifecycle.create', 'create_compute2', custom_context)
    set_state_task(ctx, graph, 'compute2', 'configuring', 'compute2_configuring', custom_context)
    operation_task(ctx, graph, 'compute1', 'cloudify.interfaces.lifecycle.create', 'create_compute1', custom_context)
    operation_task(ctx, graph, 'compute2', 'cloudify.interfaces.lifecycle.configure', 'configure_compute2', custom_context)
    set_state_task(ctx, graph, 'compute1', 'configured', 'compute1_configured', custom_context)
    set_state_task(ctx, graph, 'compute1', 'configuring', 'compute1_configuring', custom_context)
    set_state_task(ctx, graph, 'compute2', 'initial', 'compute2_initial', custom_context)
    set_state_task(ctx, graph, 'compute2', 'created', 'compute2_created', custom_context)
    set_state_task(ctx, graph, 'compute1', 'created', 'compute1_created', custom_context)
    set_state_task(ctx, graph, 'compute1', 'started', 'compute1_started', custom_context)
    set_state_task(ctx, graph, 'compute2', 'started', 'compute2_started', custom_context)
    link_tasks(graph, 'compute1_creating', 'compute1_initial', custom_context)
    link_tasks(graph, 'start_compute2', 'compute2_starting', custom_context)
    link_tasks(graph, 'compute2_configured', 'configure_compute2', custom_context)
    link_tasks(graph, 'compute1_starting', 'compute1_configured', custom_context)
    link_tasks(graph, 'configure_compute1', 'compute1_configuring', custom_context)
    link_tasks(graph, 'start_compute1', 'compute1_starting', custom_context)
    link_tasks(graph, 'compute2_starting', 'compute2_configured', custom_context)
    link_tasks(graph, 'compute2_creating', 'compute2_initial', custom_context)
    link_tasks(graph, 'create_compute2', 'compute2_creating', custom_context)
    link_tasks(graph, 'compute2_configuring', 'compute2_created', custom_context)
    link_tasks(graph, 'create_compute1', 'compute1_creating', custom_context)
    link_tasks(graph, 'configure_compute2', 'compute2_configuring', custom_context)
    link_tasks(graph, 'compute1_configured', 'configure_compute1', custom_context)
    link_tasks(graph, 'compute1_configuring', 'compute1_created', custom_context)
    link_tasks(graph, 'compute2_created', 'create_compute2', custom_context)
    link_tasks(graph, 'compute1_created', 'create_compute1', custom_context)
    link_tasks(graph, 'compute1_started', 'start_compute1', custom_context)
    link_tasks(graph, 'compute2_started', 'start_compute2', custom_context)
def uninstall_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting', custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped', custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted', custom_context)
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped', custom_context)
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping', custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_uninstall')
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping', custom_context)
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting', custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped', custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping', custom_context)
    link_tasks(graph, 'Server_uninstall', 'PHP_deleted', custom_context)
Exemplo n.º 33
0
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created',
                   custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.create', 'create_Server',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured',
                   custom_context)
    operation_task(ctx, graph, 'DataBase',
                   'cloudify.interfaces.lifecycle.create', 'create_DataBase',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'started', 'DataBase_started',
                   custom_context)
    operation_task(ctx, graph, 'Mysql',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Mysql', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'configured', 'DataBase_configured',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'starting', 'NetPub_starting',
                   custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start',
                   'start_Apache', custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.start', 'start_Wordpress',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create',
                   'create_Mysql', custom_context)
    operation_task(ctx, graph, 'NetPub',
                   'cloudify.interfaces.lifecycle.create', 'create_NetPub',
                   custom_context)
    operation_task(ctx, graph, 'PHP',
                   'cloudify.interfaces.lifecycle.configure', 'configure_PHP',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'creating', 'NetPub_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'creating', 'Server_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Wordpress', custom_context)
    operation_task(ctx, graph, 'NetPub',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_NetPub', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'initial',
                   'InternalNetwork_initial', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configuring',
                   'InternalNetwork_configuring', custom_context)
    set_state_task(ctx, graph, 'Server', 'started', 'Server_started',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'started',
                   'InternalNetwork_started', custom_context)
    set_state_task(ctx, graph, 'Server', 'configuring', 'Server_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started',
                   custom_context)
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'initial', 'Server_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'starting', 'Server_starting',
                   custom_context)
    operation_task(ctx, graph, 'NetPub', 'cloudify.interfaces.lifecycle.start',
                   'start_NetPub', custom_context)
    operation_task(ctx, graph, 'InternalNetwork',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'creating', 'DataBase_creating',
                   custom_context)
    operation_task(ctx, graph, 'DataBase',
                   'cloudify.interfaces.lifecycle.start', 'start_DataBase',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'created', 'DataBase_created',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'created', 'NetPub_created',
                   custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create',
                   'create_PHP', custom_context)
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial',
                   custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configuring',
                   'Wordpress_configuring', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configured',
                   'Wordpress_configured', custom_context)
    set_state_task(ctx, graph, 'Server', 'configured', 'Server_configured',
                   custom_context)
    operation_task(ctx, graph, 'DataBase',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_DataBase', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'starting', 'DataBase_starting',
                   custom_context)
    set_state_task(ctx, graph, 'DataBase', 'configuring',
                   'DataBase_configuring', custom_context)
    operation_task(ctx, graph, 'InternalNetwork',
                   'cloudify.interfaces.lifecycle.start',
                   'start_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start',
                   'start_PHP', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configured',
                   'InternalNetwork_configured', custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Apache', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'created',
                   'InternalNetwork_created', custom_context)
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'starting',
                   'InternalNetwork_starting', custom_context)
    set_state_task(ctx, graph, 'DataBase', 'initial', 'DataBase_initial',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'initial', 'NetPub_initial',
                   custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'creating',
                   'InternalNetwork_creating', custom_context)
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting',
                   custom_context)
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created',
                   custom_context)
    operation_task(ctx, graph, 'Apache',
                   'cloudify.interfaces.lifecycle.create', 'create_Apache',
                   custom_context)
    operation_task(ctx, graph, 'InternalNetwork',
                   'cloudify.interfaces.lifecycle.create',
                   'create_InternalNetwork', custom_context)
    set_state_task(ctx, graph, 'NetPub', 'configured', 'NetPub_configured',
                   custom_context)
    set_state_task(ctx, graph, 'NetPub', 'configuring', 'NetPub_configuring',
                   custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start',
                   'start_Mysql', custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Server', custom_context)
    set_state_task(ctx, graph, 'NetPub', 'started', 'NetPub_started',
                   custom_context)
    operation_task(ctx, graph, 'Wordpress',
                   'cloudify.interfaces.lifecycle.create', 'create_Wordpress',
                   custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.start',
                   'start_Server', custom_context)
    set_state_task(ctx, graph, 'Server', 'created', 'Server_created',
                   custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'create_Server', 'Server_creating', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'create_DataBase', 'DataBase_creating', custom_context)
    link_tasks(graph, 'DataBase_started', 'start_DataBase', custom_context)
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_started', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'DataBase_configured', 'configure_DataBase',
               custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_started', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'NetPub_starting', 'NetPub_configured', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'create_NetPub', 'NetPub_creating', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured',
               custom_context)
    link_tasks(graph, 'NetPub_creating', 'NetPub_initial', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'Server_creating', 'Server_initial', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial',
               custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring',
               custom_context)
    link_tasks(graph, 'configure_NetPub', 'NetPub_configuring', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'DataBase_created',
               custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'InternalNetwork_created',
               custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'Server_created',
               custom_context)
    link_tasks(graph, 'Server_started', 'start_Server', custom_context)
    link_tasks(graph, 'InternalNetwork_started', 'start_InternalNetwork',
               custom_context)
    link_tasks(graph, 'Server_configuring', 'InternalNetwork_started',
               custom_context)
    link_tasks(graph, 'Server_configuring', 'NetPub_started', custom_context)
    link_tasks(graph, 'Server_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
    link_tasks(graph, 'Server_starting', 'Server_configured', custom_context)
    link_tasks(graph, 'start_NetPub', 'NetPub_starting', custom_context)
    link_tasks(graph, 'configure_InternalNetwork',
               'InternalNetwork_configuring', custom_context)
    link_tasks(graph, 'DataBase_creating', 'DataBase_initial', custom_context)
    link_tasks(graph, 'start_DataBase', 'DataBase_starting', custom_context)
    link_tasks(graph, 'DataBase_created', 'create_DataBase', custom_context)
    link_tasks(graph, 'NetPub_created', 'create_NetPub', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Mysql_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created',
               custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress',
               custom_context)
    link_tasks(graph, 'Server_configured', 'configure_Server', custom_context)
    link_tasks(graph, 'configure_DataBase', 'DataBase_configuring',
               custom_context)
    link_tasks(graph, 'DataBase_starting', 'DataBase_configured',
               custom_context)
    link_tasks(graph, 'DataBase_configuring', 'DataBase_created',
               custom_context)
    link_tasks(graph, 'DataBase_configuring', 'InternalNetwork_started',
               custom_context)
    link_tasks(graph, 'start_InternalNetwork', 'InternalNetwork_starting',
               custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'InternalNetwork_configured',
               'configure_InternalNetwork', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'InternalNetwork_created', 'create_InternalNetwork',
               custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'InternalNetwork_starting', 'InternalNetwork_configured',
               custom_context)
    link_tasks(graph, 'InternalNetwork_creating', 'InternalNetwork_initial',
               custom_context)
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_started', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'create_InternalNetwork', 'InternalNetwork_creating',
               custom_context)
    link_tasks(graph, 'NetPub_configured', 'configure_NetPub', custom_context)
    link_tasks(graph, 'NetPub_configuring', 'NetPub_created', custom_context)
    link_tasks(graph, 'NetPub_configuring', 'Server_created', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'configure_Server', 'Server_configuring', custom_context)
    link_tasks(graph, 'NetPub_started', 'start_NetPub', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'start_Server', 'Server_starting', custom_context)
    link_tasks(graph, 'Server_created', 'create_Server', custom_context)
def install_host_database(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create', 'create_Mysql', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.configure', 'configure_Mysql', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created', custom_context)
    custom_context.register_native_delegate_wf_step('DataBase', 'DataBase_install')
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started', custom_context)
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start', 'start_Mysql', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'Mysql_initial', 'DataBase_install', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
def install_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start',
                   'start_Java', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'starting',
                   'Artifact_Directory_Test_starting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'started',
                   'Artifact_Directory_Test_started', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'created',
                   'Artifact_Directory_Test_created', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    operation_task(ctx, graph, 'Java',
                   'cloudify.interfaces.lifecycle.configure', 'configure_Java',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Tomcat', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'initial',
                   'Artifact_Directory_Test_initial', custom_context)
    operation_task(ctx, graph, 'War',
                   'cloudify.interfaces.lifecycle.configure', 'configure_War',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.start',
                   'start_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'creating',
                   'Artifact_Directory_Test_creating', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start',
                   'start_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured',
                   custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.create',
                   'create_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configuring',
                   'Artifact_Directory_Test_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create',
                   'create_Java', custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring',
                   custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start',
                   'start_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.create', 'create_Tomcat',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.create',
                   'create_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configured',
                   'Artifact_Directory_Test_configured', custom_context)
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
    link_tasks(graph, 'start_Artifact_Directory_Test',
               'Artifact_Directory_Test_starting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configuring',
               'Artifact_Directory_Test_created', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_install', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_initial', 'Server_install',
               custom_context)
    link_tasks(graph, 'Java_initial', 'Server_install', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_creating',
               'Artifact_Directory_Test_initial', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_started',
               'start_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'create_Artifact_Directory_Test',
               'Artifact_Directory_Test_creating', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'War_created', 'create_War', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'create_War', 'War_creating', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configured',
               'configure_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'configure_Artifact_Directory_Test',
               'Artifact_Directory_Test_configuring', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_created',
               'create_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_starting',
               'Artifact_Directory_Test_configured', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
def install_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('Wordpress')
    custom_context.add_customized_wf_node('Apache')
    custom_context.add_customized_wf_node('PHP')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started', custom_context)
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configured', 'Wordpress_configured', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start', 'start_PHP', custom_context)
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.start', 'start_Wordpress', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.configure', 'configure_Apache', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.create', 'create_Apache', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial', custom_context)
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured', custom_context)
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'configuring', 'Wordpress_configuring', custom_context)
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.configure', 'configure_Wordpress', custom_context)
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create', 'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start', 'start_Apache', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.configure', 'configure_PHP', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.create', 'create_Wordpress', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating', custom_context)
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created', custom_context)
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started', custom_context)
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created', custom_context)
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring', custom_context)
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Apache_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_initial', 'Server_install', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Artifact_Directory_Test')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start',
                   'start_Java', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'starting',
                   'Artifact_Directory_Test_starting', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'started',
                   'Artifact_Directory_Test_started', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'created',
                   'Artifact_Directory_Test_created', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    operation_task(ctx, graph, 'Java',
                   'cloudify.interfaces.lifecycle.configure', 'configure_Java',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Tomcat', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'initial',
                   'Artifact_Directory_Test_initial', custom_context)
    operation_task(ctx, graph, 'War',
                   'cloudify.interfaces.lifecycle.configure', 'configure_War',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.start',
                   'start_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'creating',
                   'Artifact_Directory_Test_creating', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start',
                   'start_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured',
                   custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.create',
                   'create_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating',
                   custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configuring',
                   'Artifact_Directory_Test_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting',
                   custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create',
                   'create_Java', custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring',
                   custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start',
                   'start_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started',
                   custom_context)
    operation_task(ctx, graph, 'Tomcat',
                   'cloudify.interfaces.lifecycle.create', 'create_Tomcat',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial',
                   custom_context)
    operation_task(ctx, graph, 'Artifact_Directory_Test',
                   'cloudify.interfaces.lifecycle.create',
                   'create_Artifact_Directory_Test', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'configured',
                   'Artifact_Directory_Test_configured', custom_context)
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_starting',
               'Artifact_Directory_Test_configured', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_started',
               'start_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_created',
               'create_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_initial', 'Server_install',
               custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'start_Artifact_Directory_Test',
               'Artifact_Directory_Test_starting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_creating',
               'Artifact_Directory_Test_initial', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'create_War', 'War_creating', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_install', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'configure_Artifact_Directory_Test',
               'Artifact_Directory_Test_configuring', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configuring',
               'Artifact_Directory_Test_created', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'Java_initial', 'Server_install', custom_context)
    link_tasks(graph, 'create_Artifact_Directory_Test',
               'Artifact_Directory_Test_creating', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
    link_tasks(graph, 'War_created', 'create_War', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_configured',
               'configure_Artifact_Directory_Test', custom_context)
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
def uninstall_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted', custom_context)
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop', 'stop_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_uninstall')
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped', custom_context)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Java_deleted', custom_context)
Exemplo n.º 39
0
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Server', 'stopped', 'Server_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleting',
                   'Artifact_Directory_Test_deleting', custom_context)
    set_state_task(ctx, graph, 'Server', 'stopping', 'Server_stopping',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleting',
                   '_a4c_floating_ip_Server_deleting', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleting', 'Server_deleting',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'deleted',
                   '_a4c_floating_ip_Server_deleted', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting',
                   custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'deleted',
                   'Artifact_Directory_Test_deleted', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server',
                   'cloudify.interfaces.lifecycle.delete',
                   'delete__a4c_floating_ip_Server', custom_context)
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopped',
                   'Artifact_Directory_Test_stopped', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop',
                   'stop_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Server', 'deleted', 'Server_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'Artifact_Directory_Test', 'stopping',
                   'Artifact_Directory_Test_stopping', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopping',
                   '_a4c_floating_ip_Server_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting',
                   custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Server', 'stopped',
                   '_a4c_floating_ip_Server_stopped', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped',
                   custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Server',
                   'cloudify.interfaces.lifecycle.stop',
                   'stop__a4c_floating_ip_Server', custom_context)
    operation_task(ctx, graph, 'Server', 'cloudify.interfaces.lifecycle.stop',
                   'stop_Server', custom_context)
    operation_task(ctx, graph, 'Server',
                   'cloudify.interfaces.lifecycle.delete', 'delete_Server',
                   custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted',
                   custom_context)
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'Server_stopped', 'stop_Server', custom_context)
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleting',
               'Artifact_Directory_Test_stopped', custom_context)
    link_tasks(graph, 'Server_stopping', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'Server_stopping', 'Artifact_Directory_Test_deleted',
               custom_context)
    link_tasks(graph, 'Server_stopping', 'Java_deleted', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleting',
               '_a4c_floating_ip_Server_stopped', custom_context)
    link_tasks(graph, 'Server_deleting', 'Server_stopped', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_deleted',
               'delete__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_deleted',
               'Artifact_Directory_Test_deleting', custom_context)
    link_tasks(graph, 'delete__a4c_floating_ip_Server',
               '_a4c_floating_ip_Server_deleting', custom_context)
    link_tasks(graph, 'Artifact_Directory_Test_stopped',
               'Artifact_Directory_Test_stopping', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'Server_deleted', 'delete_Server', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopping', 'Server_deleted',
               custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Server_stopped',
               'stop__a4c_floating_ip_Server', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'stop__a4c_floating_ip_Server',
               '_a4c_floating_ip_Server_stopping', custom_context)
    link_tasks(graph, 'stop_Server', 'Server_stopping', custom_context)
    link_tasks(graph, 'delete_Server', 'Server_deleting', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    operation_task(ctx, graph, 'Compute', 'cloudify.interfaces.lifecycle.configure', 'configure_Compute', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'starting', 'InternalNetwork_starting', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'started', '_a4c_floating_ip_Compute_started', custom_context)
    set_state_task(ctx, graph, 'Compute', 'starting', 'Compute_starting', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.create', 'create_InternalNetwork', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.start', 'start_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'created', 'InternalNetwork_subnet_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'starting', 'InternalNetwork_subnet_starting', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configuring', 'InternalNetwork_configuring', custom_context)
    set_state_task(ctx, graph, 'Compute', 'configured', 'Compute_configured', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'started', 'InternalNetwork_started', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'initial', 'InternalNetwork_initial', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'created', 'InternalNetwork_created', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'creating', '_a4c_floating_ip_Compute_creating', custom_context)
    set_state_task(ctx, graph, 'Compute', 'started', 'Compute_started', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'started', 'InternalNetwork_subnet_started', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'configuring', 'InternalNetwork_subnet_configuring', custom_context)
    set_state_task(ctx, graph, 'Compute', 'created', 'Compute_created', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'creating', 'InternalNetwork_subnet_creating', custom_context)
    operation_task(ctx, graph, 'Compute', 'cloudify.interfaces.lifecycle.create', 'create_Compute', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Compute', 'cloudify.interfaces.lifecycle.start', 'start__a4c_floating_ip_Compute', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.start', 'start_InternalNetwork', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'starting', '_a4c_floating_ip_Compute_starting', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.create', 'create_InternalNetwork_subnet', custom_context)
    operation_task(ctx, graph, 'InternalNetwork', 'cloudify.interfaces.lifecycle.configure', 'configure_InternalNetwork', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'configured', '_a4c_floating_ip_Compute_configured', custom_context)
    operation_task(ctx, graph, 'Compute', 'cloudify.interfaces.lifecycle.start', 'start_Compute', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'configured', 'InternalNetwork_configured', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'initial', 'InternalNetwork_subnet_initial', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Compute', 'cloudify.interfaces.lifecycle.configure', 'configure__a4c_floating_ip_Compute', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork_subnet', 'configured', 'InternalNetwork_subnet_configured', custom_context)
    set_state_task(ctx, graph, 'InternalNetwork', 'creating', 'InternalNetwork_creating', custom_context)
    set_state_task(ctx, graph, 'Compute', 'initial', 'Compute_initial', custom_context)
    operation_task(ctx, graph, 'InternalNetwork_subnet', 'cloudify.interfaces.lifecycle.configure', 'configure_InternalNetwork_subnet', custom_context)
    set_state_task(ctx, graph, 'Compute', 'configuring', 'Compute_configuring', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'configuring', '_a4c_floating_ip_Compute_configuring', custom_context)
    set_state_task(ctx, graph, 'Compute', 'creating', 'Compute_creating', custom_context)
    operation_task(ctx, graph, '_a4c_floating_ip_Compute', 'cloudify.interfaces.lifecycle.create', 'create__a4c_floating_ip_Compute', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'created', '_a4c_floating_ip_Compute_created', custom_context)
    set_state_task(ctx, graph, '_a4c_floating_ip_Compute', 'initial', '_a4c_floating_ip_Compute_initial', custom_context)
    link_tasks(graph, 'configure_Compute', 'Compute_configuring', custom_context)
    link_tasks(graph, 'InternalNetwork_starting', 'InternalNetwork_configured', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_started', 'start__a4c_floating_ip_Compute', custom_context)
    link_tasks(graph, 'Compute_starting', 'Compute_configured', custom_context)
    link_tasks(graph, 'create_InternalNetwork', 'InternalNetwork_creating', custom_context)
    link_tasks(graph, 'start_InternalNetwork_subnet', 'InternalNetwork_subnet_starting', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_created', 'create_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_starting', 'InternalNetwork_subnet_configured', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'InternalNetwork_created', custom_context)
    link_tasks(graph, 'InternalNetwork_configuring', 'Compute_created', custom_context)
    link_tasks(graph, 'Compute_configured', 'configure_Compute', custom_context)
    link_tasks(graph, 'InternalNetwork_started', 'start_InternalNetwork', custom_context)
    link_tasks(graph, 'InternalNetwork_created', 'create_InternalNetwork', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_creating', '_a4c_floating_ip_Compute_initial', custom_context)
    link_tasks(graph, 'Compute_started', 'start_Compute', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_started', 'start_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configuring', 'Compute_created', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configuring', 'InternalNetwork_subnet_created', custom_context)
    link_tasks(graph, 'Compute_created', 'create_Compute', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_creating', 'InternalNetwork_subnet_initial', custom_context)
    link_tasks(graph, 'create_Compute', 'Compute_creating', custom_context)
    link_tasks(graph, 'start__a4c_floating_ip_Compute', '_a4c_floating_ip_Compute_starting', custom_context)
    link_tasks(graph, 'start_InternalNetwork', 'InternalNetwork_starting', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_starting', '_a4c_floating_ip_Compute_configured', custom_context)
    link_tasks(graph, 'create_InternalNetwork_subnet', 'InternalNetwork_subnet_creating', custom_context)
    link_tasks(graph, 'configure_InternalNetwork', 'InternalNetwork_configuring', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_configured', 'configure__a4c_floating_ip_Compute', custom_context)
    link_tasks(graph, 'start_Compute', 'Compute_starting', custom_context)
    link_tasks(graph, 'InternalNetwork_configured', 'configure_InternalNetwork', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_initial', 'InternalNetwork_started', custom_context)
    link_tasks(graph, 'configure__a4c_floating_ip_Compute', '_a4c_floating_ip_Compute_configuring', custom_context)
    link_tasks(graph, 'InternalNetwork_subnet_configured', 'configure_InternalNetwork_subnet', custom_context)
    link_tasks(graph, 'InternalNetwork_creating', 'InternalNetwork_initial', custom_context)
    link_tasks(graph, 'configure_InternalNetwork_subnet', 'InternalNetwork_subnet_configuring', custom_context)
    link_tasks(graph, 'Compute_configuring', 'InternalNetwork_started', custom_context)
    link_tasks(graph, 'Compute_configuring', 'InternalNetwork_subnet_started', custom_context)
    link_tasks(graph, 'Compute_configuring', '_a4c_floating_ip_Compute_started', custom_context)
    link_tasks(graph, 'Compute_configuring', 'Compute_created', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_configuring', 'Compute_created', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_configuring', '_a4c_floating_ip_Compute_created', custom_context)
    link_tasks(graph, 'Compute_creating', 'Compute_initial', custom_context)
    link_tasks(graph, 'create__a4c_floating_ip_Compute', '_a4c_floating_ip_Compute_creating', custom_context)
    link_tasks(graph, '_a4c_floating_ip_Compute_created', 'create__a4c_floating_ip_Compute', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'stopping', 'PHP_stopping', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'deleting', 'Wordpress_deleting', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'stopped', 'Apache_stopped', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'deleted', 'Mysql_deleted', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'deleted', 'Apache_deleted', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'deleted', 'Wordpress_deleted', custom_context)
    custom_context.register_native_delegate_wf_step('InternalNetwork', 'InternalNetwork_uninstall')
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'deleting', 'Mysql_deleting', custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_uninstall')
    custom_context.register_native_delegate_wf_step('DataBase', 'DataBase_uninstall')
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'deleting', 'Apache_deleting', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'stopped', 'Wordpress_stopped', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'stopping', 'Apache_stopping', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'deleting', 'PHP_deleting', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_uninstall')
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'stopped', 'PHP_stopped', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'stopped', 'Mysql_stopped', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'stopping', 'Wordpress_stopping', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'deleted', 'PHP_deleted', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'stopping', 'Mysql_stopping', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'Wordpress_deleting', 'Wordpress_stopped', custom_context)
    link_tasks(graph, 'Apache_stopped', 'Apache_stopping', custom_context)
    link_tasks(graph, 'Mysql_deleted', 'Mysql_deleting', custom_context)
    link_tasks(graph, 'Apache_deleted', 'Apache_deleting', custom_context)
    link_tasks(graph, 'Wordpress_deleted', 'Wordpress_deleting', custom_context)
    link_tasks(graph, 'Mysql_deleting', 'Mysql_stopped', custom_context)
    link_tasks(graph, 'DataBase_uninstall', 'Mysql_deleted', custom_context)
    link_tasks(graph, 'Apache_deleting', 'Apache_stopped', custom_context)
    link_tasks(graph, 'Wordpress_stopped', 'Wordpress_stopping', custom_context)
    link_tasks(graph, 'Apache_stopping', 'Wordpress_deleted', custom_context)
    link_tasks(graph, 'PHP_deleting', 'PHP_stopped', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Apache_deleted', custom_context)
    link_tasks(graph, 'Server_uninstall', 'PHP_deleted', custom_context)
    link_tasks(graph, 'PHP_stopped', 'PHP_stopping', custom_context)
    link_tasks(graph, 'Mysql_stopped', 'Mysql_stopping', custom_context)
    link_tasks(graph, 'PHP_deleted', 'PHP_deleting', custom_context)
Exemplo n.º 42
0
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.register_native_delegate_wf_step('BlockStorage',
                                                    'BlockStorage_install')
    set_state_task(ctx, graph, 'FileSystem', 'starting', 'FileSystem_starting',
                   custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    set_state_task(ctx, graph, 'FileSystem', 'configuring',
                   'FileSystem_configuring', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configured',
                   'FileSystem_configured', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'created', 'FileSystem_created',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'creating', 'FileSystem_creating',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute',
                                                    'Compute_install')
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.start', 'start_FileSystem',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'started', 'FileSystem_started',
                   custom_context)
    custom_context.register_native_delegate_wf_step(
        'AnotherScaleCompute', 'AnotherScaleCompute_install')
    set_state_task(ctx, graph, 'FileSystem', 'initial', 'FileSystem_initial',
                   custom_context)
    custom_context.register_native_delegate_wf_step('BlockStorage2',
                                                    'BlockStorage2_install')
    custom_context.register_native_delegate_wf_step(
        'NonScaledCompute', 'NonScaledCompute_install')
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.create', 'create_FileSystem',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'FileSystem_starting', 'FileSystem_configured',
               custom_context)
    link_tasks(graph, 'FileSystem_configuring', 'FileSystem_created',
               custom_context)
    link_tasks(graph, 'FileSystem_configured', 'configure_FileSystem',
               custom_context)
    link_tasks(graph, 'FileSystem_created', 'create_FileSystem',
               custom_context)
    link_tasks(graph, 'FileSystem_creating', 'FileSystem_initial',
               custom_context)
    link_tasks(graph, 'configure_FileSystem', 'FileSystem_configuring',
               custom_context)
    link_tasks(graph, 'start_FileSystem', 'FileSystem_starting',
               custom_context)
    link_tasks(graph, 'FileSystem_started', 'start_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_initial', 'BlockStorage_install',
               custom_context)
    link_tasks(graph, 'FileSystem_initial', 'BlockStorage2_install',
               custom_context)
    link_tasks(graph, 'FileSystem_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'create_FileSystem', 'FileSystem_creating',
               custom_context)
def install_host_server(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started', custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.create', 'create_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured', custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created', custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.configure', 'configure_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating', custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created', custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start', 'start_Java', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.configure', 'configure_Java', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create', 'create_Java', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start', 'start_War', custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.configure', 'configure_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start', 'start_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring', custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_install', custom_context)
    link_tasks(graph, 'Java_initial', 'Server_install', custom_context)
    link_tasks(graph, 'War_created', 'War_creating', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
def _build_tasks(ctx, graph, custom_context):
    # just paste here the generated code
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'starting', 'PHP_starting', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'started', 'Wordpress_started', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configuring', 'Mysql_configuring', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.create', 'create_Mysql', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'initial', 'Apache_initial', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.configure', 'configure_Mysql', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'configured', 'Wordpress_configured', custom_context)
    custom_context.register_native_delegate_wf_step('Compute', 'Compute_install')
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'starting', 'Wordpress_starting', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'created', 'Mysql_created', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.start', 'start_PHP', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'starting', 'Apache_starting', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'configuring', 'PHP_configuring', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'created', 'PHP_created', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.start', 'start_Wordpress', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.configure', 'configure_Apache', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'creating', 'Mysql_creating', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.create', 'create_Apache', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'initial', 'Wordpress_initial', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'configured', 'Apache_configured', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'started', 'PHP_started', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'configuring', 'Wordpress_configuring', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'creating', 'PHP_creating', custom_context)
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.configure', 'configure_Wordpress', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'starting', 'Mysql_starting', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'configured', 'Mysql_configured', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'creating', 'Apache_creating', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.create', 'create_PHP', custom_context)
    operation_task(ctx, graph, 'Apache', 'cloudify.interfaces.lifecycle.start', 'start_Apache', custom_context)
    operation_task(ctx, graph, 'PHP', 'cloudify.interfaces.lifecycle.configure', 'configure_PHP', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'started', 'Mysql_started', custom_context)
    custom_context.register_native_delegate_wf_step('Network', 'Network_install')
    operation_task(ctx, graph, 'Wordpress', 'cloudify.interfaces.lifecycle.create', 'create_Wordpress', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'creating', 'Wordpress_creating', custom_context)
    custom_context.add_customized_wf_node('Mysql')
    set_state_task(ctx, graph, 'Mysql', 'initial', 'Mysql_initial', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'created', 'Apache_created', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'started', 'Apache_started', custom_context)
    custom_context.add_customized_wf_node('Wordpress')
    set_state_task(ctx, graph, 'Wordpress', 'created', 'Wordpress_created', custom_context)
    custom_context.add_customized_wf_node('Apache')
    set_state_task(ctx, graph, 'Apache', 'configuring', 'Apache_configuring', custom_context)
    operation_task(ctx, graph, 'Mysql', 'cloudify.interfaces.lifecycle.start', 'start_Mysql', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'initial', 'PHP_initial', custom_context)
    custom_context.add_customized_wf_node('PHP')
    set_state_task(ctx, graph, 'PHP', 'configured', 'PHP_configured', custom_context)
    custom_context.register_native_delegate_wf_step('Compute2', 'Compute2_install')
    custom_context.register_native_delegate_wf_step('DeletableConfigurableBlockStorage', 'DeletableConfigurableBlockStorage_install')
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'PHP_starting', 'PHP_configured', custom_context)
    link_tasks(graph, 'Wordpress_started', 'start_Wordpress', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'Mysql_configuring', 'Mysql_created', custom_context)
    link_tasks(graph, 'create_Mysql', 'Mysql_creating', custom_context)
    link_tasks(graph, 'Apache_initial', 'Compute2_install', custom_context)
    link_tasks(graph, 'configure_Mysql', 'Mysql_configuring', custom_context)
    link_tasks(graph, 'Wordpress_configured', 'configure_Wordpress', custom_context)
    link_tasks(graph, 'Wordpress_starting', 'Wordpress_configured', custom_context)
    link_tasks(graph, 'Mysql_created', 'create_Mysql', custom_context)
    link_tasks(graph, 'start_PHP', 'PHP_starting', custom_context)
    link_tasks(graph, 'Apache_starting', 'Apache_configured', custom_context)
    link_tasks(graph, 'PHP_configuring', 'PHP_created', custom_context)
    link_tasks(graph, 'PHP_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_created', 'create_PHP', custom_context)
    link_tasks(graph, 'start_Wordpress', 'Wordpress_starting', custom_context)
    link_tasks(graph, 'configure_Apache', 'Apache_configuring', custom_context)
    link_tasks(graph, 'Mysql_creating', 'Mysql_initial', custom_context)
    link_tasks(graph, 'create_Apache', 'Apache_creating', custom_context)
    link_tasks(graph, 'Wordpress_initial', 'Apache_started', custom_context)
    link_tasks(graph, 'Apache_configured', 'configure_Apache', custom_context)
    link_tasks(graph, 'PHP_started', 'start_PHP', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Mysql_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'PHP_started', custom_context)
    link_tasks(graph, 'Wordpress_configuring', 'Wordpress_created', custom_context)
    link_tasks(graph, 'PHP_creating', 'PHP_initial', custom_context)
    link_tasks(graph, 'configure_Wordpress', 'Wordpress_configuring', custom_context)
    link_tasks(graph, 'Mysql_starting', 'Mysql_configured', custom_context)
    link_tasks(graph, 'Mysql_configured', 'configure_Mysql', custom_context)
    link_tasks(graph, 'Apache_creating', 'Apache_initial', custom_context)
    link_tasks(graph, 'create_PHP', 'PHP_creating', custom_context)
    link_tasks(graph, 'start_Apache', 'Apache_starting', custom_context)
    link_tasks(graph, 'configure_PHP', 'PHP_configuring', custom_context)
    link_tasks(graph, 'Mysql_started', 'start_Mysql', custom_context)
    link_tasks(graph, 'create_Wordpress', 'Wordpress_creating', custom_context)
    link_tasks(graph, 'Wordpress_creating', 'Wordpress_initial', custom_context)
    link_tasks(graph, 'Mysql_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'Apache_created', 'create_Apache', custom_context)
    link_tasks(graph, 'Apache_started', 'start_Apache', custom_context)
    link_tasks(graph, 'Wordpress_created', 'create_Wordpress', custom_context)
    link_tasks(graph, 'Apache_configuring', 'Apache_created', custom_context)
    link_tasks(graph, 'start_Mysql', 'Mysql_starting', custom_context)
    link_tasks(graph, 'PHP_initial', 'Compute2_install', custom_context)
    link_tasks(graph, 'PHP_configured', 'configure_PHP', custom_context)
def _a4c_install(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'Java', 'started', 'Java_started', custom_context)
    set_state_task(ctx, graph, 'Java', 'creating', 'Java_creating', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.create', 'create_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'configured', 'War_configured', custom_context)
    set_state_task(ctx, graph, 'War', 'starting', 'War_starting', custom_context)
    set_state_task(ctx, graph, 'War', 'started', 'War_started', custom_context)
    set_state_task(ctx, graph, 'Java', 'created', 'Java_created', custom_context)
    set_state_task(ctx, graph, 'War', 'configuring', 'War_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'starting', 'Tomcat_starting', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.configure', 'configure_War', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'creating', 'Tomcat_creating', custom_context)
    set_state_task(ctx, graph, 'Java', 'starting', 'Java_starting', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'created', 'Tomcat_created', custom_context)
    set_state_task(ctx, graph, 'War', 'created', 'War_created', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.start', 'start_Java', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'initial', 'Tomcat_initial', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configuring', 'Tomcat_configuring', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'started', 'Tomcat_started', custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_install')
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.configure', 'configure_Java', custom_context)
    operation_task(ctx, graph, 'Java', 'cloudify.interfaces.lifecycle.create', 'create_Java', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_install')
    set_state_task(ctx, graph, 'War', 'creating', 'War_creating', custom_context)
    operation_task(ctx, graph, 'War', 'cloudify.interfaces.lifecycle.start', 'start_War', custom_context)
    set_state_task(ctx, graph, 'Java', 'configured', 'Java_configured', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'configured', 'Tomcat_configured', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.configure', 'configure_Tomcat', custom_context)
    set_state_task(ctx, graph, 'War', 'initial', 'War_initial', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.start', 'start_Tomcat', custom_context)
    set_state_task(ctx, graph, 'Java', 'configuring', 'Java_configuring', custom_context)
    set_state_task(ctx, graph, 'Java', 'initial', 'Java_initial', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'Java_started', 'start_Java', custom_context)
    link_tasks(graph, 'Java_creating', 'Java_initial', custom_context)
    link_tasks(graph, 'create_Tomcat', 'Tomcat_creating', custom_context)
    link_tasks(graph, 'War_configured', 'configure_War', custom_context)
    link_tasks(graph, 'War_starting', 'War_configured', custom_context)
    link_tasks(graph, 'War_started', 'start_War', custom_context)
    link_tasks(graph, 'Java_created', 'create_Java', custom_context)
    link_tasks(graph, 'War_configuring', 'War_created', custom_context)
    link_tasks(graph, 'Tomcat_starting', 'Tomcat_configured', custom_context)
    link_tasks(graph, 'configure_War', 'War_configuring', custom_context)
    link_tasks(graph, 'Tomcat_creating', 'Tomcat_initial', custom_context)
    link_tasks(graph, 'Java_starting', 'Java_configured', custom_context)
    link_tasks(graph, 'Tomcat_created', 'create_Tomcat', custom_context)
    link_tasks(graph, 'War_created', 'War_creating', custom_context)
    link_tasks(graph, 'start_Java', 'Java_starting', custom_context)
    link_tasks(graph, 'Tomcat_initial', 'Server_install', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Java_started', custom_context)
    link_tasks(graph, 'Tomcat_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Tomcat_started', 'start_Tomcat', custom_context)
    link_tasks(graph, 'configure_Java', 'Java_configuring', custom_context)
    link_tasks(graph, 'create_Java', 'Java_creating', custom_context)
    link_tasks(graph, 'War_creating', 'War_initial', custom_context)
    link_tasks(graph, 'start_War', 'War_starting', custom_context)
    link_tasks(graph, 'Java_configured', 'configure_Java', custom_context)
    link_tasks(graph, 'Tomcat_configured', 'configure_Tomcat', custom_context)
    link_tasks(graph, 'configure_Tomcat', 'Tomcat_configuring', custom_context)
    link_tasks(graph, 'War_initial', 'Tomcat_started', custom_context)
    link_tasks(graph, 'start_Tomcat', 'Tomcat_starting', custom_context)
    link_tasks(graph, 'Java_configuring', 'Tomcat_created', custom_context)
    link_tasks(graph, 'Java_configuring', 'Java_created', custom_context)
    link_tasks(graph, 'Java_initial', 'Server_install', custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Tomcat')
    custom_context.add_customized_wf_node('Java')
    custom_context.add_customized_wf_node('War')
    custom_context.add_customized_wf_node('Java')
    set_state_task(ctx, graph, 'War', 'deleting', 'War_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopping', 'Java_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleted', 'Tomcat_deleted', custom_context)
    set_state_task(ctx, graph, 'War', 'stopping', 'War_stopping', custom_context)
    operation_task(ctx, graph, 'Tomcat', 'cloudify.interfaces.lifecycle.stop', 'stop_Tomcat', custom_context)
    custom_context.register_native_delegate_wf_step('NetPub', 'NetPub_uninstall')
    set_state_task(ctx, graph, 'Java', 'deleting', 'Java_deleting', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopped', 'Tomcat_stopped', custom_context)
    custom_context.register_native_delegate_wf_step('Server', 'Server_uninstall')
    set_state_task(ctx, graph, 'War', 'stopped', 'War_stopped', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'stopping', 'Tomcat_stopping', custom_context)
    set_state_task(ctx, graph, 'Tomcat', 'deleting', 'Tomcat_deleting', custom_context)
    set_state_task(ctx, graph, 'Java', 'stopped', 'Java_stopped', custom_context)
    set_state_task(ctx, graph, 'War', 'deleted', 'War_deleted', custom_context)
    set_state_task(ctx, graph, 'Java', 'deleted', 'Java_deleted', custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'uninstall')
    link_tasks(graph, 'War_deleting', 'War_stopped', custom_context)
    link_tasks(graph, 'Tomcat_deleted', 'Tomcat_deleting', custom_context)
    link_tasks(graph, 'stop_Tomcat', 'Tomcat_stopping', custom_context)
    link_tasks(graph, 'Java_deleting', 'Java_stopped', custom_context)
    link_tasks(graph, 'Tomcat_stopped', 'stop_Tomcat', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Tomcat_deleted', custom_context)
    link_tasks(graph, 'Server_uninstall', 'Java_deleted', custom_context)
    link_tasks(graph, 'War_stopped', 'War_stopping', custom_context)
    link_tasks(graph, 'Tomcat_stopping', 'War_deleted', custom_context)
    link_tasks(graph, 'Tomcat_deleting', 'Tomcat_stopped', custom_context)
    link_tasks(graph, 'Java_stopped', 'Java_stopping', custom_context)
    link_tasks(graph, 'War_deleted', 'War_deleting', custom_context)
    link_tasks(graph, 'Java_deleted', 'Java_deleting', custom_context)
Exemplo n.º 47
0
def install_host_compute(ctx, graph, custom_context):
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    custom_context.add_customized_wf_node('FileSystem')
    set_state_task(ctx, graph, 'FileSystem', 'starting', 'FileSystem_starting',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configuring',
                   'FileSystem_configuring', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'configured',
                   'FileSystem_configured', custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'created', 'FileSystem_created',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'creating', 'FileSystem_creating',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.configure',
                   'configure_FileSystem', custom_context)
    custom_context.register_native_delegate_wf_step('Compute',
                                                    'Compute_install')
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.start', 'start_FileSystem',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'started', 'FileSystem_started',
                   custom_context)
    set_state_task(ctx, graph, 'FileSystem', 'initial', 'FileSystem_initial',
                   custom_context)
    operation_task(ctx, graph, 'FileSystem',
                   'cloudify.interfaces.lifecycle.create', 'create_FileSystem',
                   custom_context)
    generate_native_node_workflows(ctx, graph, custom_context, 'install')
    link_tasks(graph, 'start_FileSystem', 'FileSystem_starting',
               custom_context)
    link_tasks(graph, 'configure_FileSystem', 'FileSystem_configuring',
               custom_context)
    link_tasks(graph, 'FileSystem_starting', 'FileSystem_configured',
               custom_context)
    link_tasks(graph, 'FileSystem_configuring', 'FileSystem_created',
               custom_context)
    link_tasks(graph, 'create_FileSystem', 'FileSystem_creating',
               custom_context)
    link_tasks(graph, 'FileSystem_configured', 'configure_FileSystem',
               custom_context)
    link_tasks(graph, 'FileSystem_initial', 'Compute_install', custom_context)
    link_tasks(graph, 'FileSystem_started', 'start_FileSystem', custom_context)
    link_tasks(graph, 'FileSystem_creating', 'FileSystem_initial',
               custom_context)
    link_tasks(graph, 'FileSystem_created', 'create_FileSystem',
               custom_context)
def _a4c_uninstall(ctx, graph, custom_context):
    #  following code can be pasted in src/test/python/workflows/tasks.py for simulation
    operation_task(ctx, graph, "Compute", "cloudify.interfaces.lifecycle.delete", "delete_Compute", custom_context)
    set_state_task(ctx, graph, "Mysql", "deleted", "Mysql_deleted", custom_context)
    set_state_task(ctx, graph, "Compute", "stopped", "Compute_stopped", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "stopping", "BlockStorage_stopping", custom_context)
    set_state_task(
        ctx, graph, "_a4c_file_system_BlockStorage", "deleted", "_a4c_file_system_BlockStorage_deleted", custom_context
    )
    set_state_task(ctx, graph, "BlockStorage", "deleted", "BlockStorage_deleted", custom_context)
    operation_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "cloudify.interfaces.lifecycle.stop",
        "stop__a4c_file_system_BlockStorage",
        custom_context,
    )
    operation_task(
        ctx, graph, "BlockStorage", "cloudify.interfaces.lifecycle.delete", "delete_BlockStorage", custom_context
    )
    set_state_task(ctx, graph, "Mysql", "deleting", "Mysql_deleting", custom_context)
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "stopping",
        "_a4c_file_system_BlockStorage_stopping",
        custom_context,
    )
    operation_task(
        ctx, graph, "BlockStorage", "cloudify.interfaces.lifecycle.stop", "stop_BlockStorage", custom_context
    )
    set_state_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "deleting",
        "_a4c_file_system_BlockStorage_deleting",
        custom_context,
    )
    set_state_task(ctx, graph, "Compute", "deleted", "Compute_deleted", custom_context)
    set_state_task(ctx, graph, "Compute", "stopping", "Compute_stopping", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "deleting", "BlockStorage_deleting", custom_context)
    set_state_task(
        ctx, graph, "_a4c_file_system_BlockStorage", "stopped", "_a4c_file_system_BlockStorage_stopped", custom_context
    )
    operation_task(
        ctx,
        graph,
        "_a4c_file_system_BlockStorage",
        "cloudify.interfaces.lifecycle.delete",
        "delete__a4c_file_system_BlockStorage",
        custom_context,
    )
    set_state_task(ctx, graph, "Compute", "deleting", "Compute_deleting", custom_context)
    operation_task(ctx, graph, "Compute", "cloudify.interfaces.lifecycle.stop", "stop_Compute", custom_context)
    set_state_task(ctx, graph, "BlockStorage", "stopped", "BlockStorage_stopped", custom_context)
    set_state_task(ctx, graph, "Mysql", "stopped", "Mysql_stopped", custom_context)
    set_state_task(ctx, graph, "Mysql", "stopping", "Mysql_stopping", custom_context)
    link_tasks(graph, "delete_Compute", "Compute_deleting", custom_context)
    link_tasks(graph, "Mysql_deleted", "Mysql_deleting", custom_context)
    link_tasks(graph, "Compute_stopped", "stop_Compute", custom_context)
    link_tasks(graph, "BlockStorage_stopping", "Compute_deleted", custom_context)
    link_tasks(graph, "BlockStorage_stopping", "_a4c_file_system_BlockStorage_deleted", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_deleted", "delete__a4c_file_system_BlockStorage", custom_context)
    link_tasks(graph, "BlockStorage_deleted", "delete_BlockStorage", custom_context)
    link_tasks(graph, "stop__a4c_file_system_BlockStorage", "_a4c_file_system_BlockStorage_stopping", custom_context)
    link_tasks(graph, "delete_BlockStorage", "BlockStorage_deleting", custom_context)
    link_tasks(graph, "Mysql_deleting", "Mysql_stopped", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_stopping", "Mysql_deleted", custom_context)
    link_tasks(graph, "stop_BlockStorage", "BlockStorage_stopping", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_deleting", "_a4c_file_system_BlockStorage_stopped", custom_context)
    link_tasks(graph, "Compute_deleted", "delete_Compute", custom_context)
    link_tasks(graph, "Compute_stopping", "Mysql_deleted", custom_context)
    link_tasks(graph, "Compute_stopping", "_a4c_file_system_BlockStorage_deleted", custom_context)
    link_tasks(graph, "BlockStorage_deleting", "BlockStorage_stopped", custom_context)
    link_tasks(graph, "_a4c_file_system_BlockStorage_stopped", "stop__a4c_file_system_BlockStorage", custom_context)
    link_tasks(graph, "delete__a4c_file_system_BlockStorage", "_a4c_file_system_BlockStorage_deleting", custom_context)
    link_tasks(graph, "Compute_deleting", "Compute_stopped", custom_context)
    link_tasks(graph, "stop_Compute", "Compute_stopping", custom_context)
    link_tasks(graph, "BlockStorage_stopped", "stop_BlockStorage", custom_context)
    link_tasks(graph, "Mysql_stopped", "Mysql_stopping", custom_context)