Class: OsCtld::DistConfig::Network::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
OsCtl::Lib::Utils::File, Helpers::Common
Defined in:
lib/osctld/dist_config/network/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Common

#systemd_service_enabled?, #systemd_service_masked?, #writable?

Constructor Details

#initialize(configurator) ⇒ Base

Returns a new instance of Base.

Parameters:



12
13
14
# File 'lib/osctld/dist_config/network/base.rb', line 12

def initialize(configurator)
  @configurator = configurator
end

Instance Attribute Details

#configuratorObject (readonly, protected)

Returns the value of attribute configurator.



47
48
49
# File 'lib/osctld/dist_config/network/base.rb', line 47

def configurator
  @configurator
end

Instance Method Details

#add_netif(netifs, netif) ⇒ Object

Called when a new network interface is added to a container

Parameters:



30
31
# File 'lib/osctld/dist_config/network/base.rb', line 30

def add_netif(netifs, netif)
end

#configure(netifs) ⇒ Object

Parameters:

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/osctld/dist_config/network/base.rb', line 23

def configure(netifs)
  raise NotImplementedError
end

#remove_netif(netifs, netif) ⇒ Object

Called when a network interface is removed from a container

Parameters:



36
37
# File 'lib/osctld/dist_config/network/base.rb', line 36

def remove_netif(netifs, netif)
end

#rename_netif(netifs, netif, old_name) ⇒ Object

Called when an existing network interface is renamed

Parameters:



43
44
# File 'lib/osctld/dist_config/network/base.rb', line 43

def rename_netif(netifs, netif, old_name)
end

#usable?Boolean

Return true if this class can be used to configure the network

Returns:

  • (Boolean)


18
19
20
# File 'lib/osctld/dist_config/network/base.rb', line 18

def usable?
  false
end