Class: Net::DHCP::SparcRecord

Inherits:
Record show all
Defined in:
lib/net/dhcp/sparc_record.rb

Constant Summary

Constants included from Validations

Validations::IP_REGEXP, Validations::MAC_REGEXP

Instance Attribute Summary collapse

Attributes inherited from Record

#filename, #ip, #mac, #network, #nextServer

Attributes inherited from Record

#hostname, #logger, #proxy

Instance Method Summary collapse

Methods inherited from Record

#conflicts, #create, #destroy, #to_s, #valid?

Methods inherited from Record

#==, #conflicting?, #inspect, #reload!

Methods included from Validations

normalize_ip, normalize_mac, #validate_ip, #validate_mac, #validate_network

Constructor Details

#initialize(opts = { }) ⇒ SparcRecord


7
8
9
10
# File 'lib/net/dhcp/sparc_record.rb', line 7

def initialize opts = { }
  super(opts)
  raise "Must define a dhcp vendor" if vendor.blank?
end

Instance Attribute Details

#install_pathObject

Returns the value of attribute install_path


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def install_path
  @install_path
end

#install_server_ipObject

Returns the value of attribute install_server_ip


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def install_server_ip
  @install_server_ip
end

#install_server_nameObject

Returns the value of attribute install_server_name


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def install_server_name
  @install_server_name
end

#jumpstart_server_pathObject

Returns the value of attribute jumpstart_server_path


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def jumpstart_server_path
  @jumpstart_server_path
end

#root_path_nameObject

Returns the value of attribute root_path_name


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def root_path_name
  @root_path_name
end

#root_server_hostnameObject

Returns the value of attribute root_server_hostname


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def root_server_hostname
  @root_server_hostname
end

#root_server_ipObject

Returns the value of attribute root_server_ip


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def root_server_ip
  @root_server_ip
end

#sysid_server_pathObject

Returns the value of attribute sysid_server_path


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def sysid_server_path
  @sysid_server_path
end

#vendorObject

Returns the value of attribute vendor


3
4
5
# File 'lib/net/dhcp/sparc_record.rb', line 3

def vendor
  @vendor
end

Instance Method Details

#attrsObject


12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/net/dhcp/sparc_record.rb', line 12

def attrs
  super.merge({
    "#{vendor}root_path_name"        => root_path_name,
    "#{vendor}sysid_server_path"     => sysid_server_path,
    "#{vendor}install_server_ip"     => install_server_ip,
    "#{vendor}jumpstart_server_path" => jumpstart_server_path,
    "#{vendor}install_server_name"   => install_server_name,
    "#{vendor}root_server_hostname"  => root_server_hostname,
    "#{vendor}root_server_ip"        => root_server_ip,
    "#{vendor}install_path"          => install_path
  }).delete_if { |k, v| v.nil? }
end