Module: OmfRc::ResourceProxy::Net

Includes:
OmfRc::ResourceProxyDSL, Util::Ip, Util::Sysfs
Defined in:
lib/omf_rc/resource_proxy/net.rb

Overview

Proxy for managing Ethernet interfaces

Net resources can be created as children of Node.

It is important to set if_name (interface_name) as they are used as identifier for executing ip commands.

Examples:

Bring up an Ethernet interface eth0 by setting an ip address

eth0 = node.create(:wlan, if_name: 'eth0')
eth0.configure_ip_addr("192.168.1.100/24")

See Also:

Constant Summary

Constants included from OmfRc::ResourceProxyDSL

OmfRc::ResourceProxyDSL::DEFAULT_PROP_ACCESS, OmfRc::ResourceProxyDSL::PROXY_DIR, OmfRc::ResourceProxyDSL::UTIL_DIR

Instance Attribute Summary collapse

Method Summary

Methods included from Util::Sysfs

#request_devices, #request_wlan_devices

Methods included from OmfRc::ResourceProxyDSL

#call_hook, #hook_defined?, included

Methods included from Util::Ip

#configure_ip_addr, #flush_ip_addrs, #interface_up, #request_ip_addr, #request_mac_addr

Instance Attribute Details

#if_nameObject

Interface name, default is ‘eth0’.



33
# File 'lib/omf_rc/resource_proxy/net.rb', line 33

property :if_name, :default => "eth0"