foreman_bootdisk 21.0.1 → 21.0.3
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 +4 -4
- data/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb +3 -3
- data/app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb +2 -2
- data/app/services/foreman_bootdisk/iso_generator.rb +1 -1
- data/config/routes.rb +6 -4
- data/lib/foreman_bootdisk/engine.rb +8 -8
- data/lib/foreman_bootdisk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73dd028ac8d884cad6c8be76723b7e30842818693cf818181b6ad57e808943c3
|
4
|
+
data.tar.gz: 12c262a0c3df13b954ebd4e617b9cf82c8aead268f2cb938ae5dd4dbdd6a2f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdbb8b993a60425f9541c89c922c374a2d59927c5db934835ded53b6bfe3d770ebbf6ef61c701ffe28e3dac06bbffc91f6d80483d77b94ef1b8d4da9ee05741b
|
7
|
+
data.tar.gz: 13f3eabdc0f14d5bd0aef34843546375765cfac9141b1d69d2c4f95b53bdcde0e972a3aed9b1268f5ac00485b2c04eab119ec7fda245f31d4f1484922eed6ba9
|
@@ -14,10 +14,10 @@ module ForemanBootdisk
|
|
14
14
|
skip_after_action :log_response_body
|
15
15
|
|
16
16
|
# no-op, but required for apipie documentation
|
17
|
-
api :GET, '', N_('Boot disks')
|
17
|
+
api :GET, '/bootdisk', N_('Boot disks')
|
18
18
|
def index; end
|
19
19
|
|
20
|
-
api :GET, '/generic', N_('Download generic image')
|
20
|
+
api :GET, '/bootdisk/generic', N_('Download generic image')
|
21
21
|
def generic
|
22
22
|
# EFI not supported for iPXE generic bootdisk
|
23
23
|
tmpl = ForemanBootdisk::Renderer.new.generic_template_render
|
@@ -26,7 +26,7 @@ module ForemanBootdisk
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
api :GET, '/hosts/:host_id', N_('Download host image')
|
29
|
+
api :GET, '/bootdisk/hosts/:host_id', N_('Download host image')
|
30
30
|
param :full, :bool, required: false, desc: N_('True for full, false for basic reusable image')
|
31
31
|
param :host_id, :identifier_dottable, required: true
|
32
32
|
def host
|
@@ -16,10 +16,10 @@ module ForemanBootdisk
|
|
16
16
|
skip_after_action :log_response_body
|
17
17
|
|
18
18
|
# no-op, but required for apipie documentation
|
19
|
-
api :GET, '', N_('Subnet boot disks')
|
19
|
+
api :GET, '/bootdisk', N_('Subnet boot disks')
|
20
20
|
def index; end
|
21
21
|
|
22
|
-
api :GET, '/subnets/:subnet_id', N_('Download subnet generic image')
|
22
|
+
api :GET, '/bootdisk/subnets/:subnet_id', N_('Download subnet generic image')
|
23
23
|
param :subnet_id, :identifier_dottable, required: true
|
24
24
|
def subnet
|
25
25
|
subnet = @subnet_disk
|
@@ -217,7 +217,7 @@ module ForemanBootdisk
|
|
217
217
|
else
|
218
218
|
http_object = Net::HTTP
|
219
219
|
end
|
220
|
-
http_object.start(uri.host, uri.port) do |http|
|
220
|
+
http_object.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
221
221
|
request = Net::HTTP::Get.new(uri.request_uri, 'Accept-Encoding' => 'plain')
|
222
222
|
|
223
223
|
http.request(request) do |response|
|
data/config/routes.rb
CHANGED
@@ -14,10 +14,12 @@ ForemanBootdisk::Engine.routes.draw do
|
|
14
14
|
|
15
15
|
namespace :api, defaults: { format: 'json' } do
|
16
16
|
scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v1|v2/, constraints: ApiConstraints.new(version: 2, default: true) do
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
scope :bootdisk do
|
18
|
+
get 'generic', to: 'disks#generic'
|
19
|
+
constraints(id: %r{[^/]+}) do
|
20
|
+
get 'hosts/:id', to: 'disks#host'
|
21
|
+
get 'subnets/:id', to: 'subnet_disks#subnet'
|
22
|
+
end
|
21
23
|
end
|
22
24
|
end
|
23
25
|
end
|
@@ -10,7 +10,7 @@ module ForemanBootdisk
|
|
10
10
|
isolate_namespace ForemanBootdisk
|
11
11
|
|
12
12
|
config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
|
13
|
-
config.autoload_paths += Dir["#{config.root}/app/helpers
|
13
|
+
config.autoload_paths += Dir["#{config.root}/app/helpers"]
|
14
14
|
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
15
15
|
config.autoload_paths += Dir["#{config.root}/app/lib"]
|
16
16
|
|
@@ -28,6 +28,12 @@ module ForemanBootdisk
|
|
28
28
|
Apipie.configuration.checksum_path += ['/bootdisk/api/']
|
29
29
|
end
|
30
30
|
|
31
|
+
# Temporary workaround fix for helpers
|
32
|
+
initializer 'foreman_bootdisk.rails_loading_workaround' do
|
33
|
+
HostsHelper.prepend ForemanBootdisk::HostsHelperExt
|
34
|
+
SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
|
35
|
+
end
|
36
|
+
|
31
37
|
initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |_app|
|
32
38
|
Foreman::Plugin.register :foreman_bootdisk do
|
33
39
|
requires_foreman '>= 3.4'
|
@@ -124,7 +130,7 @@ module ForemanBootdisk
|
|
124
130
|
description: N_("Installation media files will be cached for full host images")
|
125
131
|
|
126
132
|
setting "bootdisk_allowed_types",
|
127
|
-
type: :
|
133
|
+
type: :array,
|
128
134
|
default: Setting::Bootdisk.bootdisk_types,
|
129
135
|
full_name: N_("Allowed bootdisk types"),
|
130
136
|
description: N_("List of allowed bootdisk types, remove type to disable it")
|
@@ -139,12 +145,6 @@ module ForemanBootdisk
|
|
139
145
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
140
146
|
end
|
141
147
|
|
142
|
-
# Temporary workaround fix for helpers
|
143
|
-
initializer 'foreman_bootdisk.rails_loading_workaround' do
|
144
|
-
HostsHelper.prepend ForemanBootdisk::HostsHelperExt
|
145
|
-
SubnetsHelper.prepend ForemanBootdisk::SubnetsHelperExt
|
146
|
-
end
|
147
|
-
|
148
148
|
config.to_prepare do
|
149
149
|
begin
|
150
150
|
Host::Managed.prepend ForemanBootdisk::HostExt
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_bootdisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.0.
|
4
|
+
version: 21.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: theforeman-rubocop
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
160
|
+
rubygems_version: 3.3.26
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Create boot disks to provision hosts with Foreman
|