Class: Pangea::Network
Instance Method Summary collapse
-
#default_gateway ⇒ Object
Returns a string or nil if the gateway is not defined.
-
#default_netmask ⇒ Object
Returns a string or nil if the netmask is not defined.
-
#initialize(link, ref) ⇒ Network
constructor
:nodoc:.
- #label ⇒ Object
-
#vifs ⇒ Object
Virtual Interfaces bridged to the network bridge.
Methods inherited from XObject
Constructor Details
#initialize(link, ref) ⇒ Network
:nodoc:
626 627 628 629 |
# File 'lib/pangea/objects.rb', line 626 def initialize(link, ref) #:nodoc: super(link, ref) @proxy_name = 'network' end |
Instance Method Details
#default_gateway ⇒ Object
Returns a string or nil if the gateway is not defined.
xen-api: network.get_default_gateway
641 642 643 644 645 |
# File 'lib/pangea/objects.rb', line 641 def default_gateway gw = ref_call :get_default_gateway return nil if gw.strip.chomp.empty? gw end |
#default_netmask ⇒ Object
Returns a string or nil if the netmask is not defined.
xen-api: network.get_default_netmask
653 654 655 656 657 |
# File 'lib/pangea/objects.rb', line 653 def default_netmask nm = ref_call :get_default_netmask return nil if nm.strip.chomp.empty? gw end |
#label ⇒ Object
631 632 633 |
# File 'lib/pangea/objects.rb', line 631 def label ref_call :get_name_label end |