refactor vMME cord-3.0
Change-Id: I234b0ecf869de31fa7dbe76a2e3db4e2fc0b4e6b
diff --git a/xos/synchronizer/steps/sync_vmmetenant.py b/xos/synchronizer/steps/sync_vmmetenant.py
index 7147e3f..ebb1ef3 100644
--- a/xos/synchronizer/steps/sync_vmmetenant.py
+++ b/xos/synchronizer/steps/sync_vmmetenant.py
@@ -18,7 +18,7 @@
template_name = "vmmetenant_playbook.yaml"
- service_key_name = "/opt/xos/synchronizers/vmme/vmme_private_key"
+ service_key_name = "/opt/xos/configurations/mcord/mcord_private_key"
def __init__(self, *args, **kwargs):
super(SyncVMMETenant, self).__init__(*args, **kwargs)
@@ -34,22 +34,10 @@
return objs
- def get_vmmeservice(self, o):
- if not o.provider_service:
- return None
-
- vmmeservice = VMMEService.get_service_objects().filter(id=o.provider_service.id)
-
- if not vmmeservice:
- return None
-
- return vmmeservice[0]
-
# Gets the attributes that are used by the Ansible template but are not
# part of the set of default attributes.
def get_extra_attributes(self, o):
fields = {}
fields['tenant_message'] = o.tenant_message
- fields['image_name'] = o.image_name
return fields
diff --git a/xos/synchronizer/steps/vmmetenant_playbook.yaml b/xos/synchronizer/steps/vmmetenant_playbook.yaml
index c8a74d0..a73231c 100644
--- a/xos/synchronizer/steps/vmmetenant_playbook.yaml
+++ b/xos/synchronizer/steps/vmmetenant_playbook.yaml
@@ -5,6 +5,8 @@
user: ubuntu
sudo: yes
tasks:
+ vars:
+ - tenant_message: "{{ tenant_message }}"
# - name: write message
# shell: echo "{{ tenant_message }}" > /var/tmp/index.html
diff --git a/xos/synchronizer/vmme-synchronizer.py b/xos/synchronizer/vmme-synchronizer.py
old mode 100644
new mode 100755