Example #1
0
File: plugin.py Project: ejcx/lemur
    def clean(self, options, **kwargs):
        account_number = self.get_option('accountNumber', options)
        certificates = self.get_certificates(options)
        endpoints = self.get_endpoints(options)

        orphaned = []
        for certificate in certificates:
            for endpoint in endpoints:
                if certificate['name'] == endpoint['certificate_name']:
                    break
            else:
                orphaned.append(certificate['name'])
                iam.delete_cert(account_number, certificate)

        return orphaned
Example #2
0
    def clean(self, options, **kwargs):
        account_number = self.get_option('accountNumber', options)
        certificates = self.get_certificates(options)
        endpoints = self.get_endpoints(options)

        orphaned = []
        for certificate in certificates:
            for endpoint in endpoints:
                if certificate['name'] == endpoint['certificate_name']:
                    break
            else:
                orphaned.append(certificate['name'])
                iam.delete_cert(account_number, certificate)

        return orphaned
Example #3
0
 def clean(self, certificate, options, **kwargs):
     account_number = self.get_option("accountNumber", options)
     iam.delete_cert(certificate.name, account_number=account_number)
Example #4
0
 def clean(self, certificate, options, **kwargs):
     account_number = self.get_option('accountNumber', options)
     iam.delete_cert(certificate.name, account_number=account_number)