foreman_maintain 1.1.10 → 1.1.11

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
  SHA256:
3
- metadata.gz: 521d4872b92d49f2bfe38afcbb8113a33cc8b9470d3d3d983074761ed2001202
4
- data.tar.gz: 4670a9b7913fb1c95d992e0e3234b66b2ade8e351c4180b8d7eacee9eb2b2b5b
3
+ metadata.gz: 05e00cf48a6dfb5684ac74e789ba933225d4c380a2b83d3e8df8cd607d537c8c
4
+ data.tar.gz: c639bf3716c44df18b63125880f6521558ee754992e21eac73021e14e3ebfd5c
5
5
  SHA512:
6
- metadata.gz: b440223080a5882f69e273426769427b0351d81a0eb4ee49c6c4faa15f29116a6dcc71d978ac6657b54c3788d5f6f6eb5c2c66c8d2d3e581db67d3871b40320a
7
- data.tar.gz: 1838ce95442878efa5444e8f643e716ec5251461692c43215d6418de20fa1b7caef195abbd562c4eb96426990c51b3d1c3dc08e75f8694a2072e5f6e5645f276
6
+ metadata.gz: 1899bd4d44b5ab634dfdd516c9db1e0cf4c45ced30b3de818bcbaa0b45bdedafe690a6e42eff5643e2b2e986c8289c792db34f3609161e33c9c773c27414cb93
7
+ data.tar.gz: 68ee21c7b7e59cbc9a8d944fdebba54e82b72a5b67c4fbf5284f36caab4926f1223d0c5168d6303e624f4ed49b87c5167bbec6c222dc8d874a8b8fdb4d5af9ef
@@ -144,7 +144,7 @@ class Features::ForemanProxy < ForemanMaintain::Feature
144
144
 
145
145
  cmd = "curl -w '\n%{http_code}' -s "
146
146
  cmd += format_shell_args('--cert' => ssl_cert, '--key' => ssl_key, '--cacert' => ssl_ca)
147
- cmd += " https://$(hostname):#{proxy_settings[:https_port]}"
147
+ cmd += " https://#{hostname}:#{proxy_settings[:https_port]}"
148
148
  cmd
149
149
  end
150
150
 
@@ -17,6 +17,7 @@ class Features::ForemanTasks < ForemanMaintain::Feature
17
17
  Actions::Candlepin::ListenOnCandlepinEvents
18
18
  Actions::Katello::EventQueue::Monitor
19
19
  Actions::Insights::EmailPoller
20
+ ForemanInventoryUpload::Async::GenerateAllReportsJob
20
21
  ForemanInventoryUpload::Async::GenerateReportJob
21
22
  ForemanInventoryUpload::Async::QueueForUploadJob
22
23
  ForemanInventoryUpload::Async::UploadReportJob
@@ -24,6 +25,7 @@ class Features::ForemanTasks < ForemanMaintain::Feature
24
25
  InsightsCloud::Async::InsightsFullSync
25
26
  InsightsCloud::Async::InsightsResolutionsSync
26
27
  InsightsCloud::Async::InsightsRulesSync
28
+ InsightsCloud::Async::InsightsScheduledSync
27
29
  InventorySync::Async::InventoryFullSync
28
30
  InventorySync::Async::InventoryHostsSync
29
31
  InventorySync::Async::InventoryScheduledSync
@@ -33,12 +33,22 @@ class Features::SyncPlans < ForemanMaintain::Feature
33
33
  feature(:foreman_database).query(query).map { |r| r['id'].to_i }
34
34
  end
35
35
 
36
+ def validate_sync_plan_ids(ids)
37
+ ids_condition = ids.map { |id| "'#{id}'" }.join(',')
38
+ query = <<-SQL
39
+ SELECT id FROM katello_sync_plans WHERE id IN (#{ids_condition})
40
+ SQL
41
+ feature(:foreman_database).query(query).map { |r| r['id'].to_i }
42
+ end
43
+
36
44
  def make_disable(ids)
37
45
  update_records(ids, false)
38
46
  end
39
47
 
40
48
  def make_enable
41
- update_records(data[:disabled], true)
49
+ # remove ids of sync plans which no longer exist in DB
50
+ @data[:disabled] = validate_sync_plan_ids(@data[:disabled])
51
+ update_records(@data[:disabled], true)
42
52
  end
43
53
 
44
54
  def load_from_storage(storage)
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.1.10'.freeze
2
+ VERSION = '1.1.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-15 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -485,7 +485,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
485
485
  - !ruby/object:Gem::Version
486
486
  version: '0'
487
487
  requirements: []
488
- rubygems_version: 3.3.26
488
+ rubygems_version: 3.2.33
489
489
  signing_key:
490
490
  specification_version: 4
491
491
  summary: Foreman maintenance tool belt