Commit 830093cb authored by garciadeblas's avatar garciadeblas
Browse files

Merge branch 'feature_10926_10915_SOL003' into 'master'

Feature 10915 & 10926 SOL003 APIs documentation

See merge request !95
parents ff4ad570 663bd929
Loading
Loading
Loading
Loading
+122 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ Some special keys used for administration are:

## URL and Methods summary

North Bound Interface (O: OSM specific; X,5: SOL005 not OSM implemented yet; O5: OSM and SOL005)
North Bound Interface (O: OSM specific; X,5: SOL005 not OSM implemented yet; O5: OSM and SOL005, 3: SOL003 implemented)

```text
URL: /osm                                                       GET     POST    PUT     DELETE  PATCH
@@ -124,6 +124,17 @@ URL: /osm GET POST
            /subscriptions                                      5       5
                /<subscriptionId>                               5                       X

	/vnflcm/v1
            /vnf_instances                                      3       3
                /<vnfInstanceId>                                3                       3
                    instantiate                                         3
                    terminate                                           3
                    scale                                               3
	    /vnf_lcm_op_occs                                    3
		/<vnfLcmOpOccId>                                3
	    /subscriptions                                      3       3
		/<subscriptionId>                               3                       3

        /pdu/v1
            /pdu_descriptors                                    O       O
                /<id>                                           O               O       O       O
@@ -646,3 +657,113 @@ netslice-vld:
`/nsilcm/v1/netslice_instances/nsi_lcm_op_occ/ID`. (rbac: `slice_instances:opps:id`)

- GET: Show details of a concrete Network Slice Instance operation

## VNFLCM Details

Since Release TWELVE, OSM supports the Or-Vnfm interface (SOL003) to allow life cycle operation of VNFs. With the support of [ETSI GS NFV-SOL003(https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_NFV-SOL003v030301p.pdf) 
API, OSM enables the ability to serve as independent VNFM that can be integrated with any other Orchestrator and can perform VNF Life cycle management operations.

Besides the addition of VNF lifecycle API calls to instantiate, scale and terminate the NF, this feature is complemented with the capability to subscribe to those events and be notified, in the same way that it was already supported for NS lifecycle events.

### Virtual Network Function Lifecycle Management Operations

`/vnflcm/v1/vnf_instances`. (rbac: `vnflcm_instances`)

- GET: Obtain the list of VNF Instances
- POST: Creates a VNF, but do not instantiate it. It returns the vnfInstanceId in the response header `'Location'`. Example of request content:

```yaml
vnfdId: vnfd-internal-id            # mandatory
vnfInstanceName: instance-name      # mandatory
vimAccountId: vim-id                # mandatory
vnfInstanceDescription: instance-description
additionalParams:
  constituent-cpd-id: connection-point-ref
  virtual-link-desc:
    -
      id: vld-name
      mgmt-network: true
  virtual-link-profile-id: vld-name
```

`/vnflcm/v1/vnf_instances/ID`. (rbac: `vnflcm_instances:id`)

- GET: Show details of a concrete VNF Instance
- DELETE: Deletes a VNF. It fails if VNF is in 'INSTANTIATED' state

`/vnflcm/v1/vnf_instances/ID/instantiate`. (rbac: `vnflcm_instances:id:instantiate:post`)

- POST: (Asynchronous). Deploys a VNF that it is in NOT_INSTANTIATED state. It returns the vnfLcmOpOccId (Operations Occurrence Id) in the response header `'Location'`. Example of request content:

```yaml
vnfName: instance-name                  # mandatory
vnfId: vnfd-id                          # mandatory
vimAccountId: vim-id                    # mandatory
vnfDescription: instance-description    # mandatory
```

`/vnflcm/v1/vnf_instances/ID/terminate`. (rbac: `vnflcm_instances:id:terminate:post`)

- POST: (Asynchronous). Undeploys a VNF that it is in INSTANTIATED state. It returns the vnfLcmOpOccId (Operations Occurrence Id) in the response header `'Location'`. Example of request content:

```yaml
terminationType: str
gracefulTerminationTimeout: int
```

`/vnflcm/v1/vnf_instances/ID/scale`. (rbac: `vnflcm_instances:id:scale:post`)

- POST: (Asynchronous). Performs a manual scale OUT/IN of the VNF. It returns the vnfLcmOpOccId (Operations Occurence Id) in the response header `'Location'`. Example of request content:

```yaml
type: SCALE_OUT|SCALE_IN
aspectId: scaling-aspect-id
numberOfSteps: int
additionalParams:
  member-vnf-index: member-vnf-index
```

`/vnflcm/v1/vnf_instances/vnf_lcm_op_occs`. (rbac: `vnf_instances:opps`)

- GET: Obtain the list of VNF Instances operations

`/vnflcm/v1/vnf_instances/vnf_lcm_op_occs/ID`. (rbac: `vnf_instances:opps:id`)

- GET: Show details of a concrete VNF Instance operation

### VNFLCM Subscription and Notification support

`/vnflcm/v1/subscriptions`. (rbac: `vnflcm_subscriptions`)

- GET: Obtain the list of subscriptions
- POST: Creates a subscription. It returns the subscriptionId in the response header `'Location'`. Example of request content:

Refer ETSI SOL003 document for filter options [Page no 97](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_NFV-SOL003v030301p.pdf)

```yaml
filter:
  VnfInstanceSubscriptionFilter:
    vnfdIds:
      - hackfest_basic_metrics-vnf
  notificationTypes:
    - VnfLcmOperationOccurrenceNotification
  operationTypes:
    - INSTANTIATE
  operationStates:
    - PROCESSING
CallbackUri: "http://webhook.site/82b1d459-dce8-4ed2-bda1-360049d23bc1"
authentication:
  authType: basic
  paramsBasic:
    userName: user
    password: user
```

This payload implies that, for vnfd id `hackfest_basic_metrics-vnf` if operation state is `PROCESSING` and operation type is `INSTANTIATE` then, send a notification to `http://webhook.site/82b1d459-dce8-4ed2-bda1-360049d23bc1` using the "authentication" mechanism whose payload is of datatype `VnfLcmOperationOccurrenceNotification`. Refer ETSI SOL003 document for notification reference [Page no 102](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_NFV-SOL003v030301p.pdf)

> Note: For detailed subscription and notification workflow refer (https://osm.etsi.org/docs/user-guide/latest/05-osm-usage.html#subscription-and-notification-support-in-osm)

`/vnflcm/v1/subscriptions/ID`. (rbac: `vnflcm_subscriptions:id`)

- GET: Show details of a concrete VNF subscription
- DELETE: Deletes a VNF subscription