Module: Orchestration::DHCP::InstanceMethods

Defined in:
app/models/orchestration/dhcp.rb

Instance Method Summary collapse

Instance Method Details

#dhcp?Boolean


13
14
15
# File 'app/models/orchestration/dhcp.rb', line 13

def dhcp?
  name.present? and ip.present? and !subnet.nil? and subnet.dhcp? and managed? and capabilities.include?(:build)
end

#dhcp_recordObject


17
18
19
20
# File 'app/models/orchestration/dhcp.rb', line 17

def dhcp_record
  return unless dhcp? or @dhcp_record
  @dhcp_record ||= jumpstart? ? Net::DHCP::SparcRecord.new(dhcp_attrs) : Net::DHCP::Record.new(dhcp_attrs)
end