Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi
[plstackapi.git] / planetstack / requestrouter / models.py
index ced91cf..8e4cc43 100644 (file)
@@ -16,15 +16,20 @@ class RequestRouterService(SingletonModel,Service):
     lastResortAction = models.CharField(max_length=30, default = "random", help_text="Review if this should be enum")
     maxAnswers = models.PositiveIntegerField(default=3, help_text="Maximum number of answers in DNS response.")
 
-    def __unicode__(self):  return u'RequestRouterService'
+    def __unicode__(self):  return u'Request Router Service'
+
+class ServiceMap(PlCoreBase):
+
+    class Meta:
+        app_label = "requestrouter"
 
-class ServiceMap(models.Model):
     name = models.SlugField(max_length=50, unique=True, blank=False, null=False, help_text="name of this service map")
     owner = models.ForeignKey(Service, help_text="service which owns this map")
     slice = models.ForeignKey(Slice, help_text="slice that implements this service")
     prefix = models.CharField(max_length=256, help_text="FQDN of the region of URI space managed by RR on behalf of this service")
-    siteMap = models.FileField(upload_to="maps/", help_text="maps client requests to service instances")
-    accessMap = models.FileField(upload_to="maps/", help_text="specifies which client requests are allowed")
+       # need to fix the upload location appropriately, for now we are not using access/site map
+    siteMap = models.FileField(upload_to="maps/", help_text="maps client requests to service instances", blank=True)
+    accessMap = models.FileField(upload_to="maps/", help_text="specifies which client requests are allowed", blank=True)
 
     def siteMapName(self):
         return self.name + ".site"
@@ -34,5 +39,3 @@ class ServiceMap(models.Model):
 
     def __unicode__(self): return u'%s' % self.name
 
-
-