Renamed SliceDeployment back to SliceDeployments
diff --git a/planetstack/ec2_observer/deleters/site_deleter.py b/planetstack/ec2_observer/deleters/site_deleter.py
index 88a4008..b8ca6a1 100644
--- a/planetstack/ec2_observer/deleters/site_deleter.py
+++ b/planetstack/ec2_observer/deleters/site_deleter.py
@@ -1,14 +1,14 @@
-from core.models import Site, SiteDeployment
+from core.models import Site, SiteDeployments
from observer.deleter import Deleter
-from observer.deleters.site_deployment_deleter import SiteDeploymentDeleter
+from observer.deleters.site_deployment_deleter import SiteDeploymentsDeleter
class SiteDeleter(Deleter):
model='Site'
def call(self, pk):
site = Site.objects.get(pk=pk)
- site_deployments = SiteDeployment.objects.filter(site=site)
- site_deployment_deleter = SiteDeploymentDeleter()
+ site_deployments = SiteDeployments.objects.filter(site=site)
+ site_deployment_deleter = SiteDeploymentsDeleter()
for site_deployment in site_deployments:
site_deployment_deleter(site_deployment.id)
site.delete()
diff --git a/planetstack/ec2_observer/deleters/site_deployment_deleter.py b/planetstack/ec2_observer/deleters/site_deployment_deleter.py
index db344cd..cc71d43 100644
--- a/planetstack/ec2_observer/deleters/site_deployment_deleter.py
+++ b/planetstack/ec2_observer/deleters/site_deployment_deleter.py
@@ -1,11 +1,11 @@
-from core.models import Site, SiteDeployment
+from core.models import Site, SiteDeployments
from observer.deleter import Deleter
-class SiteDeploymentDeleter(Deleter):
- model='SiteDeployment'
+class SiteDeploymentsDeleter(Deleter):
+ model='SiteDeployments'
def call(self, pk):
- site_deployment = SiteDeployment.objects.get(pk=pk)
+ site_deployment = SiteDeployments.objects.get(pk=pk)
if site_deployment.tenant_id:
driver = self.driver.admin_driver(deployment=site_deployment.deployment.name)
driver.delete_tenant(site_deployment.tenant_id)