lib/ruby_nsx_cli/nsx_objects/nsx_virtualwire.rb
def check_virtual_wire_exists(name, scope_id)
      api_endpoint = "/api/2.0/vdn/scopes/#{scope_id}/virtualwires?startindex=0&pagesize=1000"
      xml = get(api_endpoint)
      doc = Nokogiri::XML(xml)
      virtualwires = doc.css('virtualWire')
      virtualwires.map {|vwire| return vwire.at('objectId').text if vwire.at('name').text == name}
      return nil
    end
# Checks if a virtaul wire exists by querying the API for a list of virtual wires for the specified scope
#
# @param name [String] Name of the virtualwire
# @param scope_id [String] vdnscope to check for the virtualwire
# @return [String] virtualwire id if it exists; otherwise nil
Checks if a virtaul wire exists by querying the API for a list of virtual wires for the specified scope
Checks if a virtaul wire exists by querying the API for a list of virtual wires for the specified scope
def check_virtual_wire_exists(name, scope_id)
      api_endpoint = "/api/2.0/vdn/scopes/#{scope_id}/virtualwires?startindex=0&pagesize=1000"
      xml = get(api_endpoint)
      doc = Nokogiri::XML(xml)
      virtualwires = doc.css('virtualWire')
      virtualwires.map {|vwire| return vwire.at('objectId').text if vwire.at('name').text == name}
      return nil
    end
def check_virtual_wire_exists ( name , scope_id ) api_endpoint = "/api/2.0/vdn/scopes/#{scope_id}/virtualwires?startindex=0&pagesize=1000" xml = get ( api_endpoint ) doc = Nokogiri :: XML ( xml ) virtualwires = doc . css ( 'virtualWire' ) virtualwires . map { | vwire | return vwire . at ( 'objectId' ) . text if vwire . at ( 'name' ) . text == name } return nil end
Checks if a virtaul wire exists by querying the API for a list of virtual wires for the specified scope
Checks if a virtaul wire exists by querying the API for a list of virtual wires for the specified scope
virtualwire id if it exists; otherwise nil
virtualwire id if it exists ; otherwise nil
String
name
Name of the virtualwire
Name of the virtualwire
scope_id
vdnscope to check for the virtualwire
vdnscope to check for the virtualwire