Class: AnsibleTowerClient::WorkflowJobTemplate
- Inherits:
-
JobTemplate
- Object
- HashModel
- BaseModel
- JobTemplate
- AnsibleTowerClient::WorkflowJobTemplate
- Defined in:
- lib/ansible_tower_client/base_models/workflow_job_template.rb
Instance Attribute Summary
Attributes inherited from BaseModel
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from JobTemplate
#extra_vars_hash, #survey_spec, #survey_spec_hash
Methods inherited from BaseModel
base_class, create, create!, #destroy, #destroy!, #hashify, #initialize, #save, #save!, #update_attributes, #update_attributes!
Methods inherited from HashModel
#==, #[], #initialize, #inspect, #to_h, #to_json
Constructor Details
This class inherits a constructor from AnsibleTowerClient::BaseModel
Class Method Details
.endpoint ⇒ Object
3 4 5 |
# File 'lib/ansible_tower_client/base_models/workflow_job_template.rb', line 3 def self.endpoint 'workflow_job_templates'.freeze end |
Instance Method Details
#launch(options = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/ansible_tower_client/base_models/workflow_job_template.rb', line 7 def launch( = {}) launch_url = "#{url}launch/" response = api.post(launch_url, ).body job = JSON.parse(response) api.workflow_jobs.find(job['workflow_job']) end |
#override_raw_attributes ⇒ Object
18 19 20 |
# File 'lib/ansible_tower_client/base_models/workflow_job_template.rb', line 18 def override_raw_attributes { :organization => :organization_id } end |
#workflow_nodes ⇒ Object
14 15 16 |
# File 'lib/ansible_tower_client/base_models/workflow_job_template.rb', line 14 def workflow_nodes Collection.new(api).find_all_by_url(['workflow_nodes']) end |