Fix broken swagger documentation and requirements.txt parsing
Change-Id: If9932b9d3ca19f0e4d53dfcd03cd35fdacde8f62
diff --git a/docs/Makefile b/docs/Makefile
index 60b3b5f..81a7564 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -45,19 +45,19 @@
ln -s ../../xos-tosca/docs xos-tosca
kubernetes:
- ln -s ../../xos-services/kubernetes-service/docs kubernetes
+ ln -s ../../xos_services/kubernetes-service/docs kubernetes
openstack:
- ln -s ../../xos-services/openstack/docs openstack
+ ln -s ../../xos_services/openstack/docs openstack
onos:
- ln -s ../../xos-services/onos-service/docs onos
+ ln -s ../../xos_services/onos-service/docs onos
exampleservice:
- ln -s ../../xos-services/exampleservice/docs exampleservice
+ ln -s ../../xos_services/exampleservice/docs exampleservice
simpleexampleservice:
- ln -s ../../xos-services/simpleexampleservice/docs simpleexampleservice
+ ln -s ../../xos_services/simpleexampleservice/docs simpleexampleservice
# HOW TO
diff --git a/docs/scripts/swagger_docs.py b/docs/scripts/swagger_docs.py
index ffe36e7..1bf2b16 100644
--- a/docs/scripts/swagger_docs.py
+++ b/docs/scripts/swagger_docs.py
@@ -13,6 +13,7 @@
# limitations under the License.
import os
+import traceback
from xosgenx.generator import XOSProcessor, XOSProcessorArgs
CWD = OUTPUT_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
@@ -38,9 +39,9 @@
args.quiet = False
try:
XOSProcessor.process(args)
- except Exception, e:
+ except Exception:
print "ERROR: Couldn't generate swagger specs"
- print e
+ traceback.print_exc()
def get_xproto_recursively(root):
files = []
diff --git a/docs/venv-xosdocs.sh b/docs/venv-xosdocs.sh
index 7f34502..ca51fef 100755
--- a/docs/venv-xosdocs.sh
+++ b/docs/venv-xosdocs.sh
@@ -23,6 +23,7 @@
if [ ! -d "$BASEDIR/$VENVDIR" ]; then
echo "Setting up virtualenv for XOS Swagger Docs"
virtualenv -q $BASEDIR/$VENVDIR --no-site-packages
+ source $BASEDIR/$VENVDIR/bin/activate
pip install --upgrade pip
echo "Virtualenv created."
fi
@@ -35,4 +36,3 @@
# install pip packages
pip install -e $BASEDIR/$VENVDIR/../../lib/xos-genx
-pip install plyxproto jinja2 astunparse pyyaml colorama