def __unicode__(self): return u'%s' % (self.name)
- @staticmethod
- def select_by_user(user):
- return Flavor.objects.all()
-
""" FlavorParameterType and FlavorParameter are below for completeness sake,
waiting for the day we might want to add parameters to flavors.
def __unicode__(self): return u'%s' % (self.name)
- @staticmethod
- def select_by_user(user):
- return NetworkTemplate.objects.all()
-
class Network(PlCoreBase):
name = models.CharField(max_length=32)
template = models.ForeignKey(NetworkTemplate)
def __unicode__(self): return u'%s' % (self.name)
- @staticmethod
- def select_by_user(user):
- qs = Node.objects.all()
- return qs
if not silent:
notify_observer()
- self.__initial = self._dict
+ self._initial = self._dict
def save_by_user(self, user, *args, **kwds):
if not self.can_update(user):
raise PermissionDenied("You do not have permission to delete %s objects" % self.__class__.__name__)
self.delete(*args, **kwds)
+ @classmethod
+ def select_by_user(cls, user):
+ # This should be overridden by descendant classes that want to perform
+ # filtering of visible objects by user.
+ return cls.objects.all()
+
def __unicode__(self): return u'%s' % (self.name)
- @staticmethod
- def select_by_user(user):
- return Deployment.objects.all()
-
class DeploymentRole(PlCoreBase):
#objects = DeploymentLinkManager()
#deleted_objects = DeploymentLinkDeletionManager()
deployment = models.ForeignKey(Deployment)
tenant_id = models.CharField(null=True, blank=True, max_length=200, help_text="Keystone tenant id")
- @staticmethod
- def select_by_user(user):
- return SiteDeployments.objects.all()
-
#class Meta:
# db_table = 'core_site_deployments'
# #auto_created = Site