Class: NSXDriver::LogicalPort

Inherits:
NSXComponent show all
Defined in:
lib/logical_port.rb

Overview

Class Logical Switch

Direct Known Subclasses

NSXTLogicalPort, NSXVLogicalPort

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NSXComponent

#initialize

Constructor Details

This class inherits a constructor from NSXDriver::NSXComponent

Class Method Details

.new_child(nsx_client, id = nil) ⇒ Object

ATTRIBUTES



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/logical_port.rb', line 23

def self.new_child(nsx_client, id = nil)
    case nsx_client.nsx_type.upcase
    when NSXConstants::NSXT
        NSXTLogicalPort.new(nsx_client, id)
    when NSXConstants::NSXV
        NSXVLogicalPort.new(nsx_client, id)
    else
        error_msg = "Unknown NSX type: #{type}"
        error = NSXError::UnknownObject.new(error_msg)
        raise error
    end
end

Instance Method Details

#lp?Boolean

Check if logical port exists

Returns:

  • (Boolean)


37
# File 'lib/logical_port.rb', line 37

def lp?; end

#lp_idObject

Get logical port id



40
# File 'lib/logical_port.rb', line 40

def lp_id; end

#lp_nameObject

Get logical port display name



43
# File 'lib/logical_port.rb', line 43

def lp_name; end

#lp_typeObject

Get resource type



46
# File 'lib/logical_port.rb', line 46

def lp_type; end