[SEBA-545]

Update 3.0.x versions of libraries to have 3.0.x dependencies
Sort and add missing dependencies for xosmigrate
Narrow set of directories searched for models in xosmigrate

Change-Id: I70dc6a8bbf0c891e9142ae7acf6afd107d8e79ae
diff --git a/lib/xos-api/requirements.txt b/lib/xos-api/requirements.txt
index 886db3d..f990247 100644
--- a/lib/xos-api/requirements.txt
+++ b/lib/xos-api/requirements.txt
@@ -7,5 +7,5 @@
 pykwalify~=1.6.0
 python-consul~=1.1.0
 simplejson~=3.16.0
-xosconfig~=2.2.6
-xosgenx~=2.2.6
+xosconfig~=3.0.0
+xosgenx~=3.0.0
diff --git a/lib/xos-kafka/requirements.txt b/lib/xos-kafka/requirements.txt
index 010540a..1888a03 100644
--- a/lib/xos-kafka/requirements.txt
+++ b/lib/xos-kafka/requirements.txt
@@ -1,3 +1,3 @@
 confluent-kafka~=0.11.5
 multistructlog~=2.1.0
-xosconfig~=2.2.6
+xosconfig~=3.0.0
diff --git a/lib/xos-migrate/requirements.txt b/lib/xos-migrate/requirements.txt
index 803fecb..0ea31a5 100644
--- a/lib/xos-migrate/requirements.txt
+++ b/lib/xos-migrate/requirements.txt
@@ -1,4 +1,7 @@
 PyYAML~=3.12
+django-extensions~=2.1.6
+djangorestframework~=3.9.1
+django~=1.11.20
 multistructlog~=2.1.0
-xosconfig~=2.2.6
-xosgenx~=2.2.6
+xosconfig~=3.0.0
+xosgenx~=3.0.0
diff --git a/lib/xos-migrate/xosmigrate/main.py b/lib/xos-migrate/xosmigrate/main.py
index e7be104..8aab313 100644
--- a/lib/xos-migrate/xosmigrate/main.py
+++ b/lib/xos-migrate/xosmigrate/main.py
@@ -107,8 +107,8 @@
     """
     xprotos = []
     for fn in os.listdir(path):
-        # skip hidden files and folders. plus other useless things
-        if fn.startswith(".") or fn == "venv-xos" or fn == "htmlcov":
+        # skip hidden files and folders
+        if fn.startswith("."):
             continue
         full_path = os.path.join(path, fn)
         if fn.endswith(".xproto"):
@@ -127,8 +127,8 @@
     """
     decls = []
     for fn in os.listdir(path):
-        # skip hidden files and folders. plus other useless things
-        if fn.startswith(".") or fn == "venv-xos" or fn == "htmlcov":
+        # skip hidden files and folders
+        if fn.startswith("."):
             continue
         full_path = os.path.join(path, fn)
         if fn == "models.py":
@@ -160,8 +160,9 @@
     :param service_name: string (name of the service)
     :return: void
     """
-    xprotos = find_xproto_in_folder(service_dir)
-    decls = find_decls_models(service_dir)
+    sync_dir = os.path.join(service_dir, "xos/synchronizer/models")
+    xprotos = find_xproto_in_folder(sync_dir)
+    decls = find_decls_models(sync_dir)
     log.debug("Generating models for %s from files %s" % (service_name, ", ".join(xprotos)))
     out_dir = os.path.join(service_dest_dir, service_name)
     if not os.path.isdir(out_dir):
diff --git a/lib/xos-synchronizer/requirements.txt b/lib/xos-synchronizer/requirements.txt
index ce153d5..616f5fb 100644
--- a/lib/xos-synchronizer/requirements.txt
+++ b/lib/xos-synchronizer/requirements.txt
@@ -1,13 +1,8 @@
 Jinja2~=2.10
+astunparse~=1.5.0
 confluent-kafka==0.11.5
+inflect~=1.0.1
 multistructlog~=2.1.0
 networkx~=1.11
-inflect~=1.0.1
-astunparse~=1.5.0
-xosconfig~=2.2.6
-xosgenx~=2.2.6
-
-# remove once xosconfig/xosgenx are updated with correct requirements.txt
-plyxproto~=4.0.0
-pykwalify~=1.6.0
-PyYAML~=3.12
+xosconfig~=3.0.0
+xosgenx~=3.0.0