15 Terminating a VNF

This procedure represents the Terminate VNF operation. The client can use this procedure to terminate a VNF instance. The POST method terminates a VNF instance.

Following are the two types of request parameters for the Terminate VNF operation:

  • FORCEFUL : The VNFM deletes the VNF and releases the resources immediately after accepting the request.
  • GRACEFUL : After accepting the request, the VNFM first validates if the VNF configuration is cleaned up. Once the validation is successful, VNFM deletes the VNF and releases the resources.

    Note:

    VNFM does not support clean-up or reverse cloud-init. The user must manually clean the configuration before Graceful Termination.

Below table describes the parameters used for sending request to VNFM.

Table 15-1 Parameters and Definitions for Terminating VNF

Parameters Definitions
terminationType Indicates whether forceful or graceful termination is requested.

15.1 Forceful Termination

The VNFM will delete the VNF immediately after accepting the request. The instance file is updated with VNF Operational State set to STOPPED.

Note:

If the VNF is still in service, requesting forceful termination can adversely impact the network service.

Figure 15-1 Forceful termination


Forceful termination

Terminating DSR and SDS VNF Instance Forcefully

Sample Request:

Request URL: POST: https://<<VNFM HOST IP>>:8443/vnflcm/<<vnfm_version>>/vnf_instances/< VNF ID received from create request>/terminate

Accept: application/json

Content-Type: application/json

Authorization: Token generated after login
{
   "terminationType": "FORCEFUL"
}

Sample Response

Response Code: 202
{
     location: https://localhost:8443/vnflcm/<<vnfm_version>>/vnf_lcm_op_occs/lcmOp-fb21f9d3-43ad-46cd-a03f-7220bb36a5c6  
     date: Tue, 29 Jan 2019 10:39:24 GMT  
     content-length: 0  content-type:
     application/xml 
}

15.2 Graceful Termination

The VNFM first validates that the VNF configuration is cleaned up after accepting the request. Once the configuration is cleaned, the VNFM deletes the VNF. The instance file is updated, setting the VNF Operational State to STOPPED.

This cleanup process is automated by the VNFM for DSR, SDS Signaling, and DR NOAM from NOAM. If Appworks configuration are not cleaned up automatically by VNFM, the orchestrator's graceful termination fails.

Note:

  • VNFM must automatically clean up AppWorks configurations before initiating graceful termination.
  • gracefulTerminationTimeout specifies the sleep time before graceful stack termination.

Figure 15-2 Graceful termination


Graceful termination

Sample Request for graceful termination::

Terminating VNF Instance gracefully

Request URL: POST:  https://<<VNFM HOST IP>>:8443/vnfm/<<vnfm_version>>/vnf_instances/< VNF ID received from create request>/terminate


Accept: application/json


Content-Type: application/json

20.3.1.2.1. Authorization : <Token generated after login>

{
  "terminationType": "GRACEFUL",
  "gracefulTerminationTimeout": 0
}

20.3.1.2.2. 
Sample Response for graceful termination:
Response Body for Terminate VNF Instance

Response Code : 202

{

     location: https://localhost:8443/vnflcm/<<vnfm_version>>/vnf_lcm_op_occs/lcmOp-fb21f9d3-43ad-46cd-a03f-7220bb36a5c6  

     date: Tue, 29 Jan 2019 10:39:24 GMT  

     content-length: 0  content-type:

     application/xml 

}