foreman_salt 8.0.1 → 8.0.2

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
  SHA1:
3
- metadata.gz: 7affbd070e0fa9e5bbe3ad20fb5d6b37414a561d
4
- data.tar.gz: 05526bb14642019dc1fb4be52425ce304533f1cb
3
+ metadata.gz: b2e704b1c9a00f0dbe9fd037dda98eee1125226a
4
+ data.tar.gz: 2dbf54a0bb81a8047f2b127bbb181a1bca864df8
5
5
  SHA512:
6
- metadata.gz: 1a4faeebaca7c47a018ff6ea58ae35fe23ef91eea86813aa24e0efb561a62224c35a7402efff4d721b3c748981601bed5a3f07d1638c3183ba33e880befece4e
7
- data.tar.gz: 546d539de6da702b378b4d9d6deaa63c75d52b1ea3856af6b83db1bfdcf087ee1ba82ef8538141a0258daed24565ed0c2b633b6bd6084d2f108d09f9c850dae7
6
+ metadata.gz: 043727e462c0e56b777a8f0dfe11d0411cebe0a68dc5fc7df2341b7186f7f146c22fa2d7f66ccbe5b5923fd724115d527387eebc7dbf7101110e4da403d3d423
7
+ data.tar.gz: afb5cb54391a270c2246bd717097ae2f92f2fbf17fec76076c73a9293b01e4d5704d91477317496376187257f8ad05b0b5349b76d993901c48b8fc9b9f1e37eb
@@ -80,8 +80,14 @@ module ForemanSalt
80
80
  private
81
81
 
82
82
  def os_hash
83
- (_, major, minor) = /(\d+)\.?(\d+)?\.?(\d+)?/.match(facts[:osrelease]).to_a
84
- { :name => facts[:os], :major => major, :minor => minor }
83
+ name = facts[:os]
84
+ (_, major, minor, sub) = /(\d+)\.?(\d+)?\.?(\d+)?/.match(facts[:osrelease]).to_a
85
+ if name == 'CentOS'
86
+ if sub
87
+ minor += '.' + sub
88
+ end
89
+ end
90
+ { :name => name, :major => major, :minor => minor }
85
91
  end
86
92
 
87
93
  def macs
@@ -61,9 +61,10 @@ module ForemanSalt
61
61
  @raw.each do |resource, result|
62
62
  level = if result['changes'].blank? && result['result']
63
63
  :info
64
- elsif !result['result']
64
+ elsif result['result'] == false
65
65
  :err
66
66
  else
67
+ # nil mean "unchanged" when running highstate with test=True
67
68
  :notice
68
69
  end
69
70
 
@@ -88,6 +89,7 @@ module ForemanSalt
88
89
  changed = 0
89
90
  restarted = 0
90
91
  restarted_failed = 0
92
+ pending = 0
91
93
 
92
94
  time = {}
93
95
 
@@ -101,6 +103,8 @@ module ForemanSalt
101
103
  elsif !result['changes'].blank?
102
104
  changed += 1
103
105
  end
106
+ elsif result['result'].nil?
107
+ pending += 1
104
108
  elsif !result['result']
105
109
  if resource.match(/^service_/) && result['comment'].include?('restarted')
106
110
  restarted_failed += 1
@@ -126,7 +130,7 @@ module ForemanSalt
126
130
  changes = { :total => changed + restarted }
127
131
 
128
132
  resources = { 'total' => @raw.size, 'applied' => changed, 'restarted' => restarted, 'failed' => failed,
129
- 'failed_restarts' => restarted_failed, 'skipped' => 0, 'scheduled' => 0 }
133
+ 'failed_restarts' => restarted_failed, 'skipped' => 0, 'scheduled' => 0, 'pending' => pending }
130
134
 
131
135
  { :events => events, :resources => resources, :changes => changes, :time => time }
132
136
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanSalt
2
- VERSION = '8.0.1'
2
+ VERSION = '8.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.1
4
+ version: 8.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Benjamin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-11 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.8.0
33
+ version: '0.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.8.0
40
+ version: '0.8'
41
41
  description: Foreman Plug-in for Salt
42
42
  email:
43
43
  - stephen@redhat.com
@@ -189,21 +189,21 @@ specification_version: 4
189
189
  summary: Foreman Plug-in for Salt
190
190
  test_files:
191
191
  - test/factories/foreman_salt_factories.rb
192
- - test/functional/api/v2/salt_autosign_controller_test.rb
192
+ - test/unit/host_extensions_test.rb
193
+ - test/unit/salt_keys_test.rb
194
+ - test/unit/grains_importer_test.rb
195
+ - test/unit/hostgroup_extensions_test.rb
196
+ - test/unit/report_importer_test.rb
197
+ - test/unit/salt_modules_test.rb
198
+ - test/unit/highstate.json
199
+ - test/unit/grains_centos.json
200
+ - test/functional/minions_controller_test.rb
193
201
  - test/functional/api/v2/salt_environments_controller_test.rb
202
+ - test/functional/api/v2/salt_autosign_controller_test.rb
194
203
  - test/functional/api/v2/salt_keys_controller_test.rb
195
204
  - test/functional/api/v2/salt_states_controller_test.rb
196
- - test/functional/minions_controller_test.rb
197
205
  - test/integration/salt_autosign_test.rb
198
- - test/integration/salt_environment_test.rb
199
206
  - test/integration/salt_keys_test.rb
207
+ - test/integration/salt_environment_test.rb
200
208
  - test/integration/salt_module_test.rb
201
- - test/unit/grains_centos.json
202
- - test/unit/highstate.json
203
- - test/unit/salt_keys_test.rb
204
- - test/unit/salt_modules_test.rb
205
- - test/unit/hostgroup_extensions_test.rb
206
- - test/unit/report_importer_test.rb
207
- - test/unit/grains_importer_test.rb
208
- - test/unit/host_extensions_test.rb
209
209
  - test/test_plugin_helper.rb