ignore hpc if it is not onboarded
Change-Id: Iafb8fc61ae8e681fcfdbe673794dc4694e70e7bb
diff --git a/xos/synchronizer/steps/sync_vcpetenant.py b/xos/synchronizer/steps/sync_vcpetenant.py
index 0b777c7..adabf85 100644
--- a/xos/synchronizer/steps/sync_vcpetenant.py
+++ b/xos/synchronizer/steps/sync_vcpetenant.py
@@ -11,9 +11,15 @@
from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
from core.models import Service, Slice, Tag
from services.vsg.models import VSGService, VSGTenant
-from services.hpc.models import HpcService, CDNPrefix
from xos.logger import Logger, logging
+# Deal with configurations where the hpc service is not onboarded
+try:
+ from services.hpc.models import HpcService, CDNPrefix
+ hpc_service_onboarded=True
+except:
+ hpc_service_onboarded=False
+
# hpclibrary will be in steps/..
parentdir = os.path.join(os.path.dirname(__file__),"..")
sys.path.insert(0,parentdir)
@@ -75,7 +81,7 @@
if len(lines)>=2:
dnsdemux_ip = lines[0].strip()
cdn_prefixes = [x.strip() for x in lines[1:] if x.strip()]
- else:
+ elif hpc_service_onboarded:
# automatic CDN configuiration
# it learns everything from CDN objects in XOS
# not tested on pod.