Commit 704bce15 authored by Lars-Erik Helander's avatar Lars-Erik Helander Committed by Michele Carignani
Browse files

Added VNFConfiguration API. Updated shared definitions.

Change-Id: Ia15279ce4310e381df92ab22908fc98839c5f4ce
parent 46079d2d
swagger: "2.0"
info:
version: "2.3.1"
title: "VNF Configuration interface"
description: "VNF Indicator interface of ETSI NFV SOL002"
termsOfService: "http://etsi.org"
contact:
name: "NFV-SOL WG"
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
basePath: /vnfconfig/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
/configuration:
get:
summary: Read VNF/VNFC configuration from VNF.
description: >
The client can use this method to read configuration information about a VNF instance and/or its VNFC instances.
responses:
200:
description: >
Configuration information about a VNF instance was read successfully.
The response body shall contain a representation of the configuration resource.
schema:
$ref: 'definitions/Definition_VnfConfiguration.yaml#/definitions/VnfConfiguration'
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' }
401: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/401' }
403: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/403' }
404: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/404' }
405: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/405' }
406: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/406' }
409: { $ref: 'responses/VNFConfiguration_resp.yaml#/responses/409' }
416: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/416' }
422: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/422' }
500: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/500' }
503: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/503' }
patch:
summary: Modify VNF/VNFC configuration.
description: This method sets or modifies a configuration resource.
parameters:
- name: configModifications
description: The parameter for the configuration modification.
required: true
in: body
schema:
$ref: 'definitions/Definition_VnfConfiguration.yaml#/definitions/VnfConfigModifications'
responses:
200:
description: >
The request was accepted and completed. The response body shall contain the parameters
of the configuration modification that was applied to the configuration resource.
schema:
$ref: 'definitions/Definition_VnfConfiguration.yaml#/definitions/VnfConfigModifications'
412: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/412' }
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' }
401: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/401' }
403: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/403' }
404: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/404' }
405: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/405' }
406: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/406' }
409: { $ref: 'responses/VNFConfiguration_resp.yaml#/responses/409' }
416: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/416' }
422: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/422' }
500: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/500' }
503: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/503' }
definitions:
VnfConfiguration:
description: >
This type represents configuration parameters of a VNF instance and its VNFC instances.
type: object
required:
- vnfConfigurationData
properties:
vnfConfigurationData:
description: >
Configuration parameters of the VNF instance.
$ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData:
description: >
Configuration parameters of the VNFC instances.
type: array
items:
$ref: '#/definitions/VnfcConfigurationData'
VnfConfigModifications:
description: >
This type represents request parameters for the "Set Configuration" operation.
* NOTE 1: At least one of "vnfConfigurationData" and "vnfcConfigurationData"
shall be present.
* NOTE 2: The VnfcConfiguration data type can only be used to modify the configuration
of existing VNFC instances.
type: object
properties:
vnfConfigurationData:
description: >
Modifications to configuration data for the VNF instance. See NOTE 1.
If present, the modifications of the "vnfConfigurationData" attribute shall
be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396).
$ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData:
description: >
Modifications to configuration data for certain VNFC instances. See NOTE 1 and NOTE 2.
If present, the modifications of the "vnfcConfigurationData" attribute shall follow these
provisions:
Modifying an attribute that is an array of objects of type "VnfcConfigurationData".
Assumptions:
1) "oldList" is the "VnfcConfigurationData" array to be modified and "newList"
is the "VnfcConfigurationData" array that contains the changes.
2) "oldEntry" is an entry in "oldList" and "newEntry" is an entry in "newList".
3) A "newEntry" has a "corresponding entry" if there exists an "oldEntry" that
has the same content of the "vnfcInstanceId" attribute as the "newEntry";
a "newEntry" has no corresponding entry if no such "oldEntry" exists.
4) In any array of "VnfcConfigurationData" structures, the content of "vnfcInstanceId"
is unique (i.e. there shall be no two entries with the same content of "vnfcInstanceId").
Provisions:
1) For each "newEntry" in "newList" that has no corresponding entry in "oldList",
the "oldList" array shall be modified by adding that "newEntry".
2) For each "newEntry" in "newList" that has a corresponding "oldEntry" in "oldList",
the value of "oldEntry" shall be updated with the value of "newEntry" according to
the rules of JSON Merge PATCH (see IETF RFC 7396 ).
type: array
items:
$ref: '#/definitions/VnfcConfigurationData'
VnfConfigurationData:
description: >
This type represents configuration parameters of a VNF instance.
type: object
properties:
extCpConfig:
description: >
Configuration parameters for the external CPs of the VNF instance.
$ref: '#/definitions/CpConfiguration'
dhcpServer:
description: >
IP address of the DHCP server that the VNF instance can use to obtain
IP addresses to be assigned to its external CPs.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress'
vnfSpecificData:
description: >
Additional configurable properties of the VNF instance declared in the
VNFD as "VnfConfigurableProperties".
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs'
VnfcConfigurationData:
description: >
This type represents configuration parameters of a VNFC instance.
type: object
required:
- vnfcInstanceId
properties:
vnfcInstanceId:
description: >
Identifier of a VNFC instance to which this set of configuration data applies.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf'
extCpConfig:
description: >
Configuration parameters for the external CPs of the VNFC instance.
$ref: '#/definitions/CpConfiguration'
dhcpServer:
description: >
IP address of the DHCP server that the VNF instance can use to obtain
IP addresses to be assigned to its external CPs.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress'
vnfcSpecificData:
description: >
Additional configurable properties of the VNFC instance declared in the
VNFD as "VnfcConfigurableProperties".
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs'
CpConfiguration:
description: >
This type represents configuration parameters of a CP instance.
type: object
required:
- cpId
- cpdId
- addresses
properties:
cpId:
description: >
Identifier of a CP instance within the namespace of a specific VNF instance or a VNFC instance.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf'
cpdId:
description: >
Identifier of the CPD in the VNFD.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd'
addresses:
description: >
Network address and port assigned to the CP.
type: array
items:
$ref: '#/definitions/CpAddress'
CpAddress:
description: >
This type represents configuration parameters of a CP instance address.
* NOTE 1: Either "address" or "useDynamicAddress" shall be present.
* NOTE 2: At least one of "macAddress" and "ipAddress" shall be present.
type: object
properties:
address:
description: >
Network address that has been configured on the CP. See NOTE 1.
type: object
properties:
macAddress:
description: >
Mac address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/MacAddress'
ipAddress:
description: >
IP address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress'
useDynamicAddress:
description: >
Set to true if an address shall be assigned dynamically. Otherwise set to false.
The default value shall be false. See NOTE 1.
type: boolean
port:
description: >
The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).
type: integer
responses:
409:
description: >
Another request is in progress that prohibits the fulfilment of
the current request, or the current resource state is inconsistent
with the request.
headers:
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
WWW-Authenticate:
description: >
Challenge if the corresponding HTTP request has not provided
authorization, or error details if the corresponding HTTP
request has provided an invalid authorization token.
type: string
maximum: 1
minimum: 0
schema:
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
......@@ -2,11 +2,45 @@
# https://forge.etsi.org/etsi-forge-copyright-notice.txt
definitions:
Link:
description: >
This type represents a link to a resource.
type: object
required:
- href
properties:
href:
description: >
URI of the referenced resource.
type: string
format: url
Version:
description: >
A version.
type: string
MacAddress:
description: >
A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.
type: string
format: MAC
IpAddress:
description: >
An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal
integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that
consists of groups of zero to four hexadecimal digits, separated by colons.
type: string
format: IP
DateTime:
description: >
Date-time stamp.
Representation: String formatted according to IETF RFC 3339.
type: string
format: "date-time"
Identifier:
description: >
......@@ -26,7 +60,9 @@ definitions:
KeyValuePairs:
description: >
This type is represented in JSON as an extensible JSON object
This type represents a list of key-value pairs. The order of the pairs in the list is not significant.
In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions
defined in clause 4 of IETF RFC 7159.
type: object
ProblemDetails:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment