Sha256: cf8e802f1ced5061b18da7ba10cafd04a9e05c59c5408972ccdb4cd52ce48f09

Contents?: true

Size: 947 Bytes

Versions: 5

Compression:

Stored size: 947 Bytes

Contents

module Net::DHCP
  class SparcRecord < Record
    attr_accessor :vendor, :root_path_name, :sysid_server_path,
      :install_server_name, :install_server_ip, :jumpstart_server_path,
      :root_server_hostname, :root_server_ip, :install_path

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

    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
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/lib/net/dhcp/sparc_record.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/lib/net/dhcp/sparc_record.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/lib/net/dhcp/sparc_record.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/lib/net/dhcp/sparc_record.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/lib/net/dhcp/sparc_record.rb