make sync_vcpetenant use new mechanism when appropriate
diff --git a/xos/observers/base/SyncInstanceUsingAnsible.py b/xos/observers/base/SyncInstanceUsingAnsible.py
index 77879d2..5bb8250 100644
--- a/xos/observers/base/SyncInstanceUsingAnsible.py
+++ b/xos/observers/base/SyncInstanceUsingAnsible.py
@@ -90,6 +90,7 @@
"baremetal_ssh": True,
"instance_name": "rootcontext",
"username": "root",
+ "container_name": "%s-%s" % (instance.slice.name, str(instance.id))
}
key_name = self.get_node_key(node)
else:
@@ -107,6 +108,7 @@
"instance_id": instance.parent.instance_id,
"username": "ubuntu",
"nat_ip": instance.parent.get_ssh_ip(),
+ "container_name": "%s-%s" % (instance.slice.name, str(instance.id))
}
key_name = instance.parent.slice.service.private_key_fn
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant.py b/xos/observers/vcpe/steps/sync_vcpetenant.py
index 120954b..4f3886e 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/observers/vcpe/steps/sync_vcpetenant.py
@@ -131,7 +131,8 @@
"dnsdemux_ip": dnsdemux_ip,
"cdn_prefixes": cdn_prefixes,
"bbs_addrs": bbs_addrs,
- "full_setup": full_setup}
+ "full_setup": full_setup,
+ "isolation": o.instance.isolation}
# add in the sync_attributes that come from the SubscriberRoot object
@@ -209,7 +210,10 @@
if quick_update:
logger.info("quick_update triggered; skipping ansible recipe")
else:
- super(SyncVCPETenant, self).run_playbook(o, fields)
+ if o.instance.isolation in ["container", "container_vm"]:
+ super(SyncVCPETenant, self).run_playbook(o, fields, "sync_vcpetenant_new.yaml")
+ else:
+ super(SyncVCPETenant, self).run_playbook(o, fields)
o.last_ansible_hash = ansible_hash