Renamed SliceDeployment back to SliceDeployments
diff --git a/planetstack/ec2_observer/deleters/slice_deleter.py b/planetstack/ec2_observer/deleters/slice_deleter.py
index e7c54e6..7e9dfd4 100644
--- a/planetstack/ec2_observer/deleters/slice_deleter.py
+++ b/planetstack/ec2_observer/deleters/slice_deleter.py
@@ -1,6 +1,6 @@
-from core.models import Slice, SliceDeployment, User
+from core.models import Slice, SliceDeployments, User
from observer.deleter import Deleter
-from observer.deleters.slice_deployment_deleter import SliceDeploymentDeleter
+from observer.deleters.slice_deployment_deleter import SliceDeploymentsDeleter
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
@@ -10,8 +10,8 @@
def call(self, pk):
slice = Slice.objects.get(pk=pk)
- slice_deployment_deleter = SliceDeploymentDeleter()
- for slice_deployment in SliceDeployment.objects.filter(slice=slice):
+ slice_deployment_deleter = SliceDeploymentsDeleter()
+ for slice_deployment in SliceDeployments.objects.filter(slice=slice):
try:
slice_deployment_deleter(slice_deployment.id)
except:
diff --git a/planetstack/ec2_observer/deleters/slice_deployment_deleter.py b/planetstack/ec2_observer/deleters/slice_deployment_deleter.py
index 31d26fb..6f1aec0 100644
--- a/planetstack/ec2_observer/deleters/slice_deployment_deleter.py
+++ b/planetstack/ec2_observer/deleters/slice_deployment_deleter.py
@@ -1,12 +1,12 @@
-from core.models import Slice, SliceDeployment, User
+from core.models import Slice, SliceDeployments, User
from observer.deleter import Deleter
from openstack.driver import OpenStackDriver
-class SliceDeploymentDeleter(Deleter):
- model='SliceDeployment'
+class SliceDeploymentsDeleter(Deleter):
+ model='SliceDeployments'
def call(self, pk):
- slice_deployment = SliceDeployment.objects.get(pk=pk)
+ slice_deployment = SliceDeployments.objects.get(pk=pk)
user = User.objects.get(id=slice_deployment.slice.creator.id)
driver = OpenStackDriver().admin_driver(deployment=slice_deployment.deployment.name)
client_driver = driver.client_driver(caller=user,
diff --git a/planetstack/ec2_observer/deleters/sliver_deleter.py b/planetstack/ec2_observer/deleters/sliver_deleter.py
index 732e535..097f0f7 100644
--- a/planetstack/ec2_observer/deleters/sliver_deleter.py
+++ b/planetstack/ec2_observer/deleters/sliver_deleter.py
@@ -1,4 +1,4 @@
-from core.models import Sliver, SliceDeployment
+from core.models import Sliver, SliceDeployments
from observer.deleter import Deleter
class SliverDeleter(Deleter):