push environment deletion info to CSP

This commit is contained in:
dandds 2019-04-10 17:20:17 -04:00
parent a2e815afd9
commit e4c50da363
2 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,12 @@ class CloudProviderInterface:
""" """
raise NotImplementedError() raise NotImplementedError()
def delete_application(self, cloud_id): # pragma: no cover
"""Delete an application in the cloud with the provided cloud_id. Returns
True for success or raises an error.
"""
raise NotImplementedError()
def create_user(self, user): # pragma: no cover def create_user(self, user): # pragma: no cover
"""Create an account in the CSP for specified user. Returns the ID of """Create an account in the CSP for specified user. Returns the ID of
the created user. the created user.
@ -49,6 +55,11 @@ class MockCloudProvider(CloudProviderInterface):
cloud.""" cloud."""
return uuid4().hex return uuid4().hex
def delete_application(self, name):
"""Returns an id that represents what would be an application in the
cloud."""
return True
def create_user(self, user): def create_user(self, user):
"""Returns an id that represents what would be an user in the cloud.""" """Returns an id that represents what would be an user in the cloud."""
return uuid4().hex return uuid4().hex

View File

@ -111,4 +111,6 @@ class Environments(object):
if commit: if commit:
db.session.commit() db.session.commit()
app.csp.cloud.delete_application(environment.cloud_id)
return environment return environment