remove image_preference, add default_image, default_flavor to slice
diff --git a/planetstack/core/models/__init__.py b/planetstack/core/models/__init__.py
index fcb50be..d7787c4 100644
--- a/planetstack/core/models/__init__.py
+++ b/planetstack/core/models/__init__.py
@@ -10,9 +10,11 @@
from .user import User, UserDashboardView
from .serviceclass import ServiceClass
from .site import ControllerManager, ControllerDeletionManager, ControllerLinkManager,ControllerLinkDeletionManager
+from .flavor import Flavor
+from .image import Image
from .slice import Slice, ControllerSlice
from .controlleruser import ControllerUser, ControllerSitePrivilege, ControllerSlicePrivilege
-from .image import Image, ImageDeployments, ControllerImages
+from .image import ImageDeployments, ControllerImages
from .node import Node
from .serviceresource import ServiceResource
from .slice import SliceRole
@@ -22,7 +24,6 @@
from .site import SitePrivilege
from .planetstackspecific import PlanetStack,PlanetStackRole,PlanetStackPrivilege
from .slicetag import SliceTag
-from .flavor import Flavor
from .sliver import Sliver
from .reservation import ReservedResource
from .reservation import Reservation
diff --git a/planetstack/core/models/slice.py b/planetstack/core/models/slice.py
index e182388..1fb4183 100644
--- a/planetstack/core/models/slice.py
+++ b/planetstack/core/models/slice.py
@@ -12,6 +12,7 @@
from django.contrib.contenttypes import generic
from core.models import Service
from core.models import Controller
+from core.models import Flavor, Image
from django.core.exceptions import ValidationError
# Create your models here.
@@ -31,7 +32,8 @@
creator = models.ForeignKey(User, related_name='slices', blank=True, null=True)
# for tenant view
- image_preference = models.CharField(default="Ubuntu 12.04 LTS", null=True, blank=True, max_length=256)
+ default_flavor = models.ForeignKey(Flavor, related_name = "slices", null=True, blank=True)
+ default_image = models.ForeignKey(Image, related_name = "slices", null=True, blank=True);
mount_data_sets = models.CharField(default="GenBank",null=True, blank=True, max_length=256)
def __unicode__(self): return u'%s' % (self.name)