CORD-1010 fix volume mount for openstack synchronizer
Change-Id: Ifb2d9a0196be85df26cd4e1f782cdbcc770109f6
diff --git a/xos/synchronizers/onboarding/xosbuilder.py b/xos/synchronizers/onboarding/xosbuilder.py
index 5ed4bc9..1d1222a 100644
--- a/xos/synchronizers/onboarding/xosbuilder.py
+++ b/xos/synchronizers/onboarding/xosbuilder.py
@@ -435,7 +435,7 @@
"container_path": "/opt/xos/services/%s/keys/%s_rsa" % (c.name, c.name),
"read_only": True})
- if c.name == "vtr":
+ if c.name.lower() == "vtr":
# VTR is special -- it has the vSG's private key
# TODO: If docker-compose autogenerate remains a feature,
# then replace this special-purposing with a general-
@@ -445,6 +445,17 @@
"container_path": "/opt/xos/services/%s/keys/vsg_rsa" % c.name,
"read_only": True})
+ if c.name.lower() == "openstack":
+ # OpenStack is special -- it needs to onboard images to glance
+ # TODO: If docker-compose autogenerate remains a feature,
+ # then replace this special-purposing with a general-
+ # purpose mechanism allowing volume mounts to specific
+ # containers.
+ nb_volume_list.append({"host_path": "/opt/cord_profile/images",
+ "container_path": "/opt/xos/images",
+ "read_only": True})
+
+
nb_external_links = []
if xos.redis_container_name:
nb_external_links.append("%s:%s" % (xos.redis_container_name, "redis"))