def __do_setup(task_id, deployment_id, params):
    create_task(task_id)
    logger.info("Start to setup VNX backend for OpenStack %s" % deployment_id)
    result, status_code = process_controller(
        "/openstack/deployments/%s/storage/vnx" % deployment_id, "post", pay_load=json.dumps({"parameters": params})
    )
    if status_code > 200:
        update_task_status(task_id, "result", "failed")
    else:
        update_task_status(task_id, "result", "OK")
def __do_install_server(task_id, server_id, os_parameters):
    __clear_task(server_id)
    create_task(task_id)
    append_data_to_task(task_id, deployment_id=server_id)

    tag_id = __create_razor_tags(task_id, server_id)
    append_data_to_task(task_id, razor_tag_id=tag_id)

    policy_id = __create_razor_policies(task_id, tag_id, server_id, os_parameters)
    append_data_to_task(task_id, razor_policy_id=policy_id)  

    __create_metadata_to_node(server_id, os_parameters)
    __install_operation_system(task_id, server_id)
def __do_scaleup(task_id, deployment_id, mac_table):
    create_task(task_id)
    __append_nodes_to_node_assigner_deployment(task_id, deployment_id, mac_table)
    deployment_parameters = __get_openstack_process(task_id, deployment_id)
    append_data_to_task(task_id, deployment_id=deployment_id)

    #__apply_ips(task_id, deployment_id, mac_table)

    tag_id = __update_razor_tags(task_id, mac_table, deployment_id)
    append_data_to_task(task_id, razor_tag_id=tag_id)

    policy_id = __create_razor_policies(task_id, tag_id, CONF.get("NodeAssigner","endpoint"), deployment_id)
    append_data_to_task(task_id, razor_policy_id=policy_id)

    __create_metadata_to_nodes(deployment_id, mac_table, deployment_parameters)

    __install_operation_system(task_id, mac_table)

    __scaleup_openstack(task_id, deployment_id)