class Conductor::Metadata

Public Class Methods

create_or_update_workflows(workflow_list) click to toggle source

PUT /metadata/workflow Create or update workflow definition

# File lib/nf-conductor/http/metadata.rb, line 79
def create_or_update_workflows(workflow_list)
  response = Connection.new.put(
    "/metadata/taskdefs",
    { body: (workflow_list.is_a?(Array) ? workflow_list : [workflow_list]).to_json }
  )
  Metadata.build(response)
end
create_tasks(task_list) click to toggle source

POST /metadata/taskdefs Create new task definition(s) 204 success

# File lib/nf-conductor/http/metadata.rb, line 25
def create_tasks(task_list)
  response = Connection.new.post(
    "/metadata/taskdefs",
    { body: (task_list.is_a?(Array) ? task_list : [task_list]).to_json }
  )
  Metadata.build(response)
end
create_workflow(workflow) click to toggle source

POST /metadata/workflow Create a new workflow definition

# File lib/nf-conductor/http/metadata.rb, line 69
def create_workflow(workflow)
  response = Connection.new.post(
    "/metadata/workflow",
    { body: workflow.to_json }
  )
  Metadata.build(response)
end
delete_task(task_type) click to toggle source

DELETE /metadata/taskdefs/{taskType} Remove a task definition

# File lib/nf-conductor/http/metadata.rb, line 45
def delete_task(task_type)
  response = Connection.new.delete("/metadata/taskdefs/#{task_type}")
  Metadata.build(response)
end
get_all_tasks() click to toggle source

GET /metadata/taskdefs Gets all task definition

# File lib/nf-conductor/http/metadata.rb, line 10
def get_all_tasks
  response = Connection.new.get("/metadata/taskdefs")
  Metadata.build(response)
end
get_all_workflows() click to toggle source

GET /metadata/workflow Retrieves all workflow definition along with blueprint

# File lib/nf-conductor/http/metadata.rb, line 52
def get_all_workflows
  response = Connection.new.get("/metadata/workflow")
  Metadata.build(response)
end
get_task(task_type) click to toggle source

GET /metadata/taskdefs/{taskType} Gets the task definition

# File lib/nf-conductor/http/metadata.rb, line 17
def get_task(task_type)
  response = Connection.new.get("/metadata/taskdefs/#{task_type}")
  Metadata.build(response)
end
get_workflow(workflow_name, version: nil) click to toggle source

GET /metadata/workflow/{name}?version= Retrieves workflow definition along with blueprint

# File lib/nf-conductor/http/metadata.rb, line 59
def get_workflow(workflow_name, version: nil)
  query_string = "/metadata/workflow/#{workflow_name}?"
  query_string += "version=#{version}" if version

  response = Connection.new.get(query_string)
  Metadata.build(response)
end
new(response) click to toggle source
Calls superclass method
# File lib/nf-conductor/http/metadata.rb, line 3
def initialize(response)
  super(response)
end
update_task(task_definition) click to toggle source

PUT /metadata/taskdefs Update an existing task

# File lib/nf-conductor/http/metadata.rb, line 35
def update_task(task_definition)
  response = Connection.new.put(
    "/metadata/taskdefs",
    { body: task_definition.to_json }
  )
  Metadata.build(response)
end