foreman_discovery 19.0.5 → 20.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: 2d82b5ffe2a3ca76a0696ae862c4f6108a9728e6547f45884a63f8f9786bd87e
4
- data.tar.gz: 3dc9931563de9407620f06d5c14c128f0409e762a3d0c55777084af31a4579ac
3
+ metadata.gz: 42e909e67952be309ba249d25294fa97227d9ad9dcd6c98b71f93c33e8d94e4c
4
+ data.tar.gz: ccf2de1a46292d285fbf187e7c65def6c7bb0c210bb1d7a26ad4b7353a967f12
5
5
  SHA512:
6
- metadata.gz: 4d1603c83fb6334a36e8e43a01437581c031a63c6cafdb1ce777edb91a8a82b6716be1965bfe132cb10737a124c0a180caee4e82ee265fed13c9eb2408f792d9
7
- data.tar.gz: fcb4dd77d044943b182f3e399fa3d8a08f2301a81162f9da95e7a8f52570df201a73e3a8438753dc7f96b17d2bc69226f1b3eccca3f5d224f2b4e2b6e215654e
6
+ metadata.gz: d8fa0da48abb3f11aac1b79b1bc7faa5ec22e9c56543a4802a789a6d626370ccd6c5daa9f5b2faeb4be92af8068d99174a299a5ac865b71de38de8c6785fc369
7
+ data.tar.gz: 7a832889e8509358be5c7affeed3894cf964e9c2defc29644f54c1f015f872583ab77bfeed39644c89acad6f0cd3bdb34ae4c7fe08261c971f3e631b4cc60fdc
@@ -2,6 +2,6 @@ module DiscoveryTaxonomyExtensions
2
2
  extend ActiveSupport::Concern
3
3
  included do
4
4
  has_many :discovered_hosts, :class_name => 'Host::Discovered'
5
- before_destroy ActiveRecord::Base::EnsureNotUsedBy.new(:discovered_hosts)
5
+ before_destroy EnsureNotUsedBy.new(:discovered_hosts)
6
6
  end
7
7
  end
@@ -14,8 +14,8 @@ class Setting::Discovered < ::Setting
14
14
 
15
15
  def self.default_settings
16
16
  [
17
- self.set('discovery_location', N_("The default location to place discovered hosts in"), "", N_("Discovery location"), nil, { :collection => Proc.new {Hash[[['', '']].concat Location.all.map{|loc| [loc[:title], loc[:title]]}]} }),
18
- self.set('discovery_organization', N_("The default organization to place discovered hosts in"), "", N_("Discovery organization"), nil, { :collection => Proc.new {Hash[[['', '']].concat Organization.all.map{|org| [org[:title], org[:title]]}]} }),
17
+ self.set('discovery_location', N_("The default location to place discovered hosts in"), "", N_("Discovery location"), nil, { :collection => Proc.new {Hash[Location.all.map{|loc| [loc[:title], loc[:title]]}]} }),
18
+ self.set('discovery_organization', N_("The default organization to place discovered hosts in"), "", N_("Discovery organization"), nil, { :collection => Proc.new {Hash[Organization.all.map{|org| [org[:title], org[:title]]}]} }),
19
19
  self.set('discovery_fact', N_("Fact name to use for primary interface detection"), "discovery_bootif", N_("Interface fact")),
20
20
  self.set('discovery_auto_bond', N_("Automatic bond interface (if another interface is detected on the same VLAN via LLDP)"), false, N_("Create bond interfaces")),
21
21
  self.set('discovery_clean_facts', N_("Clean all reported facts during provisioning (except discovery facts)"), false, N_("Clean all facts")),
@@ -4,17 +4,18 @@ name: Discovery Debian kexec
4
4
  oses:
5
5
  - Debian
6
6
  - Ubuntu
7
- description: |
8
- This template is used to pass command line options to kexec when reloading
9
- kernel on a discovered host instead of rebooting. This is useful in PXE-less
10
- environments. The template must generate JSON format with the following items
11
- "kernel", "initram", "append" and "extra". The kexec command is composed in
12
- the following way:
13
-
14
- kexec --force --debug --append=$append --initrd=$initram $extra $kernel
15
-
16
- Please read kexec(8) man page for more information about semantics.
17
- Extra options like --reset-vga can be set via "extra" array.
7
+ -%>
8
+ <%#
9
+ This template is used to pass command line options to kexec when reloading
10
+ kernel on a discovered host instead of rebooting. This is useful in PXE-less
11
+ environments. The template must generate JSON format with the following items
12
+ "kernel", "initram", "append" and "extra". The kexec command is composed in
13
+ the following way:
14
+
15
+ kexec --force --debug --append=$append --initrd=$initram $extra $kernel
16
+
17
+ Please read kexec(8) man page for more information about semantics.
18
+ Extra options like --reset-vga can be set via "extra" array.
18
19
  -%>
19
20
  <%
20
21
  mac = @host.facts['discovery_bootif']
@@ -14,17 +14,18 @@ oses:
14
14
  - RedHat 5
15
15
  - RedHat 6
16
16
  - RedHat 7
17
- description: |
18
- This template is used to pass command line options to kexec when reloading
19
- kernel on a discovered host instead of rebooting. This is useful in PXE-less
20
- environments. The template must generate JSON format with the following items
21
- "kernel", "initram", "append" and "extra". The kexec command is composed in
22
- the following way:
23
-
24
- kexec --force --debug --append=$append --initrd=$initram $extra $kernel
25
-
26
- Please read kexec(8) man page for more information about semantics.
27
- Extra options like --reset-vga can be set via "extra" array.
17
+ -%>
18
+ <%#
19
+ This template is used to pass command line options to kexec when reloading
20
+ kernel on a discovered host instead of rebooting. This is useful in PXE-less
21
+ environments. The template must generate JSON format with the following items
22
+ "kernel", "initram", "append" and "extra". The kexec command is composed in
23
+ the following way:
24
+
25
+ kexec --force --debug --append=$append --initrd=$initram $extra $kernel
26
+
27
+ Please read kexec(8) man page for more information about semantics.
28
+ Extra options like --reset-vga can be set via "extra" array.
28
29
  -%>
29
30
  <%
30
31
  mac = @host.facts['discovery_bootif']
@@ -46,9 +47,9 @@ description: |
46
47
  "initram": "<%= @initrd_uri %>",
47
48
  <% if (@host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16) or
48
49
  (@host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7) -%>
49
- "append": "inst.ks=<%= foreman_url('provision') + "&static=yes" %> inst.ks.sendmac <%= "ip=#{ip}::#{gw}:#{mask}:::none nameserver=#{dns} ksdevice=bootif BOOTIF=#{bootif} nomodeset nokaslr " + options.compact.join(' ') %>",
50
+ "append": "ks=<%= foreman_url('provision') + "&static=yes" %> inst.ks.sendmac <%= "ip=#{ip}::#{gw}:#{mask}:::none nameserver=#{dns} ksdevice=bootif BOOTIF=#{bootif} nomodeset nokaslr " + options.compact.join(' ') %>",
50
51
  <% else -%>
51
- "append": "inst.ks=<%= foreman_url('provision') + "&static=yes" %> kssendmac nicdelay=5 <%= "ip=#{ip} netmask=#{mask} gateway=#{gw} dns=#{dns} ksdevice=#{mac} BOOTIF=#{bootif} nomodeset nokaslr " + options.compact.join(' ') %>",
52
+ "append": "ks=<%= foreman_url('provision') + "&static=yes" %> kssendmac nicdelay=5 <%= "ip=#{ip} netmask=#{mask} gateway=#{gw} dns=#{dns} ksdevice=#{mac} BOOTIF=#{bootif} nomodeset nokaslr " + options.compact.join(' ') %>",
52
53
  <% end -%>
53
54
  "extra": []
54
55
  }
@@ -43,7 +43,7 @@ module ForemanDiscovery
43
43
 
44
44
  initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
45
45
  Foreman::Plugin.register :foreman_discovery do
46
- requires_foreman '>= 3.1'
46
+ requires_foreman '>= 3.2'
47
47
 
48
48
  # discovered hosts permissions
49
49
  security_block :discovery do
@@ -147,7 +147,7 @@ module ForemanDiscovery
147
147
  :edit_discovery_rules,
148
148
  :destroy_discovery_rules,
149
149
  ]
150
- if defined?(ForemanPuppet::Engine)
150
+ if defined?(ForemanPuppet::VERSION)
151
151
  MANAGER += [ :view_environments, :view_puppetclasses ]
152
152
  end
153
153
  role "Discovery Reader", READER, "Role granting permissions to view discovered hosts"
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "19.0.5"
2
+ VERSION = "20.0.0"
3
3
  end