SEBA-462 Service unload can be initiated by synchronizer

Change-Id: Idb8b924a6b048b16cdb6b04e91058026932d827d
diff --git a/lib/xos-synchronizer/xossynchronizer/loadmodels.py b/lib/xos-synchronizer/xossynchronizer/loadmodels.py
index 78fa1a6..7acce41 100644
--- a/lib/xos-synchronizer/xossynchronizer/loadmodels.py
+++ b/lib/xos-synchronizer/xossynchronizer/loadmodels.py
@@ -20,6 +20,10 @@
 
 
 class ModelLoadClient(object):
+    REQUIRE_CLEAN = 0
+    AUTOMATICALLY_CLEAN = 1
+    PURGE = 2
+
     def __init__(self, api):
         self.api = api
 
@@ -67,3 +71,15 @@
                     item.contents = open(os.path.join(migrations_dir, fn)).read()
 
         result = self.api.dynamicload.LoadModels(request)
+
+        return result
+
+    def unload_models(self, name, version="unknown", cleanup_behavior=REQUIRE_CLEAN):
+        request = self.api.dynamicload_pb2.UnloadModelsRequest(
+            name=name,
+            version=version,
+            cleanup_behavior=cleanup_behavior)
+        result = self.api.dynamicload.UnloadModels(request)
+
+        return result
+