Started ACM framework
This commit is contained in:
parent
606fa0afb5
commit
9e19243310
6
moto/acm/__init__.py
Normal file
6
moto/acm/__init__.py
Normal file
@ -0,0 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
from .models import acm_backends
|
||||
from ..core.models import base_decorator
|
||||
|
||||
acm_backend = acm_backends['us-east-1']
|
||||
mock_acm = base_decorator(acm_backends)
|
19
moto/acm/models.py
Normal file
19
moto/acm/models.py
Normal file
@ -0,0 +1,19 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.ec2 import ec2_backends
|
||||
|
||||
|
||||
class Certificate(BaseModel):
|
||||
pass
|
||||
|
||||
|
||||
class AWSCertificateManagerBackend(BaseBackend):
|
||||
|
||||
def __init__(self):
|
||||
self._certificates = {}
|
||||
|
||||
|
||||
acm_backends = {}
|
||||
for region, ec2_backend in ec2_backends.items():
|
||||
acm_backends[region] = AWSCertificateManagerBackend()
|
50
moto/acm/responses.py
Normal file
50
moto/acm/responses.py
Normal file
@ -0,0 +1,50 @@
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
|
||||
from moto.core.responses import BaseResponse
|
||||
from .models import acm_backends
|
||||
|
||||
|
||||
class AWSCertificateManagerResponse(BaseResponse):
|
||||
|
||||
@property
|
||||
def acm_backend(self):
|
||||
return acm_backends[self.region]
|
||||
|
||||
@property
|
||||
def request_params(self):
|
||||
try:
|
||||
return json.loads(self.body)
|
||||
except ValueError:
|
||||
return {}
|
||||
|
||||
def _get_param(self, param, default=None):
|
||||
return self.request_params.get(param, default)
|
||||
|
||||
def add_tags_to_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def delete_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def describe_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def import_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def list_certificates(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def list_tags_for_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def remove_tags_from_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def request_certificate(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def resend_validation_email(self):
|
||||
raise NotImplementedError()
|
||||
|
10
moto/acm/urls.py
Normal file
10
moto/acm/urls.py
Normal file
@ -0,0 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
from .responses import AWSCertificateManagerResponse
|
||||
|
||||
url_bases = [
|
||||
"https?://acm.(.+).amazonaws.com",
|
||||
]
|
||||
|
||||
url_paths = {
|
||||
'{0}/$': AWSCertificateManagerResponse.dispatch,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user