Class: OsCtld::DistConfig::Network::Base
- Inherits:
-
Object
- Object
- OsCtld::DistConfig::Network::Base
- Extended by:
- Forwardable
- Includes:
- OsCtl::Lib::Utils::File, Helpers::Common
- Defined in:
- lib/osctld/dist_config/network/base.rb
Direct Known Subclasses
Ifupdown, Netctl, Netifrc, NetworkManager, RedHatInitScripts, RedHatNetworkManager, SuseSysconfig, SystemdNetworkd
Instance Attribute Summary collapse
-
#configurator ⇒ Object
readonly
protected
Returns the value of attribute configurator.
Instance Method Summary collapse
-
#add_netif(netifs, netif) ⇒ Object
Called when a new network interface is added to a container.
- #configure(netifs) ⇒ Object
-
#initialize(configurator) ⇒ Base
constructor
A new instance of Base.
-
#remove_netif(netifs, netif) ⇒ Object
Called when a network interface is removed from a container.
-
#rename_netif(netifs, netif, old_name) ⇒ Object
Called when an existing network interface is renamed.
-
#usable? ⇒ Boolean
Return true if this class can be used to configure the network.
Methods included from Helpers::Common
#systemd_service_enabled?, #systemd_service_masked?, #writable?
Constructor Details
#initialize(configurator) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/osctld/dist_config/network/base.rb', line 12 def initialize(configurator) @configurator = configurator end |
Instance Attribute Details
#configurator ⇒ Object (readonly, protected)
Returns the value of attribute configurator.
45 46 47 |
# File 'lib/osctld/dist_config/network/base.rb', line 45 def configurator @configurator end |
Instance Method Details
#add_netif(netifs, netif) ⇒ Object
Called when a new network interface is added to a container
30 |
# File 'lib/osctld/dist_config/network/base.rb', line 30 def add_netif(netifs, netif); end |
#configure(netifs) ⇒ Object
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
35 |
# File 'lib/osctld/dist_config/network/base.rb', line 35 def remove_netif(netifs, netif); end |
#rename_netif(netifs, netif, old_name) ⇒ Object
Called when an existing network interface is renamed
41 |
# File 'lib/osctld/dist_config/network/base.rb', line 41 def rename_netif(netifs, netif, old_name); end |
#usable? ⇒ Boolean
Return true if this class can be used to configure the network
18 19 20 |
# File 'lib/osctld/dist_config/network/base.rb', line 18 def usable? false end |