from orchestration.nap_api import create_from_table ll = [{'service_name':'aa', 'type':'apache', 'command':'hello', 'ports':[123,45]}, {'service_name':'aa', 'type':'mpi', 'slaves':4} ] print create_from_table.create_project_from_table("mongo", 'mongo', 'table', ll)
def create_mpi(username, password, mpi_name, slaves): table = [] args = {'type':'mpi', 'slaves':slaves} table.append(args) print app_info.destroy_project(username, password, mpi_name) print create_from_table.create_project_from_table(username, password, mpi_name, table)