ansible_tower_client 0.12.2 → 0.13.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
- SHA1:
3
- metadata.gz: 7b60ec7c40a5ee45a48ff8ee5d27695d9e470169
4
- data.tar.gz: d7d90bf6956a581e0e646d902f543972d8827308
2
+ SHA256:
3
+ metadata.gz: acc46f0e0cce6788bc9f2e361ded7857c9a8bb0649cfed2f0e4b1cde2fb14ffc
4
+ data.tar.gz: ee33fd26e8c1ed23db73c3a0dc21ac1044a0c78c02b5a6e6b229a83070b0cedd
5
5
  SHA512:
6
- metadata.gz: 2856f389c86256e3480beff31f411f4bc74a54e0699cc80424770b935bd77e3b8cbc48b7a9c073b09fee1b058cf9967e2069fb3f3e68a1b578d5f077cd43c871
7
- data.tar.gz: 19d45289db416b18c2a311dfd8c8e386facd4af6beeb2ae89cf260a61bb261ef4c13e6ed010cfe792abb26b1799e2cf6d4a9e84e6ac90a41efc46b4f2d00ee3e
6
+ metadata.gz: b84b2391df974c1f69f911fb0873eafcb12cccccccbb997d1ec54c96cc2717ea139f7348c84280852d248e26c3009597aa690b0796410d37270df52f1207a253
7
+ data.tar.gz: 5a8a81e4e8992d4b64071219810b28ba4cf9547d3f73ba10de716473313e883ca9ee87a3f68d6a7ef9f4cd4eb1c014e2deca7ac84d215b8ca903a63281a93aae
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.13.0] - 2018-04-05
9
+ ### Added
10
+ - Add SystemJobTemplate and Schedules [(#99)](https://github.com/ansible/ansible_tower_client_ruby/pull/99)
11
+ - Add SystemJob and SystemJobTemplate#launch [(#100)](https://github.com/ansible/ansible_tower_client_ruby/pull/100)
12
+
8
13
  ## [0.12.2] - 2017-05-08
9
14
  ### Fixed
10
15
  - Check before update attribute of basemodel [(#93)](https://github.com/ansible/ansible_tower_client_ruby/pull/93)
@@ -62,7 +67,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
62
67
  ### Fixed
63
68
  - Adjusted project_spec to test on a Project [(#63)](https://github.com/ansible/ansible_tower_client_ruby/pull/63)
64
69
 
65
- [Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.2...master
70
+ [Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.13.0...master
71
+ [0.13.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.2...v0.13.0
66
72
  [0.12.2]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.1...v0.12.2
67
73
  [0.12.1]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.12.0...v0.12.1
68
74
  [0.12.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.11.0...v0.12.0
@@ -25,6 +25,9 @@ require "ansible_tower_client/base_models/job_template"
25
25
  require "ansible_tower_client/base_models/organization"
26
26
  require "ansible_tower_client/base_models/project"
27
27
  require "ansible_tower_client/base_models/project_update"
28
+ require "ansible_tower_client/base_models/schedule"
29
+ require "ansible_tower_client/base_models/system_job"
30
+ require "ansible_tower_client/base_models/system_job_template"
28
31
 
29
32
  require "ansible_tower_client/v2/job_template_v2"
30
33
 
@@ -83,6 +83,18 @@ module AnsibleTowerClient
83
83
  Collection.new(self, project_update_class)
84
84
  end
85
85
 
86
+ def schedules
87
+ Collection.new(self, schedule_class)
88
+ end
89
+
90
+ def system_jobs
91
+ Collection.new(self, system_job_class)
92
+ end
93
+
94
+ def system_job_templates
95
+ Collection.new(self, system_job_template_class)
96
+ end
97
+
86
98
  def method_missing(method_name, *args, &block)
87
99
  if instance.respond_to?(method_name)
88
100
  path = build_path_to_resource(args.shift)
@@ -174,6 +186,18 @@ module AnsibleTowerClient
174
186
  @project_update_class ||= AnsibleTowerClient::ProjectUpdate
175
187
  end
176
188
 
189
+ def schedule_class
190
+ @schedule_class ||= AnsibleTowerClient::Schedule
191
+ end
192
+
193
+ def system_job_class
194
+ @system_job_class ||= AnsibleTowerClient::SystemJob
195
+ end
196
+
197
+ def system_job_template_class
198
+ @system_job_template_class ||= AnsibleTowerClient::SystemJobTemplate
199
+ end
200
+
177
201
  private
178
202
 
179
203
  def build_path_to_resource(original)
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class Schedule < BaseModel
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class SystemJob < BaseModel
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ module AnsibleTowerClient
2
+ class SystemJobTemplate < BaseModel
3
+ def launch(extra_vars)
4
+ response = JSON.parse(api.post("#{url}launch/", "extra_vars" => extra_vars).body)
5
+ api.system_jobs.find(response["system_job"])
6
+ end
7
+
8
+ def schedules
9
+ Collection.new(api).find_all_by_url(related["schedules"])
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module AnsibleTowerClient
2
- VERSION = "0.12.2".freeze
2
+ VERSION = "0.13.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.12.2
4
+ version: 0.13.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: 2017-05-08 00:00:00.000000000 Z
12
+ date: 2018-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -161,6 +161,9 @@ files:
161
161
  - lib/ansible_tower_client/base_models/organization.rb
162
162
  - lib/ansible_tower_client/base_models/project.rb
163
163
  - lib/ansible_tower_client/base_models/project_update.rb
164
+ - lib/ansible_tower_client/base_models/schedule.rb
165
+ - lib/ansible_tower_client/base_models/system_job.rb
166
+ - lib/ansible_tower_client/base_models/system_job_template.rb
164
167
  - lib/ansible_tower_client/collection.rb
165
168
  - lib/ansible_tower_client/connection.rb
166
169
  - lib/ansible_tower_client/exception.rb
@@ -190,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
193
  version: '0'
191
194
  requirements: []
192
195
  rubyforge_project:
193
- rubygems_version: 2.5.2
196
+ rubygems_version: 2.7.6
194
197
  signing_key:
195
198
  specification_version: 4
196
199
  summary: Ansible Tower REST API wrapper gem