ansible_tower_client 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9705050a1615b4e5d5f20b66ae5b13be70ee899bae43dd55a5940a526b1cad18
4
- data.tar.gz: d69d45876bc30ddf8805ecdc7b5a6f5520b13fdb6d418be444c2e2803856d8ba
3
+ metadata.gz: 8a34cad5e35410c160d20d10252d77061c4820686405051be201fe08877ddca8
4
+ data.tar.gz: e1a0323a69026441505bbc75602ef1b3786f314510417958498d33abfa524be8
5
5
  SHA512:
6
- metadata.gz: 635c25af7825cfe34fd92e8aac4a186c65fbc8ea870d79370dc55140904b43c9295a11ccb71f0b9baa9446b37226adcce4645f3fb07c6d9c157b8a4879be018b
7
- data.tar.gz: 232730a09f72a97e6f9234a85abcef3b078e56b0e181c4a9d5a308f93a16bea45a048c8f08885cf31400823b57afd7f53ebc014ec439bcd07d63c7f10334d70a
6
+ metadata.gz: 950a9d840eb13c84df3e94ef08a5749172a549bbbc0de50cb9325c7c3aec216a221328bf02fd645f731432f64abd41f45c734085410e7f131c392c6eae038b94
7
+ data.tar.gz: 174f2b89477d26d9c5141c8668129c8ef13223ce38f513ad9a0ec70b13026f3e78bbbe41171f5b27b3fb92e85a259c3b6be85f70745b5415e7a33a20f3fbdd38
@@ -5,6 +5,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.15.0] - 2018-06-05
9
+ ### Added
10
+ - Added AnsibleTowerClient::WorkflowJob [(#104)](https://github.com/ansible/ansible_tower_client_ruby/pull/104)
11
+ - Added AnsibleTowerClient::WorkflowJobTemplate [(#104)](https://github.com/ansible/ansible_tower_client_ruby/pull/104)
12
+ - Added AnsibleTowerClient::WorkflowJobTemplateNode [(#104)](https://github.com/ansible/ansible_tower_client_ruby/pull/104)
13
+
8
14
  ## [0.14.0] - 2018-04-26
9
15
  ### Added
10
16
  - Add Project#last_update [(#102)](https://github.com/ansible/ansible_tower_client_ruby/pull/102)
@@ -74,7 +80,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
74
80
  ### Fixed
75
81
  - Adjusted project_spec to test on a Project [(#63)](https://github.com/ansible/ansible_tower_client_ruby/pull/63)
76
82
 
77
- [Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.14.0...master
83
+ [Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.15.0...master
84
+ [0.15.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.14.0...v0.15.0
78
85
  [0.14.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.13.0...v0.14.0
79
86
  [0.13.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.2...v0.13.0
80
87
  [0.12.2]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.1...v0.12.2
@@ -28,6 +28,9 @@ require "ansible_tower_client/base_models/project_update"
28
28
  require "ansible_tower_client/base_models/schedule"
29
29
  require "ansible_tower_client/base_models/system_job"
30
30
  require "ansible_tower_client/base_models/system_job_template"
31
+ require "ansible_tower_client/base_models/workflow_job"
32
+ require "ansible_tower_client/base_models/workflow_job_template"
33
+ require "ansible_tower_client/base_models/workflow_job_template_node"
31
34
 
32
35
  require "ansible_tower_client/v2/job_template_v2"
33
36
 
@@ -95,6 +95,18 @@ module AnsibleTowerClient
95
95
  Collection.new(self, system_job_template_class)
96
96
  end
97
97
 
98
+ def workflow_jobs
99
+ Collection.new(self, workflow_job_class)
100
+ end
101
+
102
+ def workflow_job_templates
103
+ Collection.new(self, workflow_job_template_class)
104
+ end
105
+
106
+ def workflow_job_template_nodes
107
+ Collection.new(self, workflow_job_template_node_class)
108
+ end
109
+
98
110
  def method_missing(method_name, *args, &block)
99
111
  require 'faraday'
100
112
  if instance.respond_to?(method_name)
@@ -199,6 +211,18 @@ module AnsibleTowerClient
199
211
  @system_job_template_class ||= AnsibleTowerClient::SystemJobTemplate
200
212
  end
201
213
 
214
+ def workflow_job_class
215
+ @workflow_job_class ||= AnsibleTowerClient::WorkflowJob
216
+ end
217
+
218
+ def workflow_job_template_class
219
+ @workflow_job_template_class ||= AnsibleTowerClient::WorkflowJobTemplate
220
+ end
221
+
222
+ def workflow_job_template_node_class
223
+ @workflow_job_template_node_class ||= AnsibleTowerClient::WorkflowJobTemplateNode
224
+ end
225
+
202
226
  private
203
227
 
204
228
  def build_path_to_resource(original)
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class WorkflowJob < BaseModel
3
+ end
4
+ end
@@ -0,0 +1,22 @@
1
+ module AnsibleTowerClient
2
+ class WorkflowJobTemplate < JobTemplate
3
+ def self.endpoint
4
+ 'workflow_job_templates'.freeze
5
+ end
6
+
7
+ def launch(options = {})
8
+ launch_url = "#{url}launch/"
9
+ response = api.post(launch_url, options).body
10
+ job = JSON.parse(response)
11
+ api.workflow_jobs.find(job['workflow_job'])
12
+ end
13
+
14
+ def workflow_nodes
15
+ Collection.new(api).find_all_by_url(related['workflow_nodes'])
16
+ end
17
+
18
+ def override_raw_attributes
19
+ { :organization => :organization_id }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class WorkflowJobTemplateNode < BaseModel
3
+ end
4
+ end
@@ -1,3 +1,3 @@
1
1
  module AnsibleTowerClient
2
- VERSION = "0.14.0".freeze
2
+ VERSION = "0.15.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible_tower_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dunne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-04-26 00:00:00.000000000 Z
12
+ date: 2018-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -164,6 +164,9 @@ files:
164
164
  - lib/ansible_tower_client/base_models/schedule.rb
165
165
  - lib/ansible_tower_client/base_models/system_job.rb
166
166
  - lib/ansible_tower_client/base_models/system_job_template.rb
167
+ - lib/ansible_tower_client/base_models/workflow_job.rb
168
+ - lib/ansible_tower_client/base_models/workflow_job_template.rb
169
+ - lib/ansible_tower_client/base_models/workflow_job_template_node.rb
167
170
  - lib/ansible_tower_client/collection.rb
168
171
  - lib/ansible_tower_client/connection.rb
169
172
  - lib/ansible_tower_client/exception.rb
@@ -193,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
196
  version: '0'
194
197
  requirements: []
195
198
  rubyforge_project:
196
- rubygems_version: 2.7.6
199
+ rubygems_version: 2.7.7
197
200
  signing_key:
198
201
  specification_version: 4
199
202
  summary: Ansible Tower REST API wrapper gem