SOL002 VNF LCM Coordination - Implementation of Robot tests

This merge request refers to the implementation of Robot tests of SOL002 VNF LCM Coordination Interface.

@lynchpi @aelken @matsuurat @sayama @kraja @zafar @muhammadh @abbasim

Deadline for review: Friday 5th November 2021 @6pm CET

Review period elapsed: Approved !

Edited by Giacomo Bernini

Merge request reports

Loading
+37 −0
Changes for SOL002/VNFLCMCoordination-API/environment/variables.txt: 37 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Variables ***
${AUTH_USAGE}      1
${AUTHORIZATION_HEADER}      Authorization
${AUTHORIZATION_TOKEN}      Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${INSUFFICIENT_AUTHORIZATION_TOKEN}    Bearer INSUFFICIENT_AUTHORIZATION_TOKEN  #The provided authorization token can be insufficient, expired, etc, and server refuses to authorize the request with this token.
${apiRoot}      /
${apiName}      lcmcoord
${apiMajorVersion}      v1
${response}=    httpresponse
${EM-VNF_HOST}      localhost    # Hostname of the NFVO
${EM-VNF_PORT}      8081    # Listening port of the NFVO
${EM-VNF_SCHEMA}    https
${CONTENT_TYPE_JSON}    application/json
${ACCEPT_JSON}         application/json

${SYNCHRONOUS_MODE_SUPPORT}      1  #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode.

${coordinationId}      6fc3539c-e602-4afa-8e13-962fb5a7d81f

${Id_of_Finished_Coordination_Action}      6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite.
${Id_of_Ongoing_Coordination_Action}      6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing.

### Template data for coordinationRequest
${vnfInstanceId}      6fc3539c-e602-4afa-8e13-962fb5a7d81f    
${vnfLcmOpOccId}      6fc3539c-e602-4afa-8e13-962fb5a7d81f
${coordinationActionName}      6fc3539c-e602-4afa-8e13-962fb5a7d81f
${lcmOperationType}      INSTANTIATE  #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions
${vnfLcmOpOccHref}
${vnfInstanceHref}

### Template data for coordinationRequest for LCMOpp not in PROCESSING state
${vnfLcmOpOccHrefNotProcessing}    not-in-PROCESSING-vnfLcmOpOccHref-for-conflict-scenario
${vnfLcmOpOccIdNotProcessing}    not-in-PROCESSING-vnfLcmOpOccId-for-conflict-scenario

### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request
${vnfLcmOpOccHrefServiceUnavailable}
${vnfLcmOpOccIdServiceUnavailable}
 No newline at end of file
+14 −0
Changes for SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
{{
	"vnfInstanceId":"{vnfInstanceId}",
	"vnfLcmOpOccId":"{vnfLcmOpOccId}",
	"lcmOperationType": "{lcmOperationType}",
	"coordinationActionName": "{coordinationActionName}",
    "_links": {{
    "vnfLcmOpOcc": {{
      "href": "{vnfLcmOpOccHref}"
    }},
    "vnfInstance": {{
      "href": "{vnfInstanceHref}"
    }}
  }}
}}
 No newline at end of file
+39 −0
Changes for SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json: 39 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
    "description": "This type represents API version information.\n",
    "type": "object",
    "required": [
      "uriPrefix",
      "apiVersions"
    ],
    "properties": {
      "uriPrefix": {
        "description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/.\n",
        "type": "string"
      },
      "apiVersions": {
        "description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n",
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "version"
          ],
          "properties": {
            "version": {
              "description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 9.1 (SOL013).\n",
              "type": "string"
            },
            "isDeprecated": {
              "description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false).\nA deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n",
              "type": "boolean"
            },
            "retirementDate": {
              "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
              "type": "string",
              "format": "date-time"
          }
        }
      }
    }
  }
}
 No newline at end of file
+148 −0
Changes for SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json: 148 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
    "description": "This type represents an LCM coordination result.\n",
    "type": "object",
    "required": [
      "id",
      "coordinationResult",
      "vnfInstanceId",
      "vnfLcmOpOccId",
      "lcmOperationType",
      "coordinationActionName",
      "_links"
    ],
    "properties": {
      "id": {
        "description": "An identifier with the intention of being globally unique.\n",
        "type": "string"
      },
      "coordinationResult": {
        "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n",
        "type": "string",
        "enum": [
          "CONTINUE",
          "ABORT",
          "CANCELLED"
        ]
      },
      "vnfInstanceId": {
        "description": "An identifier with the intention of being globally unique.\n",
        "type": "string"
      },
      "vnfLcmOpOccId": {
        "description": "An identifier with the intention of being globally unique.\n",
        "type": "string"
      },
      "lcmOperationType": {
        "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n",
        "type": "string",
        "enum": [
          "INSTANTIATE",
          "SCALE",
          "SCALE_TO_LEVEL",
          "CHANGE_FLAVOUR",
          "TERMINATE",
          "HEAL",
          "OPERATE",
          "CHANGE_EXT_CONN",
          "MODIFY_INFO",
          "CREATE_SNAPSHOT",
          "REVERT_TO_SNAPSHOT",
          "CHANGE_VNFPKG"
        ]
      },
      "coordinationActionName": {
        "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n",
        "type": "string"
      },
      "outputParams": {
        "description": "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 keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n",
        "type": "object"
      },
      "warnings": {
        "description": "Warning messages that were generated while the operation was executing.\n",
        "type": "string"
      },
      "error": {
        "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807.\n",
        "type": "object",
        "required": [
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "description": "A URI reference according to IETF RFC 3986 that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
            "type": "string",
            "format": "URI"
          },
          "title": {
            "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type.  It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
            "type": "string"
          },
          "status": {
            "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
            "type": "integer"
          },
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.\n",
            "type": "string"
          },
          "instance": {
            "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
            "type": "string",
            "format": "URI"
          }
        }
      },
      "_links": {
        "description": "Links to resources related to this resource.\n",
        "type": "object",
        "required": [
          "self",
          "vnfLcmOpOcc",
          "vnfInstance"
        ],
        "properties": {
          "self": {
            "description": "This type represents a link to a resource using an absolute URI.\n",
            "type": "object",
            "required": [
              "href"
            ],
            "properties": {
              "href": {
                "description": "String formatted according to IETF RFC 3986.\n",
                "type": "string"
              }
            }
          },
          "vnfLcmOpOcc": {
            "description": "This type represents a link to a resource using an absolute URI.\n",
            "type": "object",
            "required": [
              "href"
            ],
            "properties": {
              "href": {
                "description": "String formatted according to IETF RFC 3986.\n",
                "type": "string"
              }
            }
          },
          "vnfInstance": {
            "description": "This type represents a link to a resource using an absolute URI.\n",
            "type": "object",
            "required": [
              "href"
            ],
            "properties": {
              "href": {
                "description": "String formatted according to IETF RFC 3986.\n",
                "type": "string"
              }
            }
          }
        }
      }
    }
  }  
 No newline at end of file
+34 −0
Changes for SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json: 34 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
    "definitions": {},
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
    "properties": {
      "type": {
        "type": "string",
        "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
        "format": "URI"
      },
      "title": {
        "type": "string",
        "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type.  It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
      },
      "status": {
        "type": "integer",
        "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
      },
      "detail": {
        "type": "string",
        "description": "A human-readable explanation specific to this occurrence of the problem.\n"
      },
      "instance": {
        "type": "string",
        "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
        "format": "URI"
      }
    },
    "required": [
      "status",
      "detail"
    ]
  }
 No newline at end of file
Loading
Loading