Skip to content

Terminate a service

Thomas Soenen edited this page Aug 28, 2019 · 2 revisions

When the MANO Framework is used as part of the 5GTANGO Service Platform, please use the Gatekeeper component to make service termination requests. When using the MANO Framework in its standalone setup, it might be useful to use the sonmano library to interact with it.

To communicate directly with the MANO Framework, one needs to connect to the RabbitMQ message bus.

To terminate a running service, send a message on the service.instance.terminate topic. This message requires the following header fields:

  • app_id: to indicate the sender of the message
  • correlation_id: a correlation id for the message
  • reply_to: the topic on which the sender expects a response, in this case service.instance.terminate

The payload of the request is a yaml encoded dictionary that should include the following fields:

  • instance_id : the service instance id of the service that needs to be terminated

The MANO Framework will send two responses to this message on the same topic. A first response directly after receiving the request, to indicate that it was received, and whether the workflow was started. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin (the SLM) responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • status: either TERMINATING or ERROR, to indicate whether the workflow was started or rejected
  • error: None in case of no error, a string when there was an error
  • timestamp: the time when the response was sent

If the status in this message was TERMINATING, the MANO Framework will send an additional message at the end of the workflow. This message will have the following headers:

  • app_id: To indicate which MANO Framework plugin (the SLM) responded
  • correlation_id: The same correlation id as in the request

The payload of the message is a yaml encoded dictionary with the following fields:

  • status: either READY or ERROR, to indicate whether the workflow was successful or failed
  • error: None in case of no error, a string when there was an error
  • timestamp: the time when the response was sent
Clone this wiki locally