Support for ELAN, ETREE, and VNoD Global Service

Change-Id: Iea1ee5b5b9224404a16bc9b88bc082719f75d10f
diff --git a/xos/synchronizer/invokers/servicespokeinvoker.py b/xos/synchronizer/invokers/servicespokeinvoker.py
new file mode 100644
index 0000000..8470cf5
--- /dev/null
+++ b/xos/synchronizer/invokers/servicespokeinvoker.py
@@ -0,0 +1,37 @@
+import json
+from synchronizers.metronetwork.invokers.invoker import Invoker
+from core.models import Site
+from services.metronetwork.models import RemotePort
+
+
+class ServiceSpokeInvoker(Invoker):
+    def __init__(self, **args):
+        pass
+
+    # Method for handline pre save semantics
+    #      content here would be model specific but could include handling Many-to-Many relationship
+    #      creation - which must occur post save
+    #
+    # obj     - Whatever obj was just saved
+    # returns - None - this is a pure invoke() call, return type is None
+    #
+    def presave(self, obj):
+        # Now that the Ports are created - get a proper reference to them and update the
+        # src and dst fields
+        if hasattr(obj, 'sitename'):
+            site = Site.objects.get(login_base=obj.sitename)
+            obj.vnodlocalsite = site
+
+        if hasattr(obj, 'remoteportname'):
+            remoteport = RemotePort.objects.get(name=obj.remoteportname)
+            obj.vnodlocalport = remoteport
+
+    # Method for handline post save semantics
+    #      content here would be model specific but could include handling Many-to-Many relationship
+    #      creation - which must occur post save
+    #
+    # obj     - Whatever obj was just saved
+    # returns - N/A - this is a pure invoke() call
+    #
+    def postsave(self, obj):
+        pass
\ No newline at end of file