Revision f825cdf6
Added by Dominic Cleal about 9 years ago
app/models/nic/bootable.rb | ||
---|---|---|
|
||
register_to_enc_transformation :type, lambda { |type| type.constantize.humanized_name }
|
||
|
||
def dhcp_record
|
||
return unless dhcp? or @dhcp_record
|
||
@dhcp_record ||= host.jumpstart? ? Net::DHCP::SparcRecord.new(dhcp_attrs) : Net::DHCP::Record.new(dhcp_attrs)
|
||
def initialize(*args)
|
||
ActiveSupport::Deprecation.warn 'Nic::Bootable is replaced by Nic::Managed with provision: true, this class will be removed'
|
||
super(*args)
|
||
end
|
||
|
||
def self.human_name
|
Also available in: Unified diff
fixes #10020 - add next-server/filename attrs to provision NIC DHCP record
A host's DHCP record used to be constructed with PXE attributes in
Orchestration::DHCP, but moved to Nic::Managed during 43c4bd7. Nic::Managed
didn't add PXE attributes, so this commit adds these when provision? is set.
Nic::Bootable could add PXE attributes but was unused, so it is now deprecated.
PXE bootable interfaces should be of type Nic::Managed with provision: true.
(cherry picked from commit e60f079920e6b370cfb3b2b047896fcbd4794a3c)
Conflicts:
app/models/nic/bootable.rb