Skip to content

Instantiate a service

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

When the MANO Framework is used as part of the 5GTANGO Service Platform, please use the Gatekeeper component to make serivce instantiation 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 instantiate a service, a message should be posted on the service.instances.create topic. The message header should contain the following properties:

  • app_id: A string to indicate the sender of the message
  • correlation_id: A string containing a valid uuid that serves as correlation id for the message
  • reply_to: the topic on which the sender expects a response, in this case service.instances.create

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

  • NSD : A dictionary containing the network service descriptor
  • VNFD0: A dictionary containing the first network function descriptor
  • ...
  • VNFDx: A dictionary containing the (x+1)-th network function descriptor

Each of these descriptors should contain a uuid field that serves as a descriptor reference. The following fields are optional in the payload:

  • flavor: A string indicating which flavour of the network service to deploy. This string should match a flavour defined in the NSD.
  • ingresses: A list of ingress points for the service.
  • egresses: A list of egress points for the service.
  • user_data: A dictionary with data from the user requesting the service
  • mapping : A dictionary indicating how the service should be mapped on the available resources.
  • blacklist : A list of VIMs that should not be used for the mapping of the service.

The following example shows how the values of the above keys should be formatted

user_data:
  customer:
    name: Thomas
    email: [email protected]
  developer:
    username: Foo
    email: [email protected]
    phone: ''
flavor: 
blacklist: [37fdae20-47dc-4fa5-bf47-278b1adb3456]
egresses: []
ingresses:
- location: 65837364-47dc-4fa5-bf47-278bac54ed56
  nap: 1.1.1.1/24
mapping:
  network_functions:
  - {vnf_id: <foo> vim_id: <bar>}
  - {vnf_id: <foo2> vim_id: <bar2>}
  virtual_links:
  - {vl_id: <foo> vim_id: <bar> external_net: <foo.bar>}
  - {vl_id: <foo2> vim_id: <bar2> external_net: <foo.bar2>}

Ingress and egress locations should be either a VIM or a service endpoint known by own of the used WIM wrappers. Blacklist entries should be identifiers of a VIM known by one of the VIM wrappers. For mapping, vnf_id is the id of the VNF in the NSD, vl_id is the id if the virtual link inside the NSD. When using a predefined mapping, virtual links can only be mapped on VIM networks, not WIM networks.

Response

The MANO Framework will send two responses to request 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 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 INSTANTIATING 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 INSTANTIATING, the MANO Framework will send an additional message at the end of the workflow to indicate it was finished. 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
  • nsr: a dictionary with the generated service record, in case there was no error
  • vnfrs: a list of dictionaries with the generated function records, in case there was no error
Clone this wiki locally