hpc_observer support for map sync
diff --git a/xos/hpc/models.py b/xos/hpc/models.py
index 2244421..8fc1885 100644
--- a/xos/hpc/models.py
+++ b/xos/hpc/models.py
@@ -100,6 +100,7 @@
name = models.CharField(max_length=64, help_text="Name of the Site Map")
description = models.TextField(null=True, blank=True,max_length=130)
map = models.FileField(upload_to="maps/", help_text="specifies how to map requests to hpc instances")
+ map_id = models.IntegerField(null=True, blank=True)
def __unicode__(self): return self.name
diff --git a/xos/hpc_observer/steps/sync_sitemap.py b/xos/hpc_observer/steps/sync_sitemap.py
index dc1fedf..6ac5f06 100644
--- a/xos/hpc_observer/steps/sync_sitemap.py
+++ b/xos/hpc_observer/steps/sync_sitemap.py
@@ -71,20 +71,17 @@
if (map.contentProvider):
if not map.contentProvider.content_provider_id:
- print "Map", map_dict, "contentProvider has no id"
- return
+ raise Exception("Map %s links to a contentProvider with no id" % map.name)
conent_provider_ids = [map.contentProvider.content_provider_id]
if (map.serviceProvider):
if not map.serviceProvider.service_provider_id:
- print "Map", map_dict, "serviceProvider has no id"
- return
+ raise Exception("Map %s links to a serviceProvider with no id" % map.name)
service_provider_ids = [map.serviceProvider.service_provider_id]
if (map.cdnPrefix):
if not map.cdnPrefix.cdn_prefix_id:
- print "Map", map_dict, "cdnPrefix has no id"
- return
+ raise Exception("Map %s links to a cdnPrefix with no id" % map.name)
cdn_prefix_ids = [map.cdnPrefix.cdn_prefix_id]
if not map.map_id: