Skip to content
Snippets Groups Projects

SOL005 NSD Management - Implementation of deltas between v3.3.1 and v2.7.1

Merged Giacomo Bernini requested to merge 3.3.1-dev-SOL005-NSD-Management into 3.3.1-dev
1 file
+ 0
12
Compare changes
  • Side-by-side
  • Inline
@@ -10,8 +10,8 @@ Library JSONSchemaLibrary schemas/
Library RequestsLibrary
Library Process
Library String
Variables descriptors/SOL006/NSD/nsd_SOL006.yaml
Variables descriptors/SOL001/NSD/nsd_SOL001.yaml
#Variables descriptors/SOL006/NSD/nsd_SOL006.yaml
#Variables descriptors/SOL001/NSD/nsd_SOL001.yaml
*** Keywords ***
GET all Network Service Descriptors Information
@@ -315,18 +315,6 @@ Check HTTP Response Header Content-Type Is Any of
[Arguments] ${header1} ${header2}
Should Contain Any ${response['headers']['Content-Type']} ${header1} ${header2}
Check HTTP Response Header Content-Range Is Present and Matches the requested range
Log Check Content-Range HTTP Header
Should Contain ${response['headers']} Content-Range
Should Be Equal As Strings ${response['headers']['Content-Range']} ${range}
Log Header Content-Range is present
Check HTTP Response Header Content-Length Is Present and Matches the requested range length
Log Check Content-Length HTTP Header
Should Contain ${response['headers']} Content-Length
Should Be Equal As Integers ${response['headers']['Content-Length']} ${length}
Log Header Content-Length is present
Get NSD Content in Zip Format
Log Trying to get a NSD present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_ZIP}"}
@@ -1329,6 +1317,208 @@ Send DELETE Request for PNFD Archive Manifest
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for PNFD archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a POST. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for Individual PNFD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for Individual PNFD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PATCH. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for Individual PNFD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact
Log Trying to get a PNFD Archive Artifact
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact with include_signatures parameter
Log Trying to get PNFD Archive Artifact with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}/include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact in octet stream format
Log Trying to get a PNFD Archive Artifact
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact with Range Request
Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact with invalid resource identifier
Log Trying to perform a negative get, using an erroneous PNFD ID
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${erroneous_pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact with incompatable header
Log Trying to get a PNFD Archive Artifact
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact in onboarding state different from ONBOARDED
Log Trying to get a PNFD Archive artifact present in the NFVO Catalogue, but not in ONBOARDED pnfdOnboardingState
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${onboardingStatePnfdId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual PNFD Archive Artifact with invalid Range Request
Log Trying to get a range of bytes of the limit of the PNFD Archive
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for NSD archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a POST. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact
Log Trying to get a NSD Archive Artifact
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact with include_signatures parameter
Log Trying to get NSD Archive Artifact with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}/include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact in octet stream format
Log Trying to get a NSD Archive Artifact
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact with Range Request
Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Content-Range Is Present and Matches the requested range
Log Check Content-Range HTTP Header
Should Contain ${response['headers']} Content-Range
Should Be Equal As Strings ${response['headers']['Content-Range']} ${range}/${full_lenght}
Log Header Content-Range is present
Check HTTP Response Header Content-Length Is Present and Matches the requested range length
Log Check Content-Length HTTP Header
Should Contain ${response['headers']} Content-Length
Should Be Equal As Integers ${response['headers']['Content-Length']} ${full_lenght}
Log Header Content-Length is present
GET Individual NSD Archive Artifact with invalid resource identifier
Log Trying to perform a negative get, using an erroneous NSD ID
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact with incompatable header
Log Trying to get a NSD Archive Artifact
Set Headers {"Accept": "${ACCEPT_PLAIN}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact in onboarding state different from ONBOARDED
Log Trying to get a NSD Archive artifact present in the NFVO Catalogue, but not in ONBOARDED nsdOnboardingState
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${onboardingStateNsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual NSD Archive Artifact with invalid Range Request
Log Trying to get a range of bytes of the limit of the NSD Archive
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for Individual NSD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for Individual NSD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a Patch. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for Individual NSD Archive Artifact
Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test.
Log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body NsInstance content against NS Descriptor
#${check_descriptors} flag, 1 to check descriptors
@@ -1342,6 +1532,7 @@ PARSE the NS Descriptor File
Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file
Fetch Information from SOL001 NS descriptor file
Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml
${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptorId}
${designer}= Get Variable Value ${topology_template.node_templates.properties.designer}
${version}= Get Variable Value ${topology_template.node_templates.properties.version}
@@ -1355,6 +1546,7 @@ Fetch Information from SOL001 NS descriptor file
Set Global Variable ${NS_InvariantID} ${invariantId}
Fetch Information from SOL006 NS descriptor file
Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml
${nsd_id}= Get Variable Value ${nfv.nsd[0].id}
Set Global Variable ${NS_DescriptorID} ${nsd_id}
Loading