Fixing certificate names. (#337)

This commit is contained in:
kevgliss 2016-05-27 12:00:10 -07:00
parent 11f4bd503b
commit 76037e8b3a
2 changed files with 4 additions and 4 deletions

View File

@ -83,8 +83,8 @@ class AWSSourcePlugin(SourcePlugin):
cert_body, cert_chain = iam.get_cert_from_arn(arn) cert_body, cert_chain = iam.get_cert_from_arn(arn)
cert_name = iam.get_name_from_arn(arn) cert_name = iam.get_name_from_arn(arn)
cert = dict( cert = dict(
public_certificate=cert_body, body=cert_body,
intermediate_certificate=cert_chain, chain=cert_chain,
name=cert_name name=cert_name
) )
certs.append(cert) certs.append(cert)

View File

@ -20,7 +20,7 @@ def _disassociate_certs_from_source(current_certificates, found_certificates, so
missing = [] missing = []
for cc in current_certificates: for cc in current_certificates:
for fc in found_certificates: for fc in found_certificates:
if fc['public_certificate'] == cc.body: if fc['body'] == cc.body:
break break
else: else:
missing.append(cc) missing.append(cc)
@ -81,7 +81,7 @@ def sync(labels=None):
certificates = s.get_certificates(source.options) certificates = s.get_certificates(source.options)
for certificate in certificates: for certificate in certificates:
exists = cert_service.find_duplicates(certificate['public_certificate']) exists = cert_service.find_duplicates(certificate['body'])
if not exists: if not exists:
sync_create(certificate, source) sync_create(certificate, source)