class NSXDriver::LogicalSwitch
Class Logical Switch
Attributes
ATTRIBUTES
Public Class Methods
Source
# File lib/logical_switch.rb, line 50 def self.nsx_nics(template_xml, only_new_attached = true) if only_new_attached == true nics = template_xml.xpath('//TEMPLATE/NIC[ATTACH="YES"]') else nics = template_xml.xpath('//TEMPLATE/NIC') end nics_array = [] nics.each do |nic| network_id = nic.xpath('NETWORK_ID').text # Check Networks exists one_vnet = VCenterDriver::VIHelper .one_item(OpenNebula::VirtualNetwork, network_id) rc = one_vnet.info if OpenNebula.is_error?(rc) err_msg = rc.message raise err_msg end pg_type = one_vnet['TEMPLATE/VCENTER_PORTGROUP_TYPE'] nics_array << nic if [NSXConstants::NSXV_LS_TYPE, NSXConstants::NSXT_LS_TYPE] .include?(pg_type) end nics_array end
Return nsx nics of type NSX-V and NSX-T If only_new_attached = true –> Only returns new attached nsx nics
Public Instance Methods
Source
# File lib/logical_switch.rb, line 43 def delete_logical_switch; end
Delete a logical switch
Source
# File lib/logical_switch.rb, line 37 def ls_tz; end
Get the Transport Zone of the logical switch
Source
# File lib/logical_switch.rb, line 40 def new_logical_switch(ls_data); end
Create a new logical switch
Source
# File lib/logical_switch.rb, line 46 def update_logical_switch; end
Update a logical switch