Class: IControl::System::Inet
- Inherits:
-
Base
- Object
- Base
- IControl::System::Inet
- Defined in:
- lib/icontrol/system/inet.rb,
lib/icontrol/system.rb
Overview
The Inet interface exposes the internal API functionality that you can use to manipulate the rc.conf and resolv.conf files. The ntp.conf file includes the functionality that you can use to set and get the following settings: host name, IP address (get only), router, NTP server and DNS server.
Instance Method Summary collapse
-
#dns_server_address ⇒ String
Gets the IP addresses that the device is using as its DNS servers.
-
#hostname ⇒ String
Gets the host name of the device.
-
#hostname_to_ip ⇒ String
Translate this hostname to IP addresses.
-
#ip_to_hostname(opts) ⇒ String
Translate this IP addresses into hostname.
-
#ntp_server_address ⇒ String
Gets the IP address/host name that that the device is using for its NTP service.
-
#service_name_to_service_number(opts) ⇒ long
Translate this service names to service numbers.
-
#service_number_to_service_name(opts) ⇒ String
Translate this service numbers into service names.
-
#set_hostname(opts) ⇒ Object
Sets the host name of the device.
-
#set_ntp_server_address(opts) ⇒ Object
Configures the IP address/host name that the device uses for its NTP service.
-
#version ⇒ String
Gets the version information for this interface.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IControl::Base
Instance Method Details
#dns_server_address ⇒ String
Gets the IP addresses that the device is using as its DNS servers.
18 19 20 |
# File 'lib/icontrol/system/inet.rb', line 18 def dns_server_address super end |
#hostname ⇒ String
Gets the host name of the device.
29 30 31 |
# File 'lib/icontrol/system/inet.rb', line 29 def hostname super end |
#hostname_to_ip ⇒ String
Translate this hostname to IP addresses.
59 60 61 |
# File 'lib/icontrol/system/inet.rb', line 59 def hostname_to_ip super end |
#ip_to_hostname(opts) ⇒ String
Translate this IP addresses into hostname.
72 73 74 75 |
# File 'lib/icontrol/system/inet.rb', line 72 def ip_to_hostname(opts) opts = check_params(opts,[:ip_addresses]) super(opts) end |
#ntp_server_address ⇒ String
Gets the IP address/host name that that the device is using for its NTP service.
40 41 42 |
# File 'lib/icontrol/system/inet.rb', line 40 def ntp_server_address super end |
#service_name_to_service_number(opts) ⇒ long
Translate this service names to service numbers. If a service name can not be translated into an equivalent service number, a service number of 0 will be returned for that service name.
88 89 90 91 |
# File 'lib/icontrol/system/inet.rb', line 88 def service_name_to_service_number(opts) opts = check_params(opts,[:service_names]) super(opts) end |
#service_number_to_service_name(opts) ⇒ String
Translate this service numbers into service names. If an service number can not be translated into an equivalent service name, the string format of the service number will be returned.
104 105 106 107 |
# File 'lib/icontrol/system/inet.rb', line 104 def service_number_to_service_name(opts) opts = check_params(opts,[:services]) super(opts) end |
#set_hostname(opts) ⇒ Object
Sets the host name of the device.
117 118 119 120 |
# File 'lib/icontrol/system/inet.rb', line 117 def set_hostname(opts) opts = check_params(opts,[:hostname]) super(opts) end |
#set_ntp_server_address(opts) ⇒ Object
Configures the IP address/host name that the device uses for its NTP service.
130 131 132 133 |
# File 'lib/icontrol/system/inet.rb', line 130 def set_ntp_server_address(opts) opts = check_params(opts,[:ntp_addresses]) super(opts) end |
#version ⇒ String
Gets the version information for this interface.
48 49 50 |
# File 'lib/icontrol/system/inet.rb', line 48 def version super end |