X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fnbi.py;h=9aff8574765807dfcb6347710cd842c351158fe4;hb=84a60df053d2e3f902e7e58d5f5a5db46789683e;hp=46fd8cce40c8df20f3409a0dccaa1c16cb9a24bc;hpb=acdb5d4d3d2452b5a7f3be87190875d3a06e6999;p=osm%2FNBI.git diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 46fd8cc..9aff857 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -92,7 +92,7 @@ URL: /osm GET POST heal O5 /ns_lcm_op_occs 5 5 / 5 5 5 - TO BE COMPLETED 5 5 + cancel 05 /vnf_instances (also vnfrs for compatibility) O / O /subscriptions 5 5 @@ -475,6 +475,10 @@ valid_url_methods = { "": { "METHODS": ("GET",), "ROLE_PERMISSION": "ns_instances:opps:id:", + "cancel": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "ns_instances:opps:cancel:", + }, }, }, "vnfrs": { @@ -1670,6 +1674,13 @@ class Server(object): ) outdata = {"id": _id} cherrypy.response.status = HTTPStatus.ACCEPTED.value + elif topic == "ns_lcm_op_occs" and item == "cancel": + indata["nsLcmOpOccId"] = _id + self.engine.cancel_item( + rollback, engine_session, "nslcmops", indata, None + ) + self._set_location_header(main_topic, version, topic, _id) + cherrypy.response.status = HTTPStatus.ACCEPTED.value else: _id, op_id = self.engine.new_item( rollback,