foreman_maintain 1.2.4 → 1.2.6

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: a8dea59abb9dd938c046267a9561ec9e6b67b1982b63ceb098842726b50dba2f
4
- data.tar.gz: 44bb1053c3b8a810d4ec27c531d182fc83118635bf5e1d9f16ab6e6b55bd46a2
3
+ metadata.gz: 193b1e7cefdc871725692b84d03636fab11dcf6a0de8928c7c8ff05179b8ddd8
4
+ data.tar.gz: afdf239a676685fa3b793e78389d989029f6dd29ec806bb1cef4ee72a91c37fe
5
5
  SHA512:
6
- metadata.gz: a18584dc4a419be407d39587193735f66e8497ba6dbcb3670e786eca21abb0860da885267005ba351ab01aa5c3e5eee79b6ec9bc2d0763ed997779d7a011e492
7
- data.tar.gz: '08e82fd2c29f07da6be8d9d302714d5aeaf9b7f208924f9a211aa133ab8bb7b9c769eec7495e94f5008a3d6dfd806dabccaffa1c8b98f6f3ec93ff75bdf1b661'
6
+ metadata.gz: d2305610529e5ff51dc325daaaeee9da689259a0c1aeec88d155c8315d83da7551d0c00b8c5098439986602b039ae85bae3346dc679db184dc08bd856610b3d4
7
+ data.tar.gz: f0fdf10df80d8a26552c1f74aed56d944b1324ef06fe8960c92aa9d8411cae211f24ff596d60c8a1fff2bae450901c40e9b478889fe118432323fb748ee07d6c
@@ -0,0 +1,28 @@
1
+ class Features::Mosquitto < ForemanMaintain::Feature
2
+ metadata do
3
+ label :mosquitto
4
+
5
+ confine do
6
+ # Luckily, the service name is the same as the package providing it
7
+ find_package(service_name)
8
+ end
9
+ end
10
+
11
+ def services
12
+ [system_service(self.class.service_name, 10)]
13
+ end
14
+
15
+ def config_files
16
+ [self.class.etc_prefix]
17
+ end
18
+
19
+ class << self
20
+ def etc_prefix
21
+ '/etc/mosquitto'
22
+ end
23
+
24
+ def service_name
25
+ 'mosquitto'
26
+ end
27
+ end
28
+ end
@@ -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
+ return [] if ids.empty?
38
+
39
+ ids_condition = ids.map { |id| "'#{id}'" }.join(',')
40
+ query = "SELECT id FROM katello_sync_plans WHERE id IN (#{ids_condition})"
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)
@@ -51,13 +51,11 @@ class Features::Tar < ForemanMaintain::Feature
51
51
  end
52
52
 
53
53
  if volume_size
54
- split_tar_script = default_split_tar_script
55
54
  tar_command << "--tape-length=#{volume_size}"
56
- tar_command << "--new-volume-script=#{split_tar_script}"
57
55
  end
58
56
 
59
57
  tar_command << '--overwrite' if options[:overwrite]
60
- tar_command << '--gzip' if options[:gzip]
58
+ tar_command << (options[:gzip] ? '--gzip' : "--new-volume-script=#{default_split_tar_script}")
61
59
 
62
60
  exclude = options.fetch(:exclude, [])
63
61
  exclude.each do |ex|
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.2.4'.freeze
2
+ VERSION = '1.2.6'.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.2.4
4
+ version: 1.2.6
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-01 00:00:00.000000000 Z
11
+ date: 2023-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -217,6 +217,7 @@ files:
217
217
  - definitions/features/katello.rb
218
218
  - definitions/features/katello_install.rb
219
219
  - definitions/features/mongo.rb
220
+ - definitions/features/mosquitto.rb
220
221
  - definitions/features/nftables.rb
221
222
  - definitions/features/pulp2.rb
222
223
  - definitions/features/pulpcore.rb