Update operationHistory and response for create operation
Change-Id: I89aec4ce42e8f4ccc5471aa63acb202435a2acc8
Signed-off-by: yshah <shahithya.y@tataelxsi.co.in>
diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py
index e11f4ba..368074a 100644
--- a/osm_nbi/nbi.py
+++ b/osm_nbi/nbi.py
@@ -1872,7 +1872,7 @@
self._set_location_header(main_topic, version, topic, _id)
else:
cherrypy.response.headers["Transaction-Id"] = _id
- outdata = {"_id": _id}
+ outdata = {"_id": _id, "id": _id}
elif topic == "ns_instances_content":
# creates NSR
_id, _ = self.engine.new_item(
@@ -1994,7 +1994,7 @@
rollback, engine_session, engine_topic, indata, kwargs
)
self._set_location_header(main_topic, version, topic, _id)
- outdata = {"id": _id}
+ outdata = {"_id": _id, "id": _id}
elif (
topic
in (
@@ -2011,7 +2011,7 @@
rollback, engine_session, engine_topic, indata, kwargs
)
self._set_location_header(main_topic, version, topic, _id)
- outdata = {"_id": _id}
+ outdata = {"_id": _id, "id": _id}
elif topic == "ksus" and item:
if item == "clone":
_id = self.engine.clone(
@@ -2024,7 +2024,7 @@
cherrypy.request.headers,
)
self._set_location_header(main_topic, version, topic, _id)
- outdata = {"id": _id}
+ outdata = {"_id": _id, "id": _id}
if item == "move":
op_id = self.engine.move_ksu(
engine_session, engine_topic, _id, indata, kwargs
@@ -2055,7 +2055,7 @@
cherrypy.request.headers,
)
self._set_location_header(main_topic, version, topic, _id)
- outdata = {"id": _id}
+ outdata = {"_id": _id, "id": _id}
if op_id:
outdata["op_id"] = op_id
cherrypy.response.status = HTTPStatus.ACCEPTED.value