lib/ruby_nsx_cli/nsx_objects/nsx_edge.rb
# Checks if the specified edge already has the port group or virtualwire attached
#
# @param edge_id [String] Edge ID to check if the interface is attached to
# @param connected_to_id [String] ID of the virtualwire or port group of the interface
# @return [String] XML string containing the configuration for the interface if it exists; otherwise nil
Checks if the specified edge already has the port group or virtualwire attached
Checks if the specified edge already has the port group or virtualwire attached
def check_interface_exists(edge_id, connected_to_id)
      api_endpoint = "/api/4.0/edges/#{edge_id}/interfaces"
      doc = Nokogiri::XML(get(api_endpoint))
      interfaces = doc.css('interface')
      interfaces.map {|interface| return strip_xml_root_pi(interface) if interface.at('connectedToId').text == connected_to_id}
      return nil
    end
def check_interface_exists ( edge_id , connected_to_id ) api_endpoint = "/api/4.0/edges/#{edge_id}/interfaces" doc = Nokogiri :: XML ( get ( api_endpoint ) ) interfaces = doc . css ( 'interface' ) interfaces . map { | interface | return strip_xml_root_pi ( interface ) if interface . at ( 'connectedToId' ) . text == connected_to_id } return nil end
Checks if the specified edge already has the port group or virtualwire attached
Checks if the specified edge already has the port group or virtualwire attached
XML string containing the configuration for the interface if it exists; otherwise nil
XML string containing the configuration for the interface if it exists ; otherwise nil
String
edge_id
Edge ID to check if the interface is attached to
Edge ID to check if the interface is attached to
connected_to_id
ID of the virtualwire or port group of the interface
ID of the virtualwire or port group of the interface