Commit a2ce9a6b authored by Hammad Zafar's avatar Hammad Zafar Committed by Giacomo Bernini
Browse files

new resources added in NS LCM-API

parent 7e7893aa
Loading
Loading
Loading
Loading
+92 −0
Original line number Diff line number Diff line
*** Settings ***
Resource    NSLCMOperationKeywords.robot 

*** Test Cases ***
POST Individual VNF Snapshot - Method not implemented
    [Documentation]    Test ID: 5.3.2.27.1
    ...    Test title: POST Individual VNF Snapshot - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST individual VNF Snapshot
    Check HTTP Response Status Code Is    405
    
GET Information about an individual VNF Snapshot - SUCCESSFUL
    [Documentation]    Test ID: 5.3.2.27.2
    ...    Test title: GET Information about an individual VNF Snapshot - SUCCESSFUL
    ...    Test objective: The objective is to GET information about an individual VNF Snapshot
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual VNF Snapshot
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    VnfSnapshotInfo
        
GET Information about an individual VNF Snapshot - NOT FOUND
     [Documentation]    Test ID: 5.3.2.27.3
    ...    Test title: GET Information about an individual VNF Snapshot - NOT FOUND
    ...    Test objective: The objective is to test that the retrieval of individual VNF Snapshot fails when using an invalid resource identifier.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Snapshot with Invalid URI
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

PUT Individual VNF Snapshot - Method not implemented 
     [Documentation]    Test ID: 5.3.2.27.4
    ...    Test title: PUT Individual VNF Snapshot - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    PUT individual VNF Snapshot
    Check HTTP Response Status Code Is    405

PATCH Individual VNF Snapshot - Method not implemented 
     [Documentation]    Test ID: 5.3.2.27.5
    ...    Test title: PATCH Individual VNF Snapshot - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot not modified
    PATCH individual VNF Snapshot
    Check HTTP Response Status Code Is    405

DELETE Individual VNF Snapshot
    [Documentation]    Test ID: 5.3.2.27.6
    ...    Test title: DELETE Individual VNF Snapshot
    ...    Test objective: The objective is to delete a VNF Snapshot
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: VNF Snapshot resource is deleted.
    DELETE individual VNF Snapshot
    Check HTTP Response Status Code Is    204
    Check Postcondition VNF Snapshot Resource Is Deleted

DELETE Individual VNF Snapshot - Conflict
     [Documentation]    Test ID: 5.3.2.27.7
    ...    Test title: DELETE Individual VNF Snapshot Conflict
    ...    Test objective: The objective is to verify that The operation cannot be executed currently, due to a conflict with the state of the VNF Snapshot resource.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.20.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: VNF snapshot is in use by some operation such as reverting a VNF instance to a VNF snapshot or creating a VNF snapshot package.
    ...    Post-Conditions: VNF Snapshot resource is not deleted.
    DELETE individual VNF Snapshot - CONFLICT
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Check Postcondition VNF Snapshot Resource Existence
 No newline at end of file
+191 −0
Original line number Diff line number Diff line
@@ -1392,3 +1392,194 @@ Check NsLcmOpOcc content against NS Descriptor
Match the NsLcmOpOcc Response Attributes with NS Descriptors
    Should Be Equal As Strings    ${response['body']['affectedNss'][0]['nsdId']}    ${NSDescriptor_ID}
    Run Keyword If  '${descriptorType}'=='SOL006'    List Should Contain Value    ${SAP_IDs}    ${response['body']['affectedSaps'][0]['sapdId']}
    
POST VNF Snapshots
    log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots   	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

GET multiple VNF Snapshots	
    Log    Query VNF The GET method queries information about multiple VNF snapshots.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots 
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 		

GET multiple VNF Snapshots with bad attribute	
    Log    Query VNF The GET method queries information about multiple VNF snapshots.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} 
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?attribute_not_exist=some_value
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	

GET multiple VNF Snapshots with bad filter	
    Log    Query VNF The GET method queries information about multiple VNF snapshots.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} 
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?${NEG_FILTER_snapshot}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	
	
GET multiple VNF Snapshots using filter	
    Log    Query VNF The GET method queries information about multiple VNF snapshots using filter.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} 
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?${POS_FILTER_snapshot}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 	
	
GET multiple VNF Snapshots with all_fields attribute selector
    Log    Query status information about multiple VNF snapshots, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?all_fields
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET multiple VNF Snapshots with exclude_default attribute selector
    Log    Query status information about multiple VNF snapshots using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?exclude_default
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET multiple VNF Snapshots with fields attribute selector
    Log    Query status information about multiple VNF snapshots, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?fields=${fields_snapshot}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}	    
    
GET multiple VNF Snapshots with exclude_default and fields attribute selector
    Log    Query status information about multiple VNF snapshots, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?fields=${fields_snapshot}&exclude_default
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET multiple VNF Snapshots with exclude_fields attribute selector
    Log    Query status information about multiple VNF snapshots, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?exclude_fields=${fields_snapshot}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 	

GET VNF Snapshots without Paging support
    Run Keyword If    ${PAGING_SUPPORTED} == 0    GET multiple VNF Snapshots
    
GET VNF Snapshots with Paging support
    Run Keyword If    ${PAGING_SUPPORTED} == 1    GET multiple VNF Snapshots
    
Check HTTP Response Header Contains Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}

PUT VNF Snapshots
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots   	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
	
PATCH VNF Snapshots
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots	 	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
	
DELETE VNF Snapshots
    Log    Trying to perform a DELETE. This method should not be implemented
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots 	 	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}  

POST individual VNF Snapshot
    log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}    
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}        

GET individual VNF Snapshot
    log    Trying to get information about an individual VNF snapshot
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}      

GET individual VNF Snapshot with invalid URI
    log    Trying to get information about an individual VNF snapshot
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${invalidVnfSnapshotInfoId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}      
	
PUT individual VNF Snapshot
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

PATCH individual VNF Snapshot
    log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

DELETE individual VNF Snapshot
    log    Trying to DELETE an individual VNF Snapshot
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 

DELETE individual VNF Snapshot - CONFLICT
    log    Trying to DELETE an individual VNF Snapshot that is already in use by another operation
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId_InUse} 		
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
Check Postcondition VNF Snapshot Resource Is Deleted
    Get individual VNF Snapshot
    Integer    response status    404
    Log    VNF Snapshot Resource deleted
    
Check Postcondition VNF Snapshot Resource Existence
    Get individual VNF Snapshot
    Integer    response status    200
    Log    VNF Snapshot Resource is not deleted
 No newline at end of file
+194 −0

File added.

Preview size limit exceeded, changes collapsed.

+10 −0
Original line number Diff line number Diff line
@@ -77,6 +77,16 @@ ${NEG_FILTER} attribute_not_exist=some_value
${NEG_SELECTOR}    fields=wrong_field
${json}    {"notificationStatus": ""}

${POS_FILTER_snapshot}     id=41fdd38a-3d4c-465c-83e0-f80e014425f8   # Positive case, suing compiant fields name for filtering get request
${NEG_FILTER_snapshot}     nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8    # Negative case, using wrong name of field
${fields_snapshot}    vnfSnapshot

${vnfSnapshotInfoId}
${vnfSnapshotInfoId_InUse}    snapshotId-of-a-resource-AlreadyInUse-bySomeOther-operation
${invalidVnfSnapshotInfoId}    invalid-or-nonexistent-vnfSnapshotInforId    

${PAGING_SUPPORTED}    1

${callbackResp}    127.0.0.1

${check_descriptors}    1
+1392 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading