def ml_init(self, hostname): print("{0}: initialize host...".format(hostname)) try: host = MarkLogic.instance_init(hostname) except UnauthorizedAPIRequest: # Assume that this happened because the host is already initialized host = Host(hostname) return host.just_initialized()
def ml_init(self, hostname): print("{0}: initialize host...".format(hostname)) try: host = MarkLogic.instance_init(hostname) except UnauthorizedAPIRequest: # Assume that this happened because the host is already initialized host = Host(hostname) return host.just_initialized()
def ml_init(self, ip, container): if container in self.hostname: hostname = self.hostname[container] else: hostname = container print("{0}: initialize host {1}...".format(ip,hostname)) try: host = MarkLogic.instance_init(ip) except UnauthorizedAPIRequest: # Assume that this happened because the host is already initialized host = Host(ip) self.blacklist[container] = "used" self.save_blacklist() return host.just_initialized()
def ml_init(self, ip, container): if container in self.hostname: hostname = self.hostname[container] else: hostname = container print("{0}: initialize host {1}...".format(ip, hostname)) try: host = MarkLogic.instance_init(ip) except UnauthorizedAPIRequest: # Assume that this happened because the host is already initialized host = Host(ip) self.blacklist[container] = "used" self.save_blacklist() return host.just_initialized()