Virtualized Network Function Packages (VNF packages)

Virtualized Network Function Packages (VNF packages)

Manages Virtualized Network Function Packages (VNF Packages) and their resources.

A VNF Package is a tar-archive containing all the information required for managing the lifecycle of a VNF.

POST
/vnfpkgm/v1/vnf_packages

Create VNF Package

Creates a VNF Package.

Response Codes

Success

Code

Reason

201 - Created

Resource was created and is ready to use.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Request Parameters

Name

In

Type

Description

userDefinedData (Optional)

body

object

User defined data for the VNF package.

Request Example

{
   "userDefinedData":{
      "abc":"xyz"
   }
}

Response Parameters

Name

In

Type

Description

id

body

string

Identifier of the VNF package. This identifier is allocated by the NFVO.

_links

body

object

Links to resources related to this resource.

onboardingState

body

string

On-boarding state of the VNF package. The on-boarding state is represented by the “onboardingState” attribute in the “VnfPkgInfo” information element with below values: CREATED: The VNF Package information object is created. UPLOADING: The VNF Package is being uploaded. PROCESSING: The VNF Package is being processed, e.g. validation. ONBOARDED: The VNF Package is successfully on-boarded.

operationalState

body

string

Operational state of the VNF package. The operational state is represented by the “operationalState” attribute in the “VnfPkgInfo” information element with below values: ENABLED: The VNF Package is enabled. DISABLED: The VNF Package is disabled. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the operationalState attribute shall be equal to “DISABLED”.

usageState

body

string

Usage state of the VNF package. The usage state is represented by the “usageState” attribute in the “VnfPkgInfo” information element with below values: IN_USE: The VNF Package is in use. NOT_IN_USE: The VNF Package is not in use. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the usageState attribute shall be equal to “NOT_IN_USE”.

userDefinedData

body

object

User defined data for the VNF package.

Response Example

{
   "usageState":"NOT_IN_USE",
   "userDefinedData":{
      "abc":"xyz"
   },
   "_links":{
      "packageContent":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/package_content"
      },
      "self":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
      },
      "vnfd":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/vnfd"
      }
   },
   "onboardingState":"CREATED",
   "operationalState":"DISABLED",
   "id":"4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
}
GET
/vnfpkgm/v1/vnf_packages

List VNF Packages

Lists VNF Packages.

If a response includes a LINK HTTP header (see IETF RFC 8288 [1]) with the “rel” attribute set to “next”, the API consumer can send a GET request to the URI communicated in the LINK header to obtain the next page of results.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Response Parameters

Name

In

Type

Description

id

body

string

Identifier of the VNF package. This identifier is allocated by the NFVO.

vnfdId

body

string

This identifier, which is managed by the VNF provider, identifies the VNF package and the VNFD in a globally unique way. It is copied from the VNFD of the onboarded VNF package. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfProvider

body

string

Provider of the VNF package and the VNFD. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfProductName

body

string

Name to identify the VNF product. Invariant for the VNF product lifetime. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfSoftwareVersion

body

string

Software version of the VNF. This is changed when there is any change to the software included in the VNF package. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfdVersion

body

string

The version of the VNFD. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

softwareImages

body

array

Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.

onboardingState

body

string

On-boarding state of the VNF package. The on-boarding state is represented by the “onboardingState” attribute in the “VnfPkgInfo” information element with below values: CREATED: The VNF Package information object is created. UPLOADING: The VNF Package is being uploaded. PROCESSING: The VNF Package is being processed, e.g. validation. ONBOARDED: The VNF Package is successfully on-boarded.

operationalState

body

string

Operational state of the VNF package. The operational state is represented by the “operationalState” attribute in the “VnfPkgInfo” information element with below values: ENABLED: The VNF Package is enabled. DISABLED: The VNF Package is disabled. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the operationalState attribute shall be equal to “DISABLED”.

usageState

body

string

Usage state of the VNF package. The usage state is represented by the “usageState” attribute in the “VnfPkgInfo” information element with below values: IN_USE: The VNF Package is in use. NOT_IN_USE: The VNF Package is not in use. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the usageState attribute shall be equal to “NOT_IN_USE”.

userDefinedData

body

object

User defined data for the VNF package.

_links

body

object

Links to resources related to this resource.

Response Example

{
   "vnf_packages":[
      {
         "vnfSoftwareVersion":"1.0",
         "usageState":"NOT_IN_USE",
         "vnfProductName":"Sample VNF",
         "softwareImages":[
            {
               "imagePath":"",
               "diskFormat":"qcow2",
               "userMetadata":{

               },
               "id":"VirtualStorage",
               "size":2,
               "name":"VrtualStorage",
               "checksum":{
                  "hash":"932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464",
                  "algorithm":"sha-256"
               },
               "minDisk":2,
               "version":"0.5.2",
               "provider":"provider",
               "minRam":8192,
               "containerFormat":"bare"
            },
            {
               "imagePath":"",
               "diskFormat":"qcow2",
               "userMetadata":{

               },
               "id":"VDU1",
               "size":1,
               "name":"Software of VDU1",
               "checksum":{
                  "hash":"932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464",
                  "algorithm":"sha-256"
               },
               "minDisk":1,
               "version":"0.5.2",
               "provider":"provider",
               "minRam":0,
               "containerFormat":"bare"
            }
         ],
         "vnfProvider":"Test VNF Provider",
         "userDefinedData":{
            "abc":"xyz"
         },
         "vnfdId":"b3ab49d6-389d-46f9-8650-d0bf778b5e92",
         "_links":{
            "packageContent":{
               "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/package_content"
            },
            "self":{
               "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
            },
            "vnfd":{
               "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/vnfd"
            }
         },
         "vnfdVersion":"1.0",
         "onboardingState":"ONBOARDED",
         "operationalState":"DISABLED",
         "id":"4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
      }
   ]
}
GET
/vnfpkgm/v1/vnf_packages/{vnf_package_id}

Show VNF Package

Shows information of a given VNF Package.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

Response Parameters

Name

In

Type

Description

id

body

string

Identifier of the VNF package. This identifier is allocated by the NFVO.

vnfdId

body

string

This identifier, which is managed by the VNF provider, identifies the VNF package and the VNFD in a globally unique way. It is copied from the VNFD of the onboarded VNF package. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfProvider

body

string

Provider of the VNF package and the VNFD. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfProductName

body

string

Name to identify the VNF product. Invariant for the VNF product lifetime. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfSoftwareVersion

body

string

Software version of the VNF. This is changed when there is any change to the software included in the VNF package. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

vnfdVersion

body

string

The version of the VNFD. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.

softwareImages

body

array

Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.

onboardingState

body

string

On-boarding state of the VNF package. The on-boarding state is represented by the “onboardingState” attribute in the “VnfPkgInfo” information element with below values: CREATED: The VNF Package information object is created. UPLOADING: The VNF Package is being uploaded. PROCESSING: The VNF Package is being processed, e.g. validation. ONBOARDED: The VNF Package is successfully on-boarded.

operationalState

body

string

Operational state of the VNF package. The operational state is represented by the “operationalState” attribute in the “VnfPkgInfo” information element with below values: ENABLED: The VNF Package is enabled. DISABLED: The VNF Package is disabled. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the operationalState attribute shall be equal to “DISABLED”.

usageState

body

string

Usage state of the VNF package. The usage state is represented by the “usageState” attribute in the “VnfPkgInfo” information element with below values: IN_USE: The VNF Package is in use. NOT_IN_USE: The VNF Package is not in use. If the value of the onboardingState attribute is not equal to “ONBOARDED”, the value of the usageState attribute shall be equal to “NOT_IN_USE”.

userDefinedData

body

object

User defined data for the VNF package.

_links

body

object

Links to resources related to this resource.

Response Example

{
   "vnfSoftwareVersion":"1.0",
   "usageState":"NOT_IN_USE",
   "vnfProductName":"Sample VNF",
   "softwareImages":[
      {
         "imagePath":"",
         "diskFormat":"qcow2",
         "userMetadata":{

         },
         "id":"VirtualStorage",
         "size":2000000000, // unit for 'size` is always in Bytes
         "name":"VrtualStorage",
         "checksum":{
            "hash":"932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464",
            "algorithm":"sha-256"
         },
         "minDisk":2000000000, // unit for 'minDisk' is always in Bytes
         "version":"0.5.2",
         "provider":"provider",
         "minRam":8192000000, // unit for 'minRam' is always in Bytes
         "containerFormat":"bare"
      },
      {
         "imagePath":"",
         "diskFormat":"qcow2",
         "userMetadata":{

         },
         "id":"VDU1",
         "size":1000000000,
         "name":"Software of VDU1",
         "checksum":{
            "hash":"932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464",
            "algorithm":"sha-256"
         },
         "minDisk":1000000000,
         "version":"0.5.2",
         "provider":"provider",
         "minRam":0,
         "containerFormat":"bare"
      }
   ],
   "vnfProvider":"Test VNF Provider",
   "userDefinedData":{
      "abc":"xyz"
   },
   "vnfdId":"b3ab49d6-389d-46f9-8650-d0bf778b5e92",
   "_links":{
      "packageContent":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/package_content"
      },
      "self":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
      },
      "vnfd":{
         "href":"/vnfpkgm/v1/vnf_packages/4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb/vnfd"
      }
   },
   "vnfdVersion":"1.0",
   "onboardingState":"ONBOARDED",
   "operationalState":"DISABLED",
   "id":"4e8b9d2c-ecb5-408b-a8ce-8ea0890bacbb"
}
DELETE
/vnfpkgm/v1/vnf_packages/{vnf_package_id}

Delete VNF Package

Deletes a given VNF Package.

Preconditions

The vnf package operationalState value must be DISABLED and it’s usageState value must be NOT_IN_USE.

Response Codes

Success

Code

Reason

204 - No Content

The server has fulfilled the request by deleting the resource.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

PUT
/vnfpkgm/v1/vnf_packages/{vnf_package_id}/package_content

Upload VNF Package from content

Upload a given VNF Package from content.

Note

Please refer Hashing algorithm for software image checksum section for more information about software image checksum.

Response Codes

Success

Code

Reason

202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

vnf_package_content

body

object

A VNF Package is a tar-archive containing all the information required for managing the lifecycle of a VNF. The “Content-Type” HTTP header should be set to “application/zip”.

POST
/vnfpkgm/v1/vnf_packages/{vnf_package_id}/package_content/upload_from_uri

Upload VNF Package from uri

Upload a given VNF Package from content.

Note

Please refer Hashing algorithm for software image checksum section for more information about software image checksum.

Response Codes

Success

Code

Reason

202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

400 - Bad Request

Some content in the request was invalid.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

addressInformation

body

string

Address information of the VNF package content. The NFVO can use this address to obtain the VNF package.

userName (Optional)

body

string

User name to be used for authentication. Shall be present if user name is needed but has not been provisioned out of band.

password (Optional)

body

string

Password to be used for authentication. Shall be present if password is needed but has not been provisioned out of band.

PATCH
/vnfpkgm/v1/vnf_packages/{vnf_package_id}

Update VNF Package Information

Updates the information of a VNF package.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

operationalState (Optional)

body

string

New value of the operational state of the on-boarded instance of the VNF package. Valid values are “ENABLED” and “DISABLED”. See note.

userDefinedData (Optional)

body

object

User defined data to be updated. For existing keys, the value is replaced.

Note

At least one of the “operationalState” or “userDefinedData” parameters shall be present. If the VNF package is not on-boarded, the operation is used only to update existing or add additional user defined data using the “userDefinedData” attribute. If user passes existing user defined data with exact same key/values pairs, then it would return 400 error.

Request Example

{
   "operationalState": "DISABLED",
   "userDefinedData": {
      "key1": "value1",
      "key2": "value2"
   }
}

Response Parameters

Name

In

Type

Description

operationalState (Optional)

body

string

Updated value of the operational state of the on-boarded instance of the VNF package.

userDefinedData (Optional)

body

object

Updated value of user defined data.

Response Example

{
   "operationalState":"DISABLED",
   "userDefinedData":{
      "abc":"xyz"
   }
}
GET
/vnfpkgm/v1/vnf_packages/{vnf_package_id}/vnfd

Read VNFD of an individual VNF package

Read VNFD of an on-boarded VNF package.

The VNFD can be implemented as a single file or as a collection of multiple files. If the VNFD is implemented in the form of multiple files, a ZIP file embedding these files shall be returned. If the VNFD is implemented as a single file, either that file or a ZIP file embedding that file shall be returned. The selection of the format is controlled by the “Accept” HTTP header passed in the GET request.

If the “Accept” header contains only “text/plain” and the VNFD is implemented as a single file, the file shall be returned; otherwise, an error message shall be returned. If the “Accept” header contains only “application/zip”, the single file or the multiple files that make up the VNFD shall be returned embedded in a ZIP file. If the “Accept” header contains both “text/plain” and “application/zip”, it is up to the NFVO to choose the format to return for a single-file VNFD; for a multi-file VNFD, a ZIP file shall be returned.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

406 - Not Acceptable

Not Acceptable, the requested resource is only capable of generating content not acceptable according to the ‘Accept’ headers sent in the request.

409 - Conflict

This operation conflicted with another operation on this resource.

500 - Internal Server Error

Something went wrong inside the service. This should not happen usually. If it does happen, it means the server has experienced some serious problems.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

Accept

header

string

If the VNFD is implemented in the form of multiple files, zip file will be returned with Content-Type set as application/zip otherwise it will be set to text/plain in the response header.

Response

Name

In

Type

Description

Content-Type

header

string

If the VNFD is implemented in the form of multiple files, zip file will be returned with Content-Type set as application/zip otherwise it will be set to text/plain in the response header.

GET
/vnfpkgm/v1/vnf_packages/{vnf_package_id}/package_content

Fetch an on-boarded VNF package with HTTP_RANGE

Fetch an on-boarded VNF package with HTTP_RANGE.

The GET method fetches the content of a VNF package identified by the VNF package identifier allocated by the NFVO.

The ‘HTTP_RANGE’ header is inspected for a valid value. If it is present and valid, then the package content within the range is fetched. If not present the entire content is fetched.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

206 - Partial Content

Partial Content, The server has fulfilled the partial GET request for the resource.

Error

Code

Reason

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

416 - Requested Range Not Satisfiable

Requested Range Not Satisfiable, A server SHOULD return a response with this status code if a request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field.

500 - Internal Server Error

Something went wrong inside the service. This should not happen usually. If it does happen, it means the server has experienced some serious problems.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

Accept

header

string

The fetched VNF Package will be returned with Content-Type set as application/zip in the response header.

Range (Optional)

header

string

The byte range of VNF Package to be downloaded is specified in the Range header.

Response

Name

In

Type

Description

Content-Type

header

string

The fetched VNF Package will be returned with Content-Type set as application/zip in the response header.

GET
/vnfpkgm/v1/vnf_packages/{vnf_package_id}/artifacts/{artifact_path}

Fetch an on-boarded VNF package Artifacts with HTTP_RANGE

Fetch an on-boarded VNF package Artifacts with HTTP_RANGE.

The GET method fetches the content of an artifact within a VNF package.

The ‘HTTP_RANGE’ header is inspected for a valid value. If it is present and valid, then the artifact content within the range is fetched. If not present the entire content is fetched.

Response Codes

Success

Code

Reason

200 - OK

Request was successful.

206 - Partial Content

Partial Content, The server has fulfilled the partial GET request for the resource.

Error

Code

Reason

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.

416 - Requested Range Not Satisfiable

Requested Range Not Satisfiable, A server SHOULD return a response with this status code if a request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field.

Request Parameters

Name

In

Type

Description

vnf_package_id

path

string

The UUID of the VNF Package.

artifact_path

path

string

The artifact file’s path in the VNF package.

Accept

header

string

According to the artifact file extension, it is automatically set to the corresponding Mime-Type in the response header. When the corresponding Mime-Type is not found, set as application/octet-stream.

Range (Optional)

header

string

The byte range of VNF Package to be downloaded is specified in the Range header.

Response

Name

In

Type

Description

Content-Type

header

string

According to the artifact file extension, it is automatically set to the corresponding Mime-Type in the response header. When the corresponding Mime-Type is not found, set as application/octet-stream.

Reference

Hashing algorithm for software image checksum

While adding software images in VNF descriptors of VNF packages, it is recommended to use algorithm as defined in ETSI_GS_NFV_SOL_004 and it must also match with the hashing_algorithm config option set by Glance service otherwise it will fail to verify checksum during instantiation of VNF. The default hashing_algorithm configured in Glance service is sha512 and an operator can override the default with any of these algorithms sha3_384, sha224, md5, sha512, blake2b, sha3_512, blake2s, sha384, sha1, shake_256, sha256, shake_128 and sha3_256.