Class: ConcertoConfig::DHCPAddressing

Inherits:
Object
  • Object
show all
Defined in:
lib/concerto_client/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.



404
405
406
# File 'lib/concerto_client/netconfig.rb', line 404

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

Class Method Details

.descriptionObject



435
436
437
# File 'lib/concerto_client/netconfig.rb', line 435

def self.description
    "Dynamic Addressing - DHCP"
end

Instance Method Details

#addressing_typeObject



408
409
410
# File 'lib/concerto_client/netconfig.rb', line 408

def addressing_type
    'dhcp'
end

#argsObject



426
427
428
# File 'lib/concerto_client/netconfig.rb', line 426

def args
    { }
end

#interfaces_linesObject



412
413
414
415
416
# File 'lib/concerto_client/netconfig.rb', line 412

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

#safe_assignObject



422
423
424
# File 'lib/concerto_client/netconfig.rb', line 422

def safe_assign
    [] # no args
end

#validateObject



418
419
420
# File 'lib/concerto_client/netconfig.rb', line 418

def validate
    # nothing to validate
end

#write_configsObject



430
431
432
433
# File 'lib/concerto_client/netconfig.rb', line 430

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