move all 3.0 files to 4.1 as the first step
Change-Id: Iab7810a02bfdf25bffca4e144fcae994f72e0048
diff --git a/xos/synchronizer/steps/sync_vmmetenant.py b/xos/synchronizer/steps/sync_vmmetenant.py
index 91d4380..b8a704f 100644
--- a/xos/synchronizer/steps/sync_vmmetenant.py
+++ b/xos/synchronizer/steps/sync_vmmetenant.py
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
import os
import sys
from django.db.models import Q, F
-from services.vmme.models import VMMEService, VMMETenant
-from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+#from services.vmme.models import VMMEService, VMMETenant
+from synchronizers.new_base.modelaccessor import *
+from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
parentdir = os.path.join(os.path.dirname(__file__), "..")
sys.path.insert(0, parentdir)
@@ -33,7 +32,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)
@@ -49,22 +48,3 @@
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 6828701..05c13c1 100644
--- a/xos/synchronizer/steps/vmmetenant_playbook.yaml
+++ b/xos/synchronizer/steps/vmmetenant_playbook.yaml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,14 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
+---
- hosts: {{ instance_name }}
gather_facts: False
connection: ssh
user: ubuntu
sudo: yes
tasks:
+ vars:
- # - name: write message
- # shell: echo "{{ tenant_message }}" > /var/tmp/index.html