From 9b8ec7fe770e67ecad5460b2c6154dc7d9548fde Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Thu, 11 Feb 2021 12:57:36 +0100 Subject: [PATCH] updated NSD, VNFD, PNFD files and zip management --- .../NSDManagement-API/NSDManagementKeywords.robot | 10 +++++----- .../NSDManagement-API/environment/variables.txt | 6 ++++-- SOL005/NSDManagement-API/files/nsd.yml | 3 +++ SOL005/NSDManagement-API/files/nsd.zip | Bin 0 -> 182 bytes SOL005/NSDManagement-API/files/pnfd.yml | 3 +++ SOL005/NSDManagement-API/files/pnfd.zip | Bin 0 -> 187 bytes SOL005/NSDManagement-API/files/pnfdContent.zip | Bin 359 -> 0 bytes .../VNFPackageManagementKeywords.robot | 4 ++-- .../environment/variables.txt | 2 ++ .../VNFPackageManagement-API/files/vnfPackage.zip | Bin 0 -> 187 bytes 10 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 SOL005/NSDManagement-API/files/nsd.yml create mode 100644 SOL005/NSDManagement-API/files/nsd.zip create mode 100644 SOL005/NSDManagement-API/files/pnfd.yml create mode 100644 SOL005/NSDManagement-API/files/pnfd.zip delete mode 100644 SOL005/NSDManagement-API/files/pnfdContent.zip create mode 100644 SOL005/VNFPackageManagement-API/files/vnfPackage.zip diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 69ba1070..b07e7dec 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -373,7 +373,7 @@ GET NSD Content with invalid Range Request Send PUT Request to upload NSD Content as zip file in asynchronous mode Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -381,7 +381,7 @@ Send PUT Request to upload NSD Content as zip file in asynchronous mode Send PUT Request to upload NSD Content as zip file in synchronous mode Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -405,7 +405,7 @@ Check Postcondition NSD Content is uploaded and available in the NFVO Send PUT Request to upload NSD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Log ${response} ${response}= Create Dictionary status=${response.status_code} headers=${response.headers} body=${response.json()} @@ -700,8 +700,8 @@ Get PNFD Content with conflict due to onboarding state Send PUT Request to upload PNFD Content as zip file Log Trying to perform a PUT. This method upload the content of a PNFD - Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentFilePnfd} + Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File ${contentZipPnfd} ${response}= Put Request pnfd ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index e1e64756..01738ff5 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -64,7 +64,8 @@ ${NFVO_RANGE_OK} 1 ${range} bytes=0-1023 ${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes ${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 -${contentZipFile} files/nsdContent.zip +${contentZipNsd} files/nsd.zip +${contentFileNsd} files/nsd.zip ${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 ${BAD_AUTHORIZATION} Bear sometoken ${original_etag} 1234 @@ -82,7 +83,8 @@ ${erroneous_pnfdInfoId} erroneous_pnfdInfoId ${enabledPnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 ${erroneous_pnfdId} erroneousPnfdId ${onboardingStatePnfdId} 8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2 -${contentFilePnfd} files/pnfdContent.zip +${contentZipPnfd} files/pnfd.zip +${contentFilePnfd} files/pnfd.yml ${creatingPnfdId} 2e4ce0ef-3ea8-49f9-92dd-8771866015bb ${userDefinedDataSet} some diff --git a/SOL005/NSDManagement-API/files/nsd.yml b/SOL005/NSDManagement-API/files/nsd.yml new file mode 100644 index 00000000..8cddb97b --- /dev/null +++ b/SOL005/NSDManagement-API/files/nsd.yml @@ -0,0 +1,3 @@ +nsd: +-id: nsd_id +-name: nsd_name \ No newline at end of file diff --git a/SOL005/NSDManagement-API/files/nsd.zip b/SOL005/NSDManagement-API/files/nsd.zip new file mode 100644 index 0000000000000000000000000000000000000000..3da59324d05257bf196313ef7c3fddcb70eebdd8 GIT binary patch literal 182 zcmWIWW@h1H0D-Bg-a+PNYigAk7#Kj9oq>TNuQ)}oGB+o$IK_&WOE)vcN+GW}B|bBS zmrFM1L)_DS+7VnJK(n zx_ODYsZc(M8Q{&xWY2)hFcpv;3=9kkP#RF1oF0oVxY!y^<<{ zXCiHJE^fJ-C37ZCN-6$&eRj!R31Ja_u0y{aq<__UPOb|vyL|I$C(n1s$)~k`v7Ygs zyhL{IPTH?qq6?qCh|;}f@?_HK^gJh*R;{0E%7xL2DrXigTGFO(q%@m- zYX-OK_Ey2I!cna^{%8O8m|fPUvD@kQlA@FR^WS!x^~o*IUgwo-RAjwdFSIg(^YCgU6i*&*FWoK8%KR?s;efOoZ+y2@y!M}fG z71`ab-92Hqd5Qbp-TP<6^z%nQwq8{s_{$+%wpj! E0NK>11^@s6 diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 7cf7edbb..9473c3fb 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -525,7 +525,7 @@ Send PUT Request for individual VNF Package Content Send PUT Request to upload VNF Package Content Log Trying to perform a PUT. This method upload the content of a NSD Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File files/vnfPackage.zip + ${body}= Get Binary File ${contentZipVnfPackage} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -542,7 +542,7 @@ Check Postcondition VNF Package Content is uploaded and available in the NFVO Send PUT Request to upload VNF Package Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File files/vnfPackage.zip + ${body}= Get Binary File ${contentZipVnfPackage} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${creatingVnfPackageId}/package_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index 9f677fc5..94897416 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -49,6 +49,8 @@ ${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868 ${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 ${instantiatedVnfPackageId} 0b79bab50daca910b000d4f1a2b675d604257e42 +${contentZipVnfPackage} files/vnfPackage.zip + ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip ${CONTENT_TYPE_PLAIN} text/plain diff --git a/SOL005/VNFPackageManagement-API/files/vnfPackage.zip b/SOL005/VNFPackageManagement-API/files/vnfPackage.zip new file mode 100644 index 0000000000000000000000000000000000000000..9fcfb621d458e16f5e725f85d697d327ff8ab439 GIT binary patch literal 187 zcmWIWW@h1H0D(1L)_DS+7VnJK(n zx_ODYsZc(M8Q{&xWY2)hFcpv;3=9kkP#R