Commit fd992ed3 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixed issue #194 in 2.7.1-fix-plu

parent 34e31e30
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -65,16 +65,17 @@ PATCH Individual VNFInstance
PATCH Individual VNFInstance Precondition failed
     [Documentation]    Test ID: 7.3.1.2.5
    ...    Test title: PATCH Individual VNFInstance Precondition failed
    ...    Test objective: The objective is to create a new VNF instance resource
    ...    Pre-conditions:  ETag mismatch
    ...    Test objective: The objective is to test that modification of a VNF instance resource fails when a precondition given in an HTTP request header is not fulfilled due to an ETag mismatch
    ...    Pre-conditions:  an existing VNF instance resource
    ...    Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: VNFInstance not modified
    PATCH individual vnfInstance
    ...    Post-Conditions: none
    PATCH individual vnfInstance - Etag mismatch
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is    ProblemDetails


PATCH Individual VNFInstance Conflict
     [Documentation]    Test ID: 7.3.1.2.6
    ...    Test title: PATCH Individual VNFInstance Conflict
@@ -82,12 +83,13 @@ PATCH Individual VNFInstance Conflict
    ...    Pre-conditions: another LCM operation is ongoing
    ...    Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: 
    ...    Post-Conditions: VNFInstance not modified
    PATCH individual vnfInstance
    PATCH individual vnfInstance with conflict
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails


DELETE Individual VNFInstance
     [Documentation]    Test ID: 7.3.1.2.7
    ...    Test title: DELETE Individual VNFInstance
+36 −0
Original line number Diff line number Diff line
@@ -563,6 +563,42 @@ PATCH individual vnfInstance
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

POST conflicting operation
    Log    Trying to create conflicting operation.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/terminateVnfRequest.json
    ${body}=        Format String   ${template}     terminationType=${terminationType}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId}/terminate    ${body}
    
PATCH individual vnfInstance with conflict
    POST conflicting operation
    log    Trying to modify an individual VNF instance with conflict
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${check_descriptors} == 1    PARSE the Descriptor File
    ${template}=    Get File    jsons/patchBodyRequest.json
    ${body}=        Format String   ${template}     vnfdId=${Descriptor_ID}    vnfdVersion= ${Descriptor_Version}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId}    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
 
PATCH individual vnfInstance - Etag mismatch
    log    Trying to modify an individual VNF instance
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers    {"If-Match": "${invalid_etag}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${check_descriptors} == 1    PARSE the Descriptor File
    ${template}=    Get File    jsons/patchBodyRequest.json
    ${body}=        Format String   ${template}     vnfdId=${Descriptor_ID}    vnfdVersion= ${Descriptor_Version}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

	
DELETE individual vnfInstance
    log    Trying to delete an individual VNF instance
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
+3 −0
Original line number Diff line number Diff line
@@ -30,12 +30,15 @@ ${WRONG_ACCEPT} application/json
${SYNC_MODE}    0

${instantiatedVnfInstanceId}       6fc3539c-e602-4afa-8e13-962fb5a7d81f
${anotherInstantiatedVnfInstanceId}    6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notInstantiatedVnfInstanceId}       6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notExistingVnfInstanceId}     6fc3539c-e602-4afa-8e13-962fb5a7d81f   
${vnfInstanceId}       6fc3539c-e602-4afa-8e13-962fb5a7d81f
${subscriptionId}    6fc3539c-e602-4afa-8e13-962fb5a7d81f
${conflicVnfInstanceId}    6fc3539c-e602-4afa-8e13-962fb5a7d81f

${invalid_etag}    invalid_etag

${vnfLcmOpOccId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${notExistingVnfLcmOpOccId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfLcmOpOccIdNotStartingProcessingRollingback}    6fc3539c-e602-4afa-8e13-962fb5a7d81d