Module: OmfRc::ResourceProxy::Net

Extended by:
OmfRc::ResourceProxyDSL::ClassMethods
Includes:
OmfRc::ResourceProxyDSL, Util::Ip, Util::Sysfs
Defined in:
omf_rc/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

Constant Summary

Constants included from OmfRc::ResourceProxyDSL

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

FRCP RC Properties (collapse)

Method Summary

Methods included from OmfRc::ResourceProxyDSL::ClassMethods

call_hook, configure, configure_all, extend_configure, extend_hook, extend_request, extend_work, hook, namespace, property, register_proxy, request, utility, work

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

- (Object) if_name

Note:

DSL method 'property' will generate configure_x, request_x, or initialise_x methods according to property's access mode (:configure, :read_only or :init_only)

Interface name, default is 'eth0'.



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

property :if_name, :default => "eth0"