def get_hosts(sld, tld):
 opts = salt.utils.namecheap.get_opts('namecheap.domains.dns.gethosts')
 opts['TLD'] = tld
 opts['SLD'] = sld
 response_xml = salt.utils.namecheap.get_request(opts)
 if (response_xml is None):
  return {}
 domaindnsgethostsresult = response_xml.getElementsByTagName('DomainDNSGetHostsResult')[0]
 return salt.utils.namecheap.xml_to_dict(domaindnsgethostsresult)

def get_hosts ( sld , tld ) : opts = salt . utils . namecheap . get_opts ( 'namecheap.domains.dns.gethosts' ) opts [ 'TLD' ] = tld opts [ 'SLD' ] = sld response_xml = salt . utils . namecheap . get_request ( opts ) if ( response_xml is None ) : return { } domaindnsgethostsresult = response_xml . getElementsByTagName ( 'DomainDNSGetHostsResult' ) [ 0 ] return salt . utils . namecheap . xml_to_dict ( domaindnsgethostsresult )
retrieves dns host record settings for the requested domain .