How do I link services?

Linked Service object

Service management allows for the addition of a ‘Linked Service’ object to existing services using an API. When adding a ‘Linked Service’ object to these target services, users specify the service to which they will be linked. Once linked, the operational state of the target services will then align with/be inherited from the service to which they are linked.

Note: When linked to a composite service, the operational state that the target services will inherit will be an aggregate of the operational states of the services that comprise the composite service.

Note: A composite service cannot be specified as a target service.

Adding a Linked Service object

The following API is used to add a ‘Linked Service’ object to existing services:

POST /restconf/operations/nsp-service-actions:add-linked-service

{

  "input": {

    "linked-service-identifier": "/nsp-service:services/service-layer/composite:composite[service-id='linked_ID']",

    "target-service-identifiers": [

      "/nsp-service:services/service-layer/eline[service-id='target_ID']"

    ]

  }

}

where

linked_ID is the ID of an existing service to which the target services will link

target_ID is the ID of an existing service to which a ‘Linked Service’ object will be added

Removing a Linked Service object

The following API is used to remove a ‘Linked Service’ object from an existing service:

POST /restconf/operations/nsp-service-actions:remove-linked-service

{

  "input": {

    "target-service-identifiers": [

      "/nsp-service:services/service-layer/eline[service-id='target_ID']"

    ]

  }

}

Where target_ID is the ID of an existing service from which a ‘Linked Service’ object will be removed

Enabling and disabling event notifications

The following command can be used to enable or disable the event notifications that occur when the operational state of a linked service is updated:

kubectl edit configmap nsp-service-oper-model-app-conf-log-configmap --namespace nsp-psa-restricted

    svcoper.linkedsvc.operstate

{       updateEventEnabled = true     }

Note: When updateEventEnabled is set to true, operational state update event notifications are enabled. When updateEventEnabled is set to false, operational state update event notifications are disabled.