topological_inventory-providers-common 1.0.8 → 1.0.9

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: 22571a5f48d3d126fc3fddd2992643b2dddccc6c2bb20b5eb8263901bf6ca148
4
- data.tar.gz: 437ce9d295f10ab3e10b2b32ea64c89efecd66ff2538c6152f2d67d38f4a9f39
3
+ metadata.gz: 880ff945277cf130a2617a20278ff29298e8a7644b92e254e7c4dd32002a58bc
4
+ data.tar.gz: b3e65e3652f156fc0de8e2f6d97c1a9eac095d015035ae08d787c86f1da3b597
5
5
  SHA512:
6
- metadata.gz: 4abc37ec7c40eef6bdd0e4555404607228edf396b3c9482b7f735419f1359e68bd13139515d9dc2f0a359e28f23e51f38e39877405c5f3e66f7e414f559fce17
7
- data.tar.gz: e2652340645a001205c36f4cfad7fe75f0a0dd18301f27cce72fcf856fb48c4be6b2863c00aa7ed7ae40141f1153096ed1bebae6a478e8854f13a52e8524788f
6
+ metadata.gz: 7ad7a27bd9ae06e1161917aa5fa55f20f87ed9a69d9e1936968e21c7c4bab634924317e544afeaaa8530de2998bd156f912435eef9c3151758e82f8f3f0f9c08
7
+ data.tar.gz: 37e3bdc21b29c71927a0c797a6cc56267a8be9ab1031a702ed6d6fa8f38c76c38ddb13baf32f1eeaccf3306328daed21edbcedeb0a9f1669c0df3ee9a685c029
@@ -4,8 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [1.0.8] - 2020-08-10
7
+ ## [1.0.9]
8
8
  Added refresh-type to save and sweep inventory #45
9
+
10
+ ## [1.0.8] - 2020-08-12
9
11
  Add => to error messages that rubocop missed #44
10
12
 
11
13
  ## [1.0.7] - 2020-07-27
@@ -47,7 +49,8 @@ manageiq-loggers to >= 0.4.2 #20
47
49
  ## [1.0.0] - 2020-03-19
48
50
  ### Initial release to rubygems.org
49
51
 
50
- [Unreleased]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.8...HEAD
52
+ [Unreleased]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.9...HEAD
53
+ [1.0.9]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.8...v1.0.9
51
54
  [1.0.8]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.7...v1.0.8
52
55
  [1.0.7]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.6...v1.0.7
53
56
  [1.0.6]: https://github.com/RedHatInsights/topological_inventory-providers-common/compare/v1.0.5...v1.0.6
@@ -104,7 +104,8 @@ module TopologicalInventory
104
104
  refresh_state_uuid = nil,
105
105
  refresh_state_part_uuid = nil,
106
106
  refresh_state_part_collected_at = nil,
107
- refresh_state_part_sent_at = Time.now.utc)
107
+ refresh_state_part_sent_at = Time.now.utc,
108
+ refresh_type = default_refresh_type)
108
109
  return 0 if collections.empty?
109
110
 
110
111
  SaveInventory::Saver.new(:client => ingress_api_client, :logger => logger).save(
@@ -116,7 +117,8 @@ module TopologicalInventory
116
117
  :refresh_state_uuid => refresh_state_uuid,
117
118
  :refresh_state_part_uuid => refresh_state_part_uuid,
118
119
  :refresh_state_part_collected_at => refresh_state_part_collected_at,
119
- :refresh_state_part_sent_at => refresh_state_part_sent_at
120
+ :refresh_state_part_sent_at => refresh_state_part_sent_at,
121
+ :refresh_type => refresh_type
120
122
  )
121
123
  )
122
124
  rescue => e
@@ -134,7 +136,8 @@ module TopologicalInventory
134
136
  total_parts,
135
137
  sweep_scope,
136
138
  refresh_state_started_at = nil,
137
- refresh_state_sent_at = Time.now.utc)
139
+ refresh_state_sent_at = Time.now.utc,
140
+ refresh_type = default_refresh_type)
138
141
  return if !total_parts || sweep_scope.empty?
139
142
 
140
143
  SaveInventory::Saver.new(:client => ingress_api_client, :logger => logger).save(
@@ -147,7 +150,8 @@ module TopologicalInventory
147
150
  :total_parts => total_parts,
148
151
  :sweep_scope => sweep_scope,
149
152
  :refresh_state_started_at => refresh_state_started_at,
150
- :refresh_state_sent_at => refresh_state_sent_at
153
+ :refresh_state_sent_at => refresh_state_sent_at,
154
+ :refresh_type => refresh_type
151
155
  )
152
156
  )
153
157
  rescue => e
@@ -165,6 +169,10 @@ module TopologicalInventory
165
169
  "Default"
166
170
  end
167
171
 
172
+ def default_refresh_type
173
+ 'full-refresh'
174
+ end
175
+
168
176
  def ingress_api_client
169
177
  TopologicalInventoryIngressApiClient::DefaultApi.new
170
178
  end
@@ -1,7 +1,7 @@
1
1
  module TopologicalInventory
2
2
  module Providers
3
3
  module Common
4
- VERSION = "1.0.8"
4
+ VERSION = "1.0.9"
5
5
  end
6
6
  end
7
7
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_runtime_dependency "manageiq-loggers", ">= 0.4.2"
30
30
  spec.add_runtime_dependency "sources-api-client", "~> 3.0"
31
31
  spec.add_runtime_dependency "topological_inventory-api-client", "~> 3.0", ">= 3.0.1"
32
- spec.add_runtime_dependency "topological_inventory-ingress_api-client", "~> 1.0"
32
+ spec.add_runtime_dependency "topological_inventory-ingress_api-client", "~> 1.0", ">= 1.0.3"
33
33
 
34
34
  spec.add_development_dependency "bundler", "~> 2.0"
35
35
  spec.add_development_dependency "rake", ">= 12.3.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topological_inventory-providers-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Slemr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -113,6 +113,9 @@ dependencies:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
115
  version: '1.0'
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 1.0.3
116
119
  type: :runtime
117
120
  prerelease: false
118
121
  version_requirements: !ruby/object:Gem::Requirement
@@ -120,6 +123,9 @@ dependencies:
120
123
  - - "~>"
121
124
  - !ruby/object:Gem::Version
122
125
  version: '1.0'
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 1.0.3
123
129
  - !ruby/object:Gem::Dependency
124
130
  name: bundler
125
131
  requirement: !ruby/object:Gem::Requirement