Add initial mock cloud provider class

This commit is contained in:
Patrick Smith 2019-01-04 14:44:06 -05:00
parent 2dba02e03c
commit 3dad43b1ee
2 changed files with 18 additions and 0 deletions

View File

@ -1,9 +1,11 @@
from .cloud import MockCloudProvider
from .files import RackspaceFileProvider
from .reports import MockReportingProvider
class MockCSP:
def __init__(self, app):
self.cloud = MockCloudProvider()
self.files = RackspaceFileProvider(app)
self.reports = MockReportingProvider()

16
atst/domain/csp/cloud.py Normal file
View File

@ -0,0 +1,16 @@
from uuid import uuid4
class CloudProviderInterface:
def create_application(self, name): # pragma: no cover
"""Create an application in the cloud with the provided name. Returns
the ID of the created object.
"""
raise NotImplementedError()
class MockCloudProvider(CloudProviderInterface):
def create_application(self, name):
"""Returns an id that represents what would be an application in the
cloud."""
return uuid4().hex