Exemple #1
0
    def _delete_domain_on_target(self, context, target, domain):
        """
        :param context: Security context information.
        :param target: Target to delete Domain from
        :param domain: Domain to be deleted
        :return: True/False
        """
        LOG.debug("Deleting domain %s on target %s", domain.name, target.id)

        backend = self.target_backends[target.id]
        retries = 0

        while retries < self.max_retries:
            try:
                backend.delete_domain(context, domain)

                return True
            except Exception:
                retries += 1
                LOG.exception(_LE("Failed to delete domain %(domain)s on "
                             "target %(target)s on attempt %(attempt)d"),
                        {
                           'domain': domain.name,
                           'target': target.id,
                           'attempt': retries
                        })
                time.sleep(self.retry_interval)

        return False
Exemple #2
0
    def _delete_domain_on_target(self, context, target, domain):
        """
        :param context: Security context information.
        :param target: Target to delete Domain from
        :param domain: Domain to be deleted
        :return: True/False
        """
        LOG.debug("Deleting domain %s on target %s", domain.name, target.id)

        backend = self.target_backends[target.id]
        retries = 0

        while retries < self.max_retries:
            try:
                backend.delete_domain(context, domain)

                return True
            except Exception:
                retries += 1
                LOG.exception(
                    _LE("Failed to delete domain %(domain)s on "
                        "target %(target)s on attempt %(attempt)d"), {
                            'domain': domain.name,
                            'target': target.id,
                            'attempt': retries
                        })
                time.sleep(self.retry_interval)

        return False
Exemple #3
0
    def _delete_domain_on_target(self, context, target, domain):
        """
        :param context: Security context information.
        :param target: Target to delete Domain from
        :param domain: Domain to be deleted
        :return: True/False
        """
        LOG.debug("Deleting domain %s on target %s", domain.name, target.id)

        backend = self.target_backends[target.id]

        try:
            backend.delete_domain(context, domain)

            return True
        except Exception:
            LOG.exception(_LE("Failed to delete domain %(domain)s on target "
                              "%(target)s"),
                          {'domain': domain.name, 'target': target.id})
            return False
Exemple #4
0
    def _delete_domain_on_target(self, context, target, domain):
        """
        :param context: Security context information.
        :param target: Target to delete Domain from
        :param domain: Domain to be deleted
        :return: True/False
        """
        LOG.debug("Deleting domain %s on target %s", domain.name, target.id)

        backend = self.target_backends[target.id]

        try:
            backend.delete_domain(context, domain)

            return True
        except Exception:
            LOG.exception(
                _LE("Failed to delete domain %(domain)s on target "
                    "%(target)s"), {
                        'domain': domain.name,
                        'target': target.id
                    })
            return False