[SEBA-450] (part 1)

Refactoring, python3 compat, and tox tests on:

- xosconfig
- xosgenx
- xosutil

Eliminate use of yaml.load() which is unsafe, switch to yaml.safe_load()

More diagnostics during database migration

Change-Id: I0fae5782fca401603a7c4e4ec2b9269ad24bda97
diff --git a/lib/xos-genx/xosgenx/xosgen.py b/lib/xos-genx/xosgenx/xosgen.py
index 1318242..2da8962 100755
--- a/lib/xos-genx/xosgenx/xosgen.py
+++ b/lib/xos-genx/xosgenx/xosgen.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,13 +14,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from __future__ import absolute_import, print_function
 
-#!/usr/bin/python
-
-from __future__ import print_function
 import argparse
-from generator import *
-from version import __version__
+import os
+from functools import reduce
+
+from six.moves import range
+
+from .generator import XOSProcessor, XOSProcessorArgs
+from .version import __version__
 
 parse = argparse.ArgumentParser(description="XOS Generative Toolchain")
 parse.add_argument(
@@ -147,7 +152,7 @@
             else [args.target]
         )
 
-        for i in xrange(len(operators)):
+        for i in range(len(operators)):
             if "/" not in operators[i]:
                 # if the target is not a path, it refer to a library included one
                 operators[i] = os.path.abspath(