Renamed SliceDeployment back to SliceDeployments
diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index de766fc..747062c 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -762,8 +762,8 @@
raise forms.ValidationError('slice name must begin with %s' % site.login_base)
return cleaned_data
-class SliceDeploymentInline(PlStackTabularInline):
- model = SliceDeployment
+class SliceDeploymentsInline(PlStackTabularInline):
+ model = SliceDeployments
extra = 0
verbose_name = "Slice Deployment"
verbose_name_plural = "Slice Deployments"
@@ -779,7 +779,7 @@
list_display = ('backend_status_icon', 'name', 'site','serviceClass', 'slice_url', 'max_slivers')
list_display_links = ('backend_status_icon', 'name', )
inlines = [SlicePrivilegeInline,SliverInline, TagInline, ReservationInline,SliceNetworkInline]
- admin_inlines = [SliceDeploymentInline]
+ admin_inlines = [SliceDeploymentsInline]
user_readonly_fields = fieldList
diff --git a/planetstack/core/migrations/0001_initial.py b/planetstack/core/migrations/0001_initial.py
index 58c0dc3..8523936 100644
--- a/planetstack/core/migrations/0001_initial.py
+++ b/planetstack/core/migrations/0001_initial.py
@@ -778,7 +778,7 @@
bases=(models.Model,),
),
migrations.CreateModel(
- name='SliceDeployments',
+ name='SliceDeploymentss',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)),
diff --git a/planetstack/core/models/__init__.py b/planetstack/core/models/__init__.py
index 09f4749..76c9590 100644
--- a/planetstack/core/models/__init__.py
+++ b/planetstack/core/models/__init__.py
@@ -10,7 +10,7 @@
from .user import User, UserDashboardView
from .serviceclass import ServiceClass
from .site import DeploymentLinkManager,DeploymentLinkDeletionManager
-from .slice import Slice, SliceDeployment
+from .slice import Slice, SliceDeployments
from .site import SitePrivilege, SiteDeployments
from .userdeployments import UserDeployment
from .image import Image, ImageDeployment
diff --git a/planetstack/core/models/slice.py b/planetstack/core/models/slice.py
index 24d02aa..128d605 100644
--- a/planetstack/core/models/slice.py
+++ b/planetstack/core/models/slice.py
@@ -93,7 +93,7 @@
nets = Network.objects.filter(slices=self)
nets.delete()
# delete slice deployments
- slice_deployments = SliceDeployments.objects.filter(slice=self)
+ slice_deployments = SliceDeploymentss.objects.filter(slice=self)
slice_deployments.delete()
# delete slice privilege
slice_privileges = SlicePrivilege.objects.filter(slice=self)
@@ -128,7 +128,7 @@
qs = SlicePrivilege.objects.filter(id__in=sp_ids)
return qs
-class SliceDeployment(PlCoreBase):
+class SliceDeployments(PlCoreBase):
objects = DeploymentLinkManager()
deleted_objects = DeploymentLinkDeletionManager()
@@ -144,8 +144,8 @@
@staticmethod
def select_by_user(user):
if user.is_admin:
- qs = SliceDeployment.objects.all()
+ qs = SliceDeployments.objects.all()
else:
slices = Slice.select_by_user(user)
- qs = SliceDeployment.objects.filter(slice__in=slices)
+ qs = SliceDeployments.objects.filter(slice__in=slices)
return qs