get docker image name from image.path; add support for docker tag
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index 2a61cf9..5d95d7a 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -262,7 +262,7 @@
node: mysite
relationship: tosca.relationships.MemberOfSite
- vcpe_docker_image:
- node: andybavier/docker-vcpe
+ node: docker-vcpe
relationship: tosca.relationships.UsesImage
properties:
default_isolation: container
@@ -429,13 +429,14 @@
relationship: tosca.relationships.MemberOfSlice
# docker image for vcpe containers
- andybavier/docker-vcpe:
+ docker-vcpe:
# TODO: need to attach this to mydeployment
type: tosca.nodes.Image
properties:
kind: container
container_format: na
disk_format: na
+ path: andybavier/docker-vcpe
# A subscriber
My House:
diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index e33e7bc..7cf2a6b 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -519,7 +519,7 @@
"trusty-server-multi-nic", # CloudLab
]
- LOOK_FOR_CONTAINER_IMAGES=["andybavier/docker-vcpe"]
+ LOOK_FOR_CONTAINER_IMAGES=["docker-vcpe"]
class Meta:
proxy = True
diff --git a/xos/openstack_observer/steps/sync_container.py b/xos/openstack_observer/steps/sync_container.py
index 272e5f8..039fb55 100644
--- a/xos/openstack_observer/steps/sync_container.py
+++ b/xos/openstack_observer/steps/sync_container.py
@@ -103,7 +103,10 @@
def get_extra_attributes(self, o):
fields={}
fields["ansible_tag"] = "container-%s" % str(o.id)
- fields["docker_image"] = o.image.name
+ if o.image.tag:
+ fields["docker_image"] = o.image.path + ":" + o.image.tag
+ else:
+ fields["docker_image"] = o.image.path
fields["ports"] = self.get_ports(o)
if o.volumes:
fields["volumes"] = [x.strip() for x in o.volumes.split(",")]