Sha256: 7a991953d266d3fe0bfa85cfb5a6af9b331b62221380dc660f19867a4b9bceb6

Contents?: true

Size: 549 Bytes

Versions: 13

Compression:

Stored size: 549 Bytes

Contents

module AnsibleTowerClient
  class WorkflowJobTemplate < JobTemplate
    def self.endpoint
      'workflow_job_templates'.freeze
    end

    def launch(options = {})
      launch_url = "#{url}launch/"
      response   = api.post(launch_url, options).body
      job        = JSON.parse(response)
      api.workflow_jobs.find(job['workflow_job'])
    end

    def workflow_nodes
      Collection.new(api).find_all_by_url(related['workflow_nodes'])
    end

    def override_raw_attributes
      { :organization => :organization_id }
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ansible_tower_client-0.21.3 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.21.2 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.21.1 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.21.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.20.2 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.20.1 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.20.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.19.1 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.19.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.18.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.17.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.16.0 lib/ansible_tower_client/base_models/workflow_job_template.rb
ansible_tower_client-0.15.0 lib/ansible_tower_client/base_models/workflow_job_template.rb