Class: Bandshell::DHCPAddressing

Inherits:
Object
  • Object
show all
Defined in:
lib/bandshell/netconfig.rb

Overview

Dynamic IPv4 addressing via DHCP

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ DHCPAddressing

Returns a new instance of DHCPAddressing.



405
406
407
# File 'lib/bandshell/netconfig.rb', line 405

def initialize(args={})
  # we accept no args
end

Class Method Details

.descriptionObject



436
437
438
# File 'lib/bandshell/netconfig.rb', line 436

def self.description
  "Dynamic Addressing - DHCP"
end

Instance Method Details

#addressing_typeObject



409
410
411
# File 'lib/bandshell/netconfig.rb', line 409

def addressing_type
  'dhcp'
end

#argsObject



427
428
429
# File 'lib/bandshell/netconfig.rb', line 427

def args
  { }
end

#interfaces_linesObject



413
414
415
416
417
# File 'lib/bandshell/netconfig.rb', line 413

def interfaces_lines
  # DHCP needs no additional interfaces args
  # from the addressing side
  []
end

#safe_assignObject



423
424
425
# File 'lib/bandshell/netconfig.rb', line 423

def safe_assign
  [] # no args
end

#validateObject



419
420
421
# File 'lib/bandshell/netconfig.rb', line 419

def validate
  # nothing to validate
end

#write_configsObject



431
432
433
434
# File 'lib/bandshell/netconfig.rb', line 431

def write_configs
  # dhclient will write our resolv.conf so we do not need
  # to do anything
end