From 078f55ee162b10003f328b353019a1debd87b785 Mon Sep 17 00:00:00 2001 From: kuuse Date: Thu, 16 May 2019 19:24:21 +0200 Subject: [PATCH] Feature 7181: Ability to provide real-time feedback in CLI and GUI upon request To be able to use 'ns-create' and 'nsi-create' with the new '--wait' option, the following two fields have been added in the response header for topics: - ns_instances_content: nslcmop_id field - netslice_instances_content: nsilcmop_id Change-Id: Id09d7d2581c4360d7bb74e1788f0489d79856b65 Signed-off-by: kuuse --- osm_nbi/nbi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 0616430..a43336d 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -873,9 +873,9 @@ class Server(object): # creates nslcmop indata["lcmOperationType"] = "instantiate" indata["nsInstanceId"] = _id - self.engine.new_item(rollback, session, "nslcmops", indata, None) + nslcmop_id = self.engine.new_item(rollback, session, "nslcmops", indata, None) self._set_location_header(main_topic, version, topic, _id) - outdata = {"id": _id} + outdata = {"id": _id, "nslcmop_id": nslcmop_id} elif topic == "ns_instances" and item: indata["lcmOperationType"] = item indata["nsInstanceId"] = _id @@ -889,8 +889,8 @@ class Server(object): self._set_location_header(main_topic, version, topic, _id) indata["lcmOperationType"] = "instantiate" indata["nsiInstanceId"] = _id - self.engine.new_item(rollback, session, "nsilcmops", indata, kwargs) - outdata = {"id": _id} + nsilcmop_id = self.engine.new_item(rollback, session, "nsilcmops", indata, kwargs) + outdata = {"id": _id, "nsilcmop_id": nsilcmop_id} elif topic == "netslice_instances" and item: indata["lcmOperationType"] = item -- 2.17.1