Пример #1
0
 def __resolveDnsName(self):
     resolver = DNSResolver(self.shell)
     ipAddress = resolver.resolveIpByNsLookup(self.dnsName)
     if not ipAddress:
         logger.warn("Ip address for machine name "+self.dnsName+" could not be retrieved")
         raise ValueError, "Ip address for machine name "+self.dnsName+" could not be retrieved"
     logger.debug('Resolved Ip is ' + ipAddress[0])
     self.ipAddress = ipAddress[0]
Пример #2
0
 def __resolveDnsName(self):
     resolver = DNSResolver(self.shell)
     ipAddress = resolver.resolveIpByNsLookup(self.dnsName)
     if not ipAddress:
         logger.warn("Ip address for machine name " + self.dnsName +
                     " could not be retrieved")
         raise ValueError, "Ip address for machine name " + self.dnsName + " could not be retrieved"
     logger.debug('Resolved Ip is ' + ipAddress[0])
     self.ipAddress = ipAddress[0]
Пример #3
0
 def reportDomainControllers(self, resultsVector):
     if self.domainFqdn:
         resolver = DNSResolver(self.client)
         ipList = resolver.resolveIpByNsLookup(self.domainFqdn)
         for ipAddress in ipList:
             logger.debug("Reporting Domain Controller for ip: " + ipAddress)
             hostOsh = modeling.createHostOSH(ipAddress)
             domainControllerOsh = modeling.createApplicationOSH("domaincontroller", "DomainController", hostOsh)
             modeling.setApplicationProductName(domainControllerOsh, "domain_controller")
             resultsVector.add(hostOsh)
             resultsVector.add(domainControllerOsh)
Пример #4
0
 def reportDomainControllers(self, resultsVector):
     if self.domainFqdn:
         resolver = DNSResolver(self.client)
         ipList = resolver.resolveIpByNsLookup(self.domainFqdn)
         for ipAddress in ipList:
             logger.debug('Reporting Domain Controller for ip: ' + ipAddress)
             hostOsh = modeling.createHostOSH(ipAddress)
             domainControllerOsh = modeling.createApplicationOSH('domaincontroller', "DomainController", hostOsh)
             modeling.setApplicationProductName(domainControllerOsh,'domain_controller')
             resultsVector.add(hostOsh)
             resultsVector.add(domainControllerOsh)