From f07f7ba72f1fc60c66b98674e1dca557600db410 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Thu, 11 Feb 2021 15:26:14 +0100 Subject: [PATCH] fixed pnfd file usage --- SOL005/NSDManagement-API/NSDManagementKeywords.robot | 5 +++-- SOL005/NSDManagement-API/environment/variables.txt | 3 ++- SOL005/NSDManagement-API/files/nsd.yml | 3 --- SOL005/NSDManagement-API/files/pnfd.yml | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 SOL005/NSDManagement-API/files/nsd.yml delete mode 100644 SOL005/NSDManagement-API/files/pnfd.yml diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index b07e7dec..92f43790 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -710,9 +710,10 @@ Send PUT Request to upload PNFD Content as zip file Send PUT Request to upload PNFD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a PNFD Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Content-Type": "application/zip"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File ${contentFilePnfd} - REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${creatingNsdInfoId}/pnfd_content ${body} + ${body}= Get Binary File ${contentZipPnfd} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${creatingPnfdInfoId}/pnfd_content data=${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index 01738ff5..7fd3ab76 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -65,7 +65,7 @@ ${range} bytes=0-1023 ${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes ${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 ${contentZipNsd} files/nsd.zip -${contentFileNsd} files/nsd.zip +${contentFileNsd} files/nsd.yml ${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 ${BAD_AUTHORIZATION} Bear sometoken ${original_etag} 1234 @@ -79,6 +79,7 @@ ${SEPERATOR} = ${pnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 +${creatingPnfdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 ${erroneous_pnfdInfoId} erroneous_pnfdInfoId ${enabledPnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 ${erroneous_pnfdId} erroneousPnfdId diff --git a/SOL005/NSDManagement-API/files/nsd.yml b/SOL005/NSDManagement-API/files/nsd.yml deleted file mode 100644 index 8cddb97b..00000000 --- a/SOL005/NSDManagement-API/files/nsd.yml +++ /dev/null @@ -1,3 +0,0 @@ -nsd: --id: nsd_id --name: nsd_name \ No newline at end of file diff --git a/SOL005/NSDManagement-API/files/pnfd.yml b/SOL005/NSDManagement-API/files/pnfd.yml deleted file mode 100644 index faeeb525..00000000 --- a/SOL005/NSDManagement-API/files/pnfd.yml +++ /dev/null @@ -1,3 +0,0 @@ -pnfd: --id: pnfd_id --name: pnfd_name \ No newline at end of file -- GitLab