X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fhtml_out.py;h=1d733bca8f121fcebb0525a184d66e144b7397d5;hp=23ee97bfea4dbcceb35490ef784fea3cf35167b1;hb=2102560198959215f59e9f0ab1d11b0f69b8bb75;hpb=0f98af53b320c8244b58d0d8751e28e157949e8e diff --git a/osm_nbi/html_out.py b/osm_nbi/html_out.py index 23ee97b..1d733bc 100644 --- a/osm_nbi/html_out.py +++ b/osm_nbi/html_out.py @@ -25,6 +25,7 @@ html_start = """ USERs PROJECTs TOKENs + VIMs logout @@ -88,6 +89,15 @@ html_upload_body = """ """ +html_nslcmop_body = """ +nslcm operations +
+

+ +

+
+""" + def format(data, request, response, session): """ @@ -123,6 +133,10 @@ def format(data, request, response, session): body += ' show '.format(response.headers["Location"]) else: body += ' '.format(request.path_info) + if request.path_info.startswith("/nslcm/v1/ns_instances_content/") or \ + request.path_info.startswith("/nslcm/v1/ns_instances/"): + _id = request.path_info[request.path_info.rfind("/")+1:] + body += html_nslcmop_body.format(id=_id) body += "
" + yaml.safe_dump(data, explicit_start=True, indent=4, default_flow_style=False) + "
" elif data is None: if request.method == "DELETE" or "METHOD=DELETE" in request.query_string: