lib/ruby_nsx_cli/nsx_objects/nsx_edge.rb
def check_simple_dhcp_pool_exists(edge_id, ip_range)
      api_endpoint = "/api/4.0/edges/#{edge_id}/dhcp/config"
      doc = Nokogiri::XML(get(api_endpoint))
      ip_pools = doc.css('ipPool')
      ip_pools.map {|ip_pool| return ip_pool.at('poolId').text if ip_pool.at('ipRange').text == ip_range}
      return nil
    end
# Checks if the specified edge already has the DHCP IP pool by checking if the ip_range has already been specified
#
# @param edge_id [String] Edge ID to check if the IP pool already exists
# @param ip_range [String] IP range of the DHCP IP pool
# @return [String] the ID of the DHCP pool if it exists; otherwise nil
Checks if the specified edge already has the DHCP IP pool by checking if the ip_range has already been specified
Checks if the specified edge already has the DHCP IP pool by checking if the ip_range has already been specified
def check_simple_dhcp_pool_exists(edge_id, ip_range)
      api_endpoint = "/api/4.0/edges/#{edge_id}/dhcp/config"
      doc = Nokogiri::XML(get(api_endpoint))
      ip_pools = doc.css('ipPool')
      ip_pools.map {|ip_pool| return ip_pool.at('poolId').text if ip_pool.at('ipRange').text == ip_range}
      return nil
    end
def check_simple_dhcp_pool_exists ( edge_id , ip_range ) api_endpoint = "/api/4.0/edges/#{edge_id}/dhcp/config" doc = Nokogiri :: XML ( get ( api_endpoint ) ) ip_pools = doc . css ( 'ipPool' ) ip_pools . map { | ip_pool | return ip_pool . at ( 'poolId' ) . text if ip_pool . at ( 'ipRange' ) . text == ip_range } return nil end
Checks if the specified edge already has the DHCP IP pool by checking if the ip_range has already been specified
Checks if the specified edge already has the DHCP IP pool by checking if the ip_range has already been specified
the ID of the DHCP pool if it exists; otherwise nil
the ID of the DHCP pool if it exists ; otherwise nil
String
edge_id
Edge ID to check if the IP pool already exists
Edge ID to check if the IP pool already exists
ip_range
IP range of the DHCP IP pool
IP range of the DHCP IP pool