Exemple #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")
Exemple #2
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)