From b62b7acd1c12e971b6e13d4905d478df8fd3c69f Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 28 May 2018 16:50:20 +0200 Subject: [PATCH] fix 500 provide vnfr:vnfd-id with vnfd:_id allow force at DELETE nslcm/vi/ns_instances_content Change-Id: Ib6dccc65f45f3fdb0a8dcd504db851e43e35cf40 Signed-off-by: tierno --- osm_nbi/engine.py | 2 +- osm_nbi/html_public/version | 4 ++-- osm_nbi/nbi.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index b5989c0..12311d1 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -603,7 +603,7 @@ class Engine(object): "created-time": now, # "vnfd": vnfd, # at OSM model.but removed to avoid data duplication TODO: revise "vnfd-ref": vnfd_id, - "vnfd-id": vnfr_id, # not at OSM model, but useful + "vnfd-id": vnfd["_id"], # not at OSM model, but useful "vim-account-id": None, "vdur": [], "connection-point": [], diff --git a/osm_nbi/html_public/version b/osm_nbi/html_public/version index af29d72..63dd2ef 100644 --- a/osm_nbi/html_public/version +++ b/osm_nbi/html_public/version @@ -1,3 +1,3 @@ -0.1.9 -2018-05-21 +0.1.10 +2018-05-28 diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index fefb3e9..cb24045 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -716,7 +716,7 @@ class Server(object): outdata = self.engine.del_item_list(session, engine_item, kwargs) cherrypy.response.status = HTTPStatus.OK.value else: # len(args) > 1 - if item == "ns_instances_content": + if item == "ns_instances_content" and not force: opp_id = self.engine.ns_operation(session, _id, "terminate", {"autoremove": True}, None) outdata = {"_id": opp_id} cherrypy.response.status = HTTPStatus.ACCEPTED.value -- 2.25.1