コード例 #1
0
    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()
コード例 #2
0
ファイル: make-cluster.py プロジェクト: DALDEI/ml-docker
    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()
コード例 #3
0
ファイル: docker-cluster.py プロジェクト: ndw/python_api_TEMP
    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()
コード例 #4
0
    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()