ansible_tower_client 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6943f87588512d9df4e5c0de28f5d4ce00f589c6
4
- data.tar.gz: 633d9521bdaf669184f7598c12c374b58da329ff
3
+ metadata.gz: 896d323fc2671c16502283d4b204add759b44be8
4
+ data.tar.gz: e60d7359bea8308e11e7ac0ec48a55a35fac3017
5
5
  SHA512:
6
- metadata.gz: 3025629f8bce8e4e3f58ced59d792ccd1bcb5544538e6d9dce87264e213223a96f2e912b7460424a505b58b2333c7bd476e115e6932aebe45ab1007efc7ee5d1
7
- data.tar.gz: 93482e4dc818fa62bdc6d230055d14d574f80b2770cc43af492702083de31d737ee4ca5af9beefc0c9b01be92fedb30287a49e52a66a7babaa63106fe67a5cad
6
+ metadata.gz: 00bd6ae711a991636077343e28cb0fa93a6cde69a92eac1f7e8f092d0f889baa16343c6780e28d137df867973f080b02c38757a55bfd9f18cba0889c6326a60c
7
+ data.tar.gz: f5446e95ab58a1def3e0128e6b96739cc4ac900ab63c1f50f6409b310f9aa0feac47a63e5ebde9bb03b93daeef0adacd68af070107d7bd0456b380a483b94364
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [Unreleased]
7
+
8
+ ## [0.9.0] - 2017-03-02
9
+ ### Added
10
+ - Expose Plays off of an Job [(#77)](https://github.com/ansible/ansible_tower_client_ruby/pull/77)
11
+ - Expose JobEvent [(#77)](https://github.com/ansible/ansible_tower_client_ruby/pull/77)
12
+ - Expose Organization [(#79)](https://github.com/ansible/ansible_tower_client_ruby/pull/79)
13
+
6
14
  ## [0.8.0] - 2017-02-23
7
15
  ### Added
8
16
  - Expose the raw hash of the object [(#74)](https://github.com/ansible/ansible_tower_client_ruby/pull/74)
@@ -12,12 +20,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
12
20
  - Inherit all errors from StandardError [(#76)](https://github.com/ansible/ansible_tower_client_ruby/pull/76)
13
21
  - Fix error logging after changing error response classes [(#72)](https://github.com/ansible/ansible_tower_client_ruby/pull/72)
14
22
 
15
-
16
23
  ## [0.7.0] - 2017-02-17
17
24
  ### Changed
18
25
  - Rescue Faraday errors and re-brand them as AnsibleTowerClient Errors [(#71)](https://github.com/ansible/ansible_tower_client_ruby/pull/71)
19
26
 
20
-
21
27
  ## [0.6.0] - 2017-02-02
22
28
  ### Added
23
29
  - Refactor `#endpoint` [(#64)](https://github.com/ansible/ansible_tower_client_ruby/pull/64)
@@ -29,3 +35,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
29
35
 
30
36
  ### Fixed
31
37
  - Adjusted project_spec to test on a Project [(#63)](https://github.com/ansible/ansible_tower_client_ruby/pull/63)
38
+
39
+ [Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.9.0...master
40
+ [0.9.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.8.0...v0.9.0
41
+ [0.8.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.7.0...v0.8.0
42
+ [0.7.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.6.0...v0.7.0
43
+ [0.6.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.5.0...v0.6.0
@@ -20,7 +20,10 @@ require "ansible_tower_client/base_models/inventory"
20
20
  require "ansible_tower_client/base_models/inventory_source"
21
21
  require "ansible_tower_client/base_models/inventory_update"
22
22
  require "ansible_tower_client/base_models/job"
23
+ require "ansible_tower_client/base_models/job_event"
24
+ require "ansible_tower_client/base_models/job_play"
23
25
  require "ansible_tower_client/base_models/job_template"
26
+ require "ansible_tower_client/base_models/organization"
24
27
  require "ansible_tower_client/base_models/project"
25
28
 
26
29
  require "ansible_tower_client/v2/job_template_v2"
@@ -59,10 +59,22 @@ module AnsibleTowerClient
59
59
  Collection.new(self, job_class)
60
60
  end
61
61
 
62
+ def job_events
63
+ Collection.new(self, job_event_class)
64
+ end
65
+
66
+ def job_plays
67
+ Collection.new(self, job_play_class)
68
+ end
69
+
62
70
  def job_templates
63
71
  Collection.new(self, job_template_class)
64
72
  end
65
73
 
74
+ def organizations
75
+ Collection.new(self, organization_class)
76
+ end
77
+
66
78
  def projects
67
79
  Collection.new(self, project_class)
68
80
  end
@@ -128,6 +140,14 @@ module AnsibleTowerClient
128
140
  @job_class ||= AnsibleTowerClient::Job
129
141
  end
130
142
 
143
+ def job_event_class
144
+ @job_event_class ||= AnsibleTowerClient::JobEvent
145
+ end
146
+
147
+ def job_play_class
148
+ @job_play_class ||= AnsibleTowerClient::JobPlay
149
+ end
150
+
131
151
  def job_template_class
132
152
  @job_template_class ||= begin
133
153
  if Gem::Version.new(version).between?(Gem::Version.new(2), Gem::Version.new(3))
@@ -138,6 +158,10 @@ module AnsibleTowerClient
138
158
  end
139
159
  end
140
160
 
161
+ def organization_class
162
+ @organization_class ||= AnsibleTowerClient::Organization
163
+ end
164
+
141
165
  def project_class
142
166
  @project_class ||= AnsibleTowerClient::Project
143
167
  end
@@ -1,7 +1,7 @@
1
1
  module AnsibleTowerClient
2
2
  class Host < BaseModel
3
3
  def groups
4
- Collection.new(api).find_all_by_url(related["groups"])
4
+ Collection.new(api, api.group_class).find_all_by_url(related["groups"])
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module AnsibleTowerClient
2
2
  class Inventory < BaseModel
3
3
  def inventory_sources
4
- Collection.new(api).find_all_by_url(related['inventory_sources'])
4
+ Collection.new(api, api.inventory_source_class).find_all_by_url(related['inventory_sources'])
5
5
  end
6
6
 
7
7
  def update_all_inventory_sources
@@ -4,6 +4,10 @@ module AnsibleTowerClient
4
4
  extra_vars.empty? ? {} : hashify(:extra_vars)
5
5
  end
6
6
 
7
+ def job_plays
8
+ Collection.new(api, api.job_play_class).find_all_by_url(related["job_plays"])
9
+ end
10
+
7
11
  def stdout
8
12
  out_url = related['stdout']
9
13
  return unless out_url
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class JobEvent < BaseModel
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class JobPlay < BaseModel
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module AnsibleTowerClient
2
+ class Organization < BaseModel
3
+ end
4
+ end
@@ -66,7 +66,7 @@ module AnsibleTowerClient
66
66
  end
67
67
 
68
68
  def build_object(result)
69
- class_from_type(result["type"]).new(api, result)
69
+ (klass || class_from_type(result['type'])).new(api, result)
70
70
  end
71
71
  end
72
72
  end
@@ -1,3 +1,3 @@
1
1
  module AnsibleTowerClient
2
- VERSION = "0.8.0".freeze
2
+ VERSION = "0.9.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.8.0
4
+ version: 0.9.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-02-23 00:00:00.000000000 Z
12
+ date: 2017-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -156,7 +156,10 @@ files:
156
156
  - lib/ansible_tower_client/base_models/inventory_source.rb
157
157
  - lib/ansible_tower_client/base_models/inventory_update.rb
158
158
  - lib/ansible_tower_client/base_models/job.rb
159
+ - lib/ansible_tower_client/base_models/job_event.rb
160
+ - lib/ansible_tower_client/base_models/job_play.rb
159
161
  - lib/ansible_tower_client/base_models/job_template.rb
162
+ - lib/ansible_tower_client/base_models/organization.rb
160
163
  - lib/ansible_tower_client/base_models/project.rb
161
164
  - lib/ansible_tower_client/collection.rb
162
165
  - lib/ansible_tower_client/connection.rb
@@ -187,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
190
  version: '0'
188
191
  requirements: []
189
192
  rubyforge_project:
190
- rubygems_version: 2.5.1
193
+ rubygems_version: 2.5.2
191
194
  signing_key:
192
195
  specification_version: 4
193
196
  summary: Ansible Tower REST API wrapper gem