X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fnbi.py;h=0414dba631f12e6dbb6ebfda57da85f065b8b027;hp=60a327eb44378a3bbd2639ff55a3b209897bfd27;hb=de4adfeade8cfe69c2ee6701f80a5421bd003236;hpb=b24258aa9716c1e375fde230a817f7c9faaf6c2a diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 60a327e..0414dba 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -259,9 +259,11 @@ class Server(object): if "application/json" in cherrypy.request.headers["Content-Type"]: error_text = "Invalid json format " indata = json.load(self.reader(cherrypy.request.body)) + cherrypy.request.headers.pop("Content-File-MD5", None) elif "application/yaml" in cherrypy.request.headers["Content-Type"]: error_text = "Invalid yaml format " indata = yaml.load(cherrypy.request.body) + cherrypy.request.headers.pop("Content-File-MD5", None) elif "application/binary" in cherrypy.request.headers["Content-Type"] or \ "application/gzip" in cherrypy.request.headers["Content-Type"] or \ "application/zip" in cherrypy.request.headers["Content-Type"] or \ @@ -281,9 +283,11 @@ class Server(object): # 'application/yaml' for input format are available") error_text = "Invalid yaml format " indata = yaml.load(cherrypy.request.body) + cherrypy.request.headers.pop("Content-File-MD5", None) else: error_text = "Invalid yaml format " indata = yaml.load(cherrypy.request.body) + cherrypy.request.headers.pop("Content-File-MD5", None) if not indata: indata = {} @@ -858,11 +862,8 @@ def _start_service(): # TODO add more entries, e.g.: storage cherrypy.tree.apps['/osm'].root.engine.start(engine_config) cherrypy.tree.apps['/osm'].root.authenticator.start(engine_config) - try: - cherrypy.tree.apps['/osm'].root.engine.init_db(target_version=database_version) - cherrypy.tree.apps['/osm'].root.authenticator.init_db(target_version=auth_database_version) - except (EngineException, AuthException): - pass + cherrypy.tree.apps['/osm'].root.engine.init_db(target_version=database_version) + cherrypy.tree.apps['/osm'].root.authenticator.init_db(target_version=auth_database_version) # getenv('OSMOPENMANO_TENANT', None)