X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fnbi.py;h=03e8727a18760cd60910711f0d771b2bdbfb689c;hp=1085ebc6e1fefa51e2dde66d35a1517df8385a15;hb=5792d7d7e1ff32ef0edfc432bd86a8fb348622c3;hpb=7bfe2675ecaf4cbbaeae2cc3954b96a494875e46 diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 1085ebc..03e8727 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -557,7 +557,7 @@ class Server(object): return string of dictionary data according to requested json, yaml, xml. By default json :param data: response to be sent. Can be a dict, text or file :param token_info: Contains among other username and project - :param _format: The format to be set as Content-Type ir data is a file + :param _format: The format to be set as Content-Type if data is a file :return: None """ accept = cherrypy.request.headers.get("Accept") @@ -621,7 +621,8 @@ class Server(object): elif args or kwargs: raise NbiException("Invalid URL or query string for version", HTTPStatus.METHOD_NOT_ALLOWED) # TODO include version of other modules, pick up from some kafka admin message - return "
NBI:\n    version: {}\n    date: {}\n".format(nbi_version, nbi_version_date)
+            osm_nbi_version = {"version": nbi_version, "date": nbi_version_date}
+            return self._format_out(osm_nbi_version)
         except NbiException as e:
             cherrypy.response.status = e.http_code.value
             problem_details = {