[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/VERSION b/VERSION
index f262bdc..cb2b00e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1-dev1
+3.0.1
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index ba53dc9..1f36eb8 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 # xosproject/chameleon
-
-FROM xosproject/xos-base:3.0.0
+FROM xosproject/xos-base:3.0.1
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 47e5c54..c6bae83 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-client
-
-FROM xosproject/xos-libraries:3.0.0
+FROM xosproject/xos-libraries:3.0.1
 
 # Install XOS client
 COPY lib/xos-api /tmp/xos-api
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 56a81b7..420ba33 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-libraries
-
-FROM xosproject/xos-base:3.0.0
+FROM xosproject/xos-base:3.0.1
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 8faa570..df1e203 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-synchronizer-base
-
-FROM xosproject/xos-client:3.0.0
+FROM xosproject/xos-client:3.0.1
 
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
 COPY xos/xos/__init__.py /opt/xos/xos/__init__.py
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index 2b9ef92..bddc63b 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-core
-
-FROM xosproject/xos-libraries:3.0.0
+FROM xosproject/xos-libraries:3.0.1
 
 # Install XOS
 ADD xos /opt/xos
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
diff --git a/scripts/xos_dev_reqs.txt b/scripts/xos_dev_reqs.txt
index ad15a6c..c881531 100644
--- a/scripts/xos_dev_reqs.txt
+++ b/scripts/xos_dev_reqs.txt
@@ -1,12 +1,16 @@
+Django==1.11.11
 Jinja2==2.10
-inflect==1.0.1
 PyYAML==3.12
 Twisted==16.6.0
 astunparse==1.5.0
 colorama==0.3.9
 confluent-kafka==0.11.5
+django-extensions==2.1.5
+djangorestframework==3.9.1
+flake8==3.7.5
 grpcio-tools==1.12.0
 grpcio==1.12.0
+inflect==1.0.1
 ipaddress==1.0.19
 multistructlog==2.1.0
 netaddr==0.7.19
@@ -15,10 +19,6 @@
 ply==3.11
 plyxproto==4.0.0
 pykwalify==1.6.1
+python-consul~=1.1.0
 requests-mock==1.5.0
 tosca-parser==0.9.0
-Django==1.11.11
-django-extensions==2.1.5
-djangorestframework==3.9.1
-flake8==3.7.5
-python-consul~=1.1.0