Techdebt: Update ACM coverage doc (#7472)
This commit is contained in:
parent
e4ac65f7cb
commit
69fc969e98
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
## acm
|
## acm
|
||||||
<details>
|
<details>
|
||||||
<summary>40% implemented</summary>
|
<summary>60% implemented</summary>
|
||||||
|
|
||||||
- [X] add_tags_to_certificate
|
- [X] add_tags_to_certificate
|
||||||
- [X] delete_certificate
|
- [X] delete_certificate
|
||||||
- [ ] describe_certificate
|
- [X] describe_certificate
|
||||||
- [X] export_certificate
|
- [X] export_certificate
|
||||||
- [ ] get_account_configuration
|
- [ ] get_account_configuration
|
||||||
- [X] get_certificate
|
- [X] get_certificate
|
||||||
- [ ] import_certificate
|
- [X] import_certificate
|
||||||
- [ ] list_certificates
|
- [X] list_certificates
|
||||||
- [ ] list_tags_for_certificate
|
- [ ] list_tags_for_certificate
|
||||||
- [ ] put_account_configuration
|
- [ ] put_account_configuration
|
||||||
- [X] remove_tags_from_certificate
|
- [X] remove_tags_from_certificate
|
||||||
|
@ -16,12 +16,12 @@ acm
|
|||||||
|
|
||||||
- [X] add_tags_to_certificate
|
- [X] add_tags_to_certificate
|
||||||
- [X] delete_certificate
|
- [X] delete_certificate
|
||||||
- [ ] describe_certificate
|
- [X] describe_certificate
|
||||||
- [X] export_certificate
|
- [X] export_certificate
|
||||||
- [ ] get_account_configuration
|
- [ ] get_account_configuration
|
||||||
- [X] get_certificate
|
- [X] get_certificate
|
||||||
- [ ] import_certificate
|
- [X] import_certificate
|
||||||
- [ ] list_certificates
|
- [X] list_certificates
|
||||||
- [ ] list_tags_for_certificate
|
- [ ] list_tags_for_certificate
|
||||||
- [ ] put_account_configuration
|
- [ ] put_account_configuration
|
||||||
- [X] remove_tags_from_certificate
|
- [X] remove_tags_from_certificate
|
||||||
|
@ -454,7 +454,7 @@ class AWSCertificateManagerBackend(BaseBackend):
|
|||||||
"expires": utcnow() + datetime.timedelta(hours=1),
|
"expires": utcnow() + datetime.timedelta(hours=1),
|
||||||
}
|
}
|
||||||
|
|
||||||
def import_cert(
|
def import_certificate(
|
||||||
self,
|
self,
|
||||||
certificate: bytes,
|
certificate: bytes,
|
||||||
private_key: bytes,
|
private_key: bytes,
|
||||||
@ -492,13 +492,7 @@ class AWSCertificateManagerBackend(BaseBackend):
|
|||||||
|
|
||||||
return bundle.arn
|
return bundle.arn
|
||||||
|
|
||||||
def get_certificates_list(self, statuses: List[str]) -> Iterable[CertBundle]:
|
def list_certificates(self, statuses: List[str]) -> Iterable[CertBundle]:
|
||||||
"""
|
|
||||||
Get list of certificates
|
|
||||||
|
|
||||||
:return: List of certificates
|
|
||||||
:rtype: list of CertBundle
|
|
||||||
"""
|
|
||||||
for arn in self._certificates.keys():
|
for arn in self._certificates.keys():
|
||||||
cert = self.get_certificate(arn)
|
cert = self.get_certificate(arn)
|
||||||
if not statuses or cert.status in statuses:
|
if not statuses or cert.status in statuses:
|
||||||
@ -512,6 +506,9 @@ class AWSCertificateManagerBackend(BaseBackend):
|
|||||||
cert_bundle.check()
|
cert_bundle.check()
|
||||||
return cert_bundle
|
return cert_bundle
|
||||||
|
|
||||||
|
def describe_certificate(self, arn: str) -> CertBundle:
|
||||||
|
return self.get_certificate(arn)
|
||||||
|
|
||||||
def delete_certificate(self, arn: str) -> None:
|
def delete_certificate(self, arn: str) -> None:
|
||||||
if arn not in self._certificates:
|
if arn not in self._certificates:
|
||||||
raise CertificateNotFound(arn=arn, account_id=self.account_id)
|
raise CertificateNotFound(arn=arn, account_id=self.account_id)
|
||||||
|
@ -57,7 +57,7 @@ class AWSCertificateManagerResponse(BaseResponse):
|
|||||||
dict(status=400),
|
dict(status=400),
|
||||||
)
|
)
|
||||||
|
|
||||||
cert_bundle = self.acm_backend.get_certificate(arn)
|
cert_bundle = self.acm_backend.describe_certificate(arn)
|
||||||
|
|
||||||
return json.dumps(cert_bundle.describe())
|
return json.dumps(cert_bundle.describe())
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class AWSCertificateManagerResponse(BaseResponse):
|
|||||||
"The certificate chain is not PEM-encoded or is not valid."
|
"The certificate chain is not PEM-encoded or is not valid."
|
||||||
)
|
)
|
||||||
|
|
||||||
arn = self.acm_backend.import_cert(
|
arn = self.acm_backend.import_certificate(
|
||||||
certificate, private_key, chain=chain, arn=current_arn, tags=tags
|
certificate, private_key, chain=chain, arn=current_arn, tags=tags
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ class AWSCertificateManagerResponse(BaseResponse):
|
|||||||
def list_certificates(self) -> str:
|
def list_certificates(self) -> str:
|
||||||
certs = []
|
certs = []
|
||||||
statuses = self._get_param("CertificateStatuses")
|
statuses = self._get_param("CertificateStatuses")
|
||||||
for cert_bundle in self.acm_backend.get_certificates_list(statuses):
|
for cert_bundle in self.acm_backend.list_certificates(statuses):
|
||||||
certs.append(cert_bundle.describe()["Certificate"])
|
certs.append(cert_bundle.describe()["Certificate"])
|
||||||
|
|
||||||
result = {"CertificateSummaryList": certs}
|
result = {"CertificateSummaryList": certs}
|
||||||
|
Loading…
Reference in New Issue
Block a user