Class: Lumberg::Cpanel::Net
- Defined in:
- lib/lumberg/cpanel/net.rb
Overview
Public: Allows users to access networking functions
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Whm::Base
Instance Method Summary collapse
-
#query_hostname(options = {}) ⇒ Object
Public: Performs an A record DNS query for the hostname presented via the ‘host’ variable, with a 60 second timeout.
-
#traceroute ⇒ Object
Public: Perform a traceroute back to your local IP address while displaying packet speed at each hop in milliseconds.
Methods inherited from Base
api_module, #initialize, #perform_request
Methods inherited from Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Cpanel::Base
Instance Method Details
#query_hostname(options = {}) ⇒ Object
Public: Performs an A record DNS query for the hostname presented via the ‘host’ variable, with a 60 second timeout. If more than one A record exists for a given FQDN, all will be returned.
options - Hash options for API call params (default: {})
:host - String fully qualified domain name, either host.domain.com or
domain.com
Returns Hash API response
22 23 24 |
# File 'lib/lumberg/cpanel/net.rb', line 22 def query_hostname( = {}) perform_request({ api_function: 'dnszone' }.merge()) end |
#traceroute ⇒ Object
Public: Perform a traceroute back to your local IP address while displaying packet speed at each hop in milliseconds.
Returns Hash API response
9 10 11 |
# File 'lib/lumberg/cpanel/net.rb', line 9 def traceroute perform_request({ api_function: 'traceroute' }) end |