SEBA-282 return 401 on permission error

Change-Id: Ica0c1d6b2aae5a8ed13123f2e5c0382e418b5433
diff --git a/Dockerfile b/Dockerfile
index b791a24..c1ed397 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
 # docker build -t xosproject/xos-tosca:candidate .
 
 # xosproject/xos-tosca
-FROM xosproject/xos-client:2.1.13
+FROM xosproject/xos-client:2.1.17
 
 # Set environment variables
 ENV CODE_SOURCE .
diff --git a/VERSION b/VERSION
index 524cb55..45a1b3f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.1
+1.1.2
diff --git a/src/tosca/generator.py b/src/tosca/generator.py
index 3f54a77..0e36952 100644
--- a/src/tosca/generator.py
+++ b/src/tosca/generator.py
@@ -23,7 +23,7 @@
 from xosapi.xos_grpc_client import Empty
 
 class Args:
-    pass
+    verbosity = 0
 
 current_dir = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/src/web_server/main.py b/src/web_server/main.py
index 3e2cf8f..9a6c9b3 100644
--- a/src/web_server/main.py
+++ b/src/web_server/main.py
@@ -51,6 +51,8 @@
         request.setResponseCode(500)
         try:
             f = failure.getErrorMessage()
+            if f.startswith("XOSPermissionDenied"):
+                request.setResponseCode(401)
             log.info("[XOS-TOSCA] Error while loading TOSCA: \n\n", failure=f)
             return f
         except Exception:
diff --git a/test/test_tosca_generator.py b/test/test_tosca_generator.py
index 5e74214..45c3cc0 100644
--- a/test/test_tosca_generator.py
+++ b/test/test_tosca_generator.py
@@ -23,7 +23,7 @@
 print OUTPUT_DIR
 
 class FakeArgs:
-    pass
+    verbosity = 0
 
 class TOSCA_Generator_Test(unittest.TestCase):