[CORD-2031] Migration of vHSS service to 4.1
Change-Id: Iaab41b6cbfa8fb5036ae04bb9f30f3a55bcdbd1e
(cherry picked from commit c8c6ddd43f0657c2146ac4a8b5ff03141b6375db)
diff --git a/xos/synchronizer/steps/sync_vhsstenant.py b/xos/synchronizer/steps/sync_vhsstenant.py
index d6bdd49..01433de 100644
--- a/xos/synchronizer/steps/sync_vhsstenant.py
+++ b/xos/synchronizer/steps/sync_vhsstenant.py
@@ -15,13 +15,14 @@
import os
import sys
from django.db.models import Q, F
-from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
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)
class SyncVHSSTenant(SyncInstanceUsingAnsible):
+
provides = [VHSSTenant]
observes = VHSSTenant
@@ -32,18 +33,7 @@
service_key_name = "/opt/xos/configurations/mcord/mcord_private_key"
- #Gets the attributes that are used by the Ansible template but are not
- #part of the set of default attributes.
-
def __init__(self, *args, **kwargs):
super(SyncVHSSTenant, self).__init__(*args, **kwargs)
- def fetch_pending(self, deleted):
- if (not deleted):
- objs = VHSSTenant.get_tenant_objects().filter(
- Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
- else:
- objs = VHSSTenant.get_deleted_tenant_objects()
-
- return objs
diff --git a/xos/synchronizer/steps/vhsstenant_playbook.yaml b/xos/synchronizer/steps/vhsstenant_playbook.yaml
index 83c8bbd..e0a34b2 100644
--- a/xos/synchronizer/steps/vhsstenant_playbook.yaml
+++ b/xos/synchronizer/steps/vhsstenant_playbook.yaml
@@ -15,7 +15,7 @@
---
# vhsstenant_playbook
-- hosts: "{{ instance_name }}"
+- hosts: {{ instance_name }}
gather_facts: False
connection: ssh
user: ubuntu