foreman_wreckingball 3.4.1 → 4.0.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
  SHA256:
3
- metadata.gz: 5386e48704b4c0837fd34063239ead1bda9c7e2dd72cc60d82c15ac60334fea2
4
- data.tar.gz: 4ed751665783de1efb8e25534cc32324f287c4611aa579d031873078b53ff7d1
3
+ metadata.gz: 69707f89619ebddac7ddefecc16e1a029f917acff12ebcd5b043f212b71ea1cc
4
+ data.tar.gz: 71db825c47159fb7e7a083b2b0555f32f1ee094239ee93b8d2cf8961d8e3eb5b
5
5
  SHA512:
6
- metadata.gz: 2d6df272535f83e43c0889bce9655beb8b01f522269a85ebfbb7e5a6f1d332c407632e295234e12e7dc826897e8cc7eda587a322a57d265b3239ebbda54b4d4f
7
- data.tar.gz: 3aea63d70aa6895ba153fdf32c370127ca8ee8a2b22ceb9099b4c8ded6fca3b8315561e4cd78854ec1977b6df73d7dee7e54e5943237de496dfaf1eebec179bd
6
+ metadata.gz: dddb50886e2f10627b4d4d0a7058c0daeabb8659f68e9b8c1499d94ad3c764840b536d3bda174f74e179a647507d0172996bf3be4be089721fdafb2e32993b7c
7
+ data.tar.gz: 508e576b9e2568f4804424712d71065e2a957417d32f703923d789040ac4490361a7855aaf278ab33c9b4b35c008f840361dc594c95ceab34a4aa022b7e600b3
data/README.md CHANGED
@@ -11,7 +11,8 @@ This is a plugin for Foreman that adds several VMware related status checks to y
11
11
  | >= 1.15 | ~> 0.1 |
12
12
  | >= 1.16 | ~> 1.0 |
13
13
  | >= 1.17 | ~> 2.0 |
14
- | >= 1.18 | ~> 3.0 |
14
+ | >= 1.21 | ~> 3.0 |
15
+ | >= 2.3 | ~> 4.0 |
15
16
 
16
17
  ## Installation
17
18
 
@@ -11,3 +11,10 @@ div.status-hosts-container.ajax-error div.dataTables_wrapper,
11
11
  div.status-hosts-container.ajax-error p {
12
12
  display: none;
13
13
  }
14
+
15
+ table.status-hosts.hide-puppet-environment {
16
+ th:nth-child(5),
17
+ td:nth-child(5) {
18
+ display: none;
19
+ }
20
+ }
@@ -94,7 +94,7 @@ module ForemanWreckingball
94
94
  all_hosts = Host.authorized(:view_hosts, Host)
95
95
  .joins(@status.host_association)
96
96
  .try { |query| params[:owned_only] ? query.owned_by_current_user_or_group_with_current_user : query }
97
- .includes(@status.host_association, :vmware_facet, :environment)
97
+ .includes([*(:environment if Host::Managed.reflect_on_environment?), @status.host_association, :vmware_facet])
98
98
  .where.not('host_status.status': @status.global_ok_list)
99
99
  .preload(:owner)
100
100
  .order(:name)
@@ -388,6 +388,13 @@ rhel7_64Guest:
388
388
  :name: RedHat
389
389
  :major: 7
390
390
  :since: 5.5
391
+ rhel8_64Guest:
392
+ :description: Red Hat Enterprise Linux 8 (64-bit)
393
+ :architecture: x86_64
394
+ :osfamily: Redhat
395
+ :name: RedHat
396
+ :major: 8
397
+ :since: 6.5
391
398
  sjdsGuest:
392
399
  :description: Sun Java Desktop System
393
400
  sles10Guest:
@@ -426,6 +433,13 @@ sles12_64Guest:
426
433
  :name: SLES
427
434
  :major: 12
428
435
  :since: 5.5
436
+ sles15_64Guest:
437
+ :description: SUSE Linux Enterprise 15 (64-bit)
438
+ :architecture: x86_64
439
+ :osfamily: Suse
440
+ :name: SLES
441
+ :major: 15
442
+ :since: 6.0
429
443
  sles64Guest:
430
444
  :description: SUSE Linux Enterprise 8/9 (64-bit)
431
445
  :architecture: x86_64
@@ -16,6 +16,10 @@ module ForemanWreckingball
16
16
  scope :owned_by_current_user, -> { where(owner_type: 'User', owner_id: User.current.id) }
17
17
  scope :owned_by_group_with_current_user, -> { where(owner_type: 'Usergroup', owner_id: User.current.usergroup_ids_with_parents) }
18
18
  scope :owned_by_current_user_or_group_with_current_user, -> { owned_by_current_user.or(owned_by_group_with_current_user) }
19
+
20
+ def self.reflect_on_environment?
21
+ reflect_on_association(:environment).present?
22
+ end
19
23
  end
20
24
 
21
25
  def action_input_key
@@ -72,7 +72,7 @@ module ForemanWreckingball
72
72
  end
73
73
 
74
74
  def required_cpu_features_present?
75
- !(host.vmware_facet.cpu_features & ['cpuid.IBRS', 'cpuid.IBPB', 'cpuid.STIBP']).empty?
75
+ !(host.vmware_facet.cpu_features.map(&:downcase) & ['cpuid.ibrs', 'cpuid.ibpb', 'cpuid.stibp']).empty?
76
76
  end
77
77
  end
78
78
  end
@@ -2,14 +2,18 @@
2
2
 
3
3
  class Setting
4
4
  class Wreckingball < ::Setting
5
+ def self.default_settings
6
+ [
7
+ set('min_vsphere_hardware_version', N_('Minimum required Hardware version for vSphere VMs'), 13, N_('Hardware version'))
8
+ ]
9
+ end
10
+
5
11
  def self.load_defaults
6
12
  return unless ActiveRecord::Base.connection.table_exists?('settings')
7
13
  return unless super
8
14
 
9
15
  Setting.transaction do
10
- [
11
- set('min_vsphere_hardware_version', N_('Minimum required Hardware version for vSphere VMs'), 13, N_('Hardware version'))
12
- ].compact.each { |s| Setting::Wreckingball.create s.update(category: 'Setting::Wreckingball') }
16
+ default_settings.compact.each { |s| Setting::Wreckingball.create s.update(category: 'Setting::Wreckingball') }
13
17
  end
14
18
 
15
19
  true
@@ -8,8 +8,10 @@ child owner: :owner do
8
8
  attribute :name
9
9
  end
10
10
 
11
- child :environment do
12
- attribute :name
11
+ if Host::Managed.reflect_on_environment?
12
+ child :environment do
13
+ attribute :name
14
+ end
13
15
  end
14
16
 
15
17
  node(:path) { |host| host_path(host) }
@@ -1,7 +1,7 @@
1
1
  <%= render :partial => 'status_row_hosts_table_actions', locals: { supports_remediate: supports_remediate } %>
2
2
 
3
3
  <%= content_tag :table, id: status,
4
- class: 'table table-striped table-fixed status-hosts',
4
+ class: "table table-striped table-fixed status-hosts #{Host::Managed.reflect_on_environment? ? '' : 'hide-puppet-environment'}",
5
5
  'data-hosts-url': ajax_status_dashboard_hosts_path(status, owned_only: params[:owned_only]) do %>
6
6
  <%= content_tag :thead do %>
7
7
  <%= content_tag :tr do %>
@@ -42,7 +42,7 @@ module ForemanWreckingball
42
42
 
43
43
  initializer 'foreman_wreckingball.register_plugin', :before => :finisher_hook do |_app|
44
44
  Foreman::Plugin.register :foreman_wreckingball do
45
- requires_foreman '>= 1.21'
45
+ requires_foreman '>= 2.3'
46
46
 
47
47
  automatic_assets(false)
48
48
  precompile_assets(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanWreckingball
4
- VERSION = '3.4.1'
4
+ VERSION = '4.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_wreckingball
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Goebel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.1
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.1
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.1.4
192
+ rubygems_version: 3.2.28
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Adds status checks of the VMWare VMs to Foreman.