foreman_rescue 4.0.0 → 4.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0bce1ad2fa35f301d40febfbeccede3ed3d5134ece9a75a27f6b468bb8e2ae
|
4
|
+
data.tar.gz: f2d4236c22ae308055658f79811b2dd7b88b15b9669b353db942a6610131e7ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe7c1775d102b27647d909ee0a0e1df46fcf3ea5dd4090fde64d793f03c44965f24a071e781973422579b576e15e838d881d2d57f4d2ef801616594a57d94deb
|
7
|
+
data.tar.gz: 269e2a963a5d9030794832dff7f18541cbafe183c47495c2e6a9aef51ad31379ca8a5f2df0b4c1c48eab74465eca5a76429cdfac8ea04cbc4877d013ba6a638f
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module ForemanRescue
|
4
4
|
module ProvisioningTemplateExtensions
|
5
|
-
def
|
5
|
+
def templates_by_kind(kind)
|
6
6
|
template_kind = TemplateKind.find_by(name: kind)
|
7
7
|
ProvisioningTemplate.where(:template_kind => template_kind).pluck(:name, :name).to_h
|
8
8
|
end
|
@@ -54,7 +54,7 @@ module ForemanRescue
|
|
54
54
|
Host::Managed.prepend ForemanRescue::HostExtensions
|
55
55
|
HostsHelper.prepend ForemanRescue::HostsHelperExtensions
|
56
56
|
Nic::Managed.prepend ForemanRescue::Orchestration::TFTP
|
57
|
-
ProvisioningTemplate.prepend ForemanRescue::ProvisioningTemplateExtensions
|
57
|
+
ProvisioningTemplate.singleton_class.prepend ForemanRescue::ProvisioningTemplateExtensions
|
58
58
|
rescue StandardError => e
|
59
59
|
Rails.logger.warn "ForemanRescue: skipping engine hook (#{e})"
|
60
60
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_plugin_helper'
|
4
|
+
|
5
|
+
class ProvisioningHostTest < ActiveSupport::TestCase
|
6
|
+
setup do
|
7
|
+
User.current = FactoryBot.build(:user, :admin)
|
8
|
+
disable_orchestration
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'provisioning template query' do
|
12
|
+
context 'with type PXELinux' do
|
13
|
+
let(:type) do
|
14
|
+
'PXELinux'
|
15
|
+
end
|
16
|
+
|
17
|
+
test 'should return templates' do
|
18
|
+
templates = ProvisioningTemplate.templates_by_kind(type)
|
19
|
+
|
20
|
+
assert_includes templates, 'PXE Default Menu'
|
21
|
+
assert_includes templates, 'PXELinux default local boot'
|
22
|
+
assert_includes templates, 'PXELinux global default'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rescue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- test/factories/host.rb
|
72
72
|
- test/lib/tasks/seeds_test.rb
|
73
73
|
- test/models/host_test.rb
|
74
|
+
- test/models/provisioning_template_test.rb
|
74
75
|
- test/test_plugin_helper.rb
|
75
76
|
- test/unit/foreman_rescue/access_permissions_test.rb
|
76
77
|
homepage: https://github.com/dm-drogeriemarkt/foreman_rescue
|
@@ -104,5 +105,6 @@ test_files:
|
|
104
105
|
- test/factories/host.rb
|
105
106
|
- test/lib/tasks/seeds_test.rb
|
106
107
|
- test/models/host_test.rb
|
108
|
+
- test/models/provisioning_template_test.rb
|
107
109
|
- test/test_plugin_helper.rb
|
108
110
|
- test/unit/foreman_rescue/access_permissions_test.rb
|