示例#1
0
    def domain_list(self):
        bucket_name = self.site.config.get(self.config_bucket_name)

        if not bucket_name:
            logger.warning("No bucket name")
            return

        aws_access_key, aws_secret_key = self.credentials_manager.get_credentials(
        )
        domain = AWSDomain(aws_access_key, aws_secret_key, bucket_name)

        try:
            domain_list = domain.nameServers()
        except DNSServerError as e:
            print(e)
            ipc.signal("domain.list.error", {"errorKey": "AccountDisabled"})
            logger.error("Account cannot use route 53")
            logger.error(e)
            return

        if domain_list:
            ipc.signal("domain.list.result", {"nameservers": domain_list})
            for domain in domain_list:
                logger.info(domain)
        else:
            logger.error("No name servers configured")
示例#2
0
    def domain_list(self):
        bucket_name = self.site.config.get(self.config_bucket_name)

        if not bucket_name:
            logger.warning("No bucket name")
            return

        aws_access_key, aws_secret_key = self.credentials_manager.get_credentials()
        domain = AWSDomain(aws_access_key, aws_secret_key, bucket_name)

        try:
            domain_list = domain.nameServers()
        except DNSServerError as e:
            print(e)
            ipc.signal("domain.list.error", {"errorKey": "AccountDisabled"})
            logger.error("Account cannot use route 53")
            logger.error(e)
            return

        if domain_list:
            ipc.signal("domain.list.result", {"nameservers": domain_list})
            for domain in domain_list:
                logger.info(domain)
        else:
            logger.error("No name servers configured")
示例#3
0
文件: engine.py 项目: ateszdn/Cactus
    def domain_setup(self):
        bucket_name = self.site.config.get(self.config_bucket_name)
        if not bucket_name:
            logger.warning("No bucket name")
            return

        aws_access_key, aws_secret_key = self.credentials_manager.get_credentials()
        domain = AWSDomain(aws_access_key, aws_secret_key, bucket_name)

        try:
            domain.setup()
        except DNSServerError, e:
            logger.debug(e)
            ipc.signal("domain.setup.error", {"errorKey": "AccountDisabled"})
            logger.error("Account cannot use route 53")
            logger.error(e)
示例#4
0
    def domain_setup(self):
        bucket_name = self.site.config.get(self.config_bucket_name)
        if not bucket_name:
            logger.warning("No bucket name")
            return

        aws_access_key, aws_secret_key = self.credentials_manager.get_credentials(
        )
        domain = AWSDomain(aws_access_key, aws_secret_key, bucket_name)

        try:
            domain.setup()
        except DNSServerError, e:
            logger.debug(e)
            ipc.signal("domain.setup.error", {"errorKey": "AccountDisabled"})
            logger.error("Account cannot use route 53")
            logger.error(e)