From e2737f793ddf7b25b509b31c5627155b95788484 Mon Sep 17 00:00:00 2001 From: hammad zafar <hammad.zafar@xflowresearch.com> Date: Thu, 11 Mar 2021 12:42:58 +0500 Subject: [PATCH] fixed inconsistency in VNFSnapshotPackageManagement-API: VnfSnapshotPkgExtArtifactsAccessInfo --> VnfSnapshotPkgExtArtifactsAccessConfig --- ...essConfigurationForExternalArtifacts.robot | 4 +- ...VnfSnapshotPackageManagementKeywords.robot | 6 +- ...hotPkgExtArtifactsAccessConfig.schema.json | 68 +++++++++++++++++++ 3 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 SOL005/VNFSnapshotPackageManagement-API/schemas/VnfSnapshotPkgExtArtifactsAccessConfig.schema.json diff --git a/SOL005/VNFSnapshotPackageManagement-API/AccessConfigurationForExternalArtifacts.robot b/SOL005/VNFSnapshotPackageManagement-API/AccessConfigurationForExternalArtifacts.robot index cad4a06c..47e42406 100644 --- a/SOL005/VNFSnapshotPackageManagement-API/AccessConfigurationForExternalArtifacts.robot +++ b/SOL005/VNFSnapshotPackageManagement-API/AccessConfigurationForExternalArtifacts.robot @@ -25,7 +25,7 @@ GET Access Configuration for External Artifacts ... Post-Conditions: none GET Access Configuration for External Artifacts Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfSnapshotPkgExtArtifactsAccessInfo + Check HTTP Response Body Json Schema Is VnfSnapshotPkgExtArtifactsAccessConfig PUT Access Configuration for External Artifacts [Documentation] Test ID: 5.3.7.9.3 @@ -38,7 +38,7 @@ PUT Access Configuration for External Artifacts ... Post-Conditions: none PUT Access Configuration for External Artifacts Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfSnapshotPkgExtArtifactsAccessInfo + Check HTTP Response Body Json Schema Is VnfSnapshotPkgExtArtifactsAccessConfig PUT Access Configuration for External Artifacts - Conflict [Documentation] Test ID: 5.3.7.9.4 diff --git a/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot b/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot index fd207409..165ffc5b 100644 --- a/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot +++ b/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot @@ -774,7 +774,8 @@ PUT Access Configuration for External Artifacts Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - ${body}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessInfo.json + ${template}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessConfig.json + ${body}= Format String ${template} artifactUri=${ext_artifactPath} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -785,7 +786,8 @@ PUT Access Configuration for External Artifacts - Conflict Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - ${body}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessInfo.json + ${template}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessConfig.json + ${body}= Format String ${template} artifactUri=${ext_artifactPath} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/VNFSnapshotPackageManagement-API/schemas/VnfSnapshotPkgExtArtifactsAccessConfig.schema.json b/SOL005/VNFSnapshotPackageManagement-API/schemas/VnfSnapshotPkgExtArtifactsAccessConfig.schema.json new file mode 100644 index 00000000..f6252a50 --- /dev/null +++ b/SOL005/VNFSnapshotPackageManagement-API/schemas/VnfSnapshotPkgExtArtifactsAccessConfig.schema.json @@ -0,0 +1,68 @@ +{ + "description": "This type represents the access configuration information for downloading external VNF snapshot package artifacts. The NFVO can obtain the external VNF snapshot package artifact file through the information provided in this structure, together with information provided in the manifest. The data structure shall comply with the provisions defined in Table 11.5.2.9-1. If the data structure is part of a response body, security-sensitive attributes shall be excluded as specified in Table 11.5.2.9-1.\n", + "type": "object", + "properties": { + "artifact": { + "description": "Access configuration information for an external artifact.\n", + "type": "array", + "items": { + "type": "object", + "required": [ + "artifactUri" + ], + "properties": { + "artifactUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "overrideUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "authType": { + "description": "Defines the type of authentication / authorization for downloading the VNF package.\nPermitted values: - BASIC: Only the \"username\" and \"password\" attributes shall be present. - OAUTH2_CLIENT_CREDENTIALS: Only the \"paramsOauth2ClientCredentials\" attribute shall be present.\nThis attribute shall not be present if no credentials are provided for the artifact.\n", + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS" + ] + }, + "username": { + "description": "Username to be used for authentication.\n", + "type": "string" + }, + "password": { + "description": "Password to be used for authentication. Shall not be present in response bodies.\n", + "type": "string" + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS.\n", + "type": "object", + "required": [ + "clientId", + "clientPassword", + "tokenEndpoint" + ], + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall not be present in response bodies.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + } + } + } + } + } + } + } +} \ No newline at end of file -- GitLab