introduce Controller model
diff --git a/planetstack/core/models/image.py b/planetstack/core/models/image.py
index fdeb2cc..a7b63b6 100644
--- a/planetstack/core/models/image.py
+++ b/planetstack/core/models/image.py
@@ -1,8 +1,7 @@
import os
from django.db import models
from core.models import PlCoreBase
-from core.models import Deployment
-from core.models import Deployment,DeploymentLinkManager,DeploymentLinkDeletionManager
+from core.models import Controller,ControllerLinkManager,ControllerLinkDeletionManager
# Create your models here.
@@ -14,13 +13,13 @@
def __unicode__(self): return u'%s' % (self.name)
-class ImageDeployments(PlCoreBase):
- objects = DeploymentLinkManager()
- deleted_objects = DeploymentLinkDeletionManager()
- image = models.ForeignKey(Image,related_name='imagedeployments')
- deployment = models.ForeignKey(Deployment,related_name='imagedeployments')
+class ControllerImages(PlCoreBase):
+ objects = ControllerLinkManager()
+ deleted_objects = ControllerLinkDeletionManager()
+ image = models.ForeignKey(Image,related_name='controllerimages')
+ controller = models.ForeignKey(Controller,related_name='controllerimages')
glance_image_id = models.CharField(null=True, blank=True, max_length=200, help_text="Glance image id")
- def __unicode__(self): return u'%s %s' % (self.image, self.deployment)
+ def __unicode__(self): return u'%s %s' % (self.image, self.controller)