Commit 863f070c authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

New Resource PNFD Archive Manifest addedand fix issues

parent 604b196a
Loading
Loading
Loading
Loading
+56 −0
Original line number Original line Diff line number Diff line
@@ -1272,3 +1272,59 @@ Send DELETE Request for PNFD
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/pnfd
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/pnfd
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 
    Set Suite Variable    ${response}    ${output} 

Get PNFD Archive Manifest
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Get PNFD Archive Manifest with security information
    Log    Trying to get a PNFD present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_ZIP}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest/include_signatures
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Get PNFD Archive Manifest with conflict due to onboarding state
    Log    Trying to get a PNFD Management present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_ZIP}"}
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Send POST Request for PNFD Archive Manifest
    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": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send PUT Request for PNFD Archive Manifest
    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": "${AUTHORIZATION}"}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send PATCH Request for PNFD Archive Manifest
    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": "${AUTHORIZATION}"}
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send DELETE Request for PNFD Archive Manifest
    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": "${AUTHORIZATION}"}
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${pnfdInfoId}/manifest
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
 No newline at end of file
+12 −12
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ Library OperatingSystem


*** Test Cases ***
*** Test Cases ***
Get single file PNFD in Plain Format
Get single file PNFD in Plain Format
    [Documentation]    Test ID: 5.3.1.11.1
    [Documentation]    Test ID: 5.3.1.12.1
    ...    Test title: Get single file PNFD in Plain Format
    ...    Test title: Get single file PNFD in Plain Format
    ...    Test objective: The objective is to test the retrieval of the PNFD in plain format within a PNFD archive and perform a validation that returned content is in plain format
    ...    Test objective: The objective is to test the retrieval of the PNFD in plain format within a PNFD archive and perform a validation that returned content is in plain format
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -23,7 +23,7 @@ Get single file PNFD in Plain Format
    Check HTTP Response Header Content-Type Is    text/plain
    Check HTTP Response Header Content-Type Is    text/plain


Get PNFD in Zip Format
Get PNFD in Zip Format
    [Documentation]    Test ID: 5.3.1.11.2
    [Documentation]    Test ID: 5.3.1.12.2
    ...    Test title: Get PNFD in Zip Format
    ...    Test title: Get PNFD in Zip Format
    ...    Test objective: The objective is to test the retrieval of the PNFD in zip format within a PNFD archive and perform a validation that returned content is in zip format
    ...    Test objective: The objective is to test the retrieval of the PNFD in zip format within a PNFD archive and perform a validation that returned content is in zip format
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -36,7 +36,7 @@ Get PNFD in Zip Format
    Check HTTP Response Header Content-Type Is    application/zip
    Check HTTP Response Header Content-Type Is    application/zip


Get single file PNFD in Plain or Zip Format 
Get single file PNFD in Plain or Zip Format 
    [Documentation]    Test ID: 5.3.1.11.3
    [Documentation]    Test ID: 5.3.1.12.3
    ...    Test title: Get single file PNFDin Plain or Zip Format
    ...    Test title: Get single file PNFDin Plain or Zip Format
    ...    Test objective: The objective is to test the retrieval of the single file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format
    ...    Test objective: The objective is to test the retrieval of the single file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -49,7 +49,7 @@ Get single file PNFD in Plain or Zip Format
    Check HTTP Response Header Content-Type Is Any of   text/plain    application/zip
    Check HTTP Response Header Content-Type Is Any of   text/plain    application/zip
    
    
Get multi file PNFD in Plain or Zip Format
Get multi file PNFD in Plain or Zip Format
    [Documentation]    Test ID: 5.3.1.11.4
    [Documentation]    Test ID: 5.3.1.12.4
    ...    Test title: Get multi file PNFD in Plain or Zip Format
    ...    Test title: Get multi file PNFD in Plain or Zip Format
    ...    Test objective: The objective is to test the retrieval of the multi file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format
    ...    Test objective: The objective is to test the retrieval of the multi file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -62,7 +62,7 @@ Get multi file PNFD in Plain or Zip Format
    Check HTTP Response Header Content-Type Is    application/zip
    Check HTTP Response Header Content-Type Is    application/zip


Get multi file PNFD in Plain Format
Get multi file PNFD in Plain Format
    [Documentation]    Test ID: 5.3.1.11.5
    [Documentation]    Test ID: 5.3.1.12.5
    ...    Test title: Get multi file PNFD in Plain Format
    ...    Test title: Get multi file PNFD in Plain Format
    ...    Test objective: The objective is to test that the retrieval of the multi file PNFD within a PNFD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response
    ...    Test objective: The objective is to test that the retrieval of the multi file PNFD within a PNFD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -75,7 +75,7 @@ Get multi file PNFD in Plain Format
    Check HTTP Response Body Json Schema Is   ProblemDetails
    Check HTTP Response Body Json Schema Is   ProblemDetails


Get PNFD Content with invalid resource identifier
Get PNFD Content with invalid resource identifier
    [Documentation]    Test ID: 5.3.1.11.6
    [Documentation]    Test ID: 5.3.1.12.6
    ...    Test title: Get PNFD Content with invalid resource identifier
    ...    Test title: Get PNFD Content with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails when using an invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails when using an invalid resource identifier
    ...    Pre-conditions: none
    ...    Pre-conditions: none
@@ -88,7 +88,7 @@ Get PNFD Content with invalid resource identifier
    Check HTTP Response Body Json Schema Is   ProblemDetails
    Check HTTP Response Body Json Schema Is   ProblemDetails


Get PNFD with conflict due to onboarding state
Get PNFD with conflict due to onboarding state
    [Documentation]    Test ID: 5.3.1.11.7
    [Documentation]    Test ID: 5.3.1.12.7
    ...    Test title: Get PNFD with conflict due to onboarding state
    ...    Test title: Get PNFD with conflict due to onboarding state
    ...    Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
    ...    Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED.
    ...    Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED.
@@ -101,7 +101,7 @@ Get PNFD with conflict due to onboarding state
    Check HTTP Response Body Json Schema Is   ProblemDetails    
    Check HTTP Response Body Json Schema Is   ProblemDetails    
    
    
Get PNFD with security information
Get PNFD with security information
    [Documentation]    Test ID: 5.3.1.11.8
    [Documentation]    Test ID: 5.3.1.12.8
    ...    Test title: Get PNFD with security information
    ...    Test title: Get PNFD with security information
    ...    Test objective: The objective is to test the retrieval of the PNFD within a PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter
    ...    Test objective: The objective is to test the retrieval of the PNFD within a PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
@@ -114,7 +114,7 @@ Get PNFD with security information
    Check HTTP Response Header Content-Type Is    application/zip   
    Check HTTP Response Header Content-Type Is    application/zip   
    
    
POST PNFD - Method not implemented
POST PNFD - Method not implemented
    [Documentation]    Test ID: 5.3.1.11.9
    [Documentation]    Test ID: 5.3.1.12.9
    ...    Test title: POST PNFD - Method not implemented
    ...    Test title: POST PNFD - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new PNFD
    ...    Test objective: The objective is to test that POST method is not allowed to create a new PNFD
    ...    Pre-conditions: none
    ...    Pre-conditions: none
@@ -126,7 +126,7 @@ POST PNFD - Method not implemented
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405
    
    
PUT PNFD - Method not implemented
PUT PNFD - Method not implemented
    [Documentation]    Test ID: 5.3.1.11.10
    [Documentation]    Test ID: 5.3.1.12.10
    ...    Test title: PUT PNFD - Method not implemented
    ...    Test title: PUT PNFD - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update PNFD
    ...    Test objective: The objective is to test that PATCH method is not allowed to update PNFD
    ...    Pre-conditions: none
    ...    Pre-conditions: none
@@ -138,7 +138,7 @@ PUT PNFD - Method not implemented
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405


PATCH PNFD - Method not implemented
PATCH PNFD - Method not implemented
    [Documentation]    Test ID: 5.3.1.11.11
    [Documentation]    Test ID: 5.3.1.12.11
    ...    Test title: PATCH PNFD - Method not implemented
    ...    Test title: PATCH PNFD - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update PNFD
    ...    Test objective: The objective is to test that PATCH method is not allowed to update PNFD
    ...    Pre-conditions: none
    ...    Pre-conditions: none
@@ -150,7 +150,7 @@ PATCH PNFD - Method not implemented
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405


DELETE PNFD - Method not implemented
DELETE PNFD - Method not implemented
    [Documentation]    Test ID: 5.3.1.11.12
    [Documentation]    Test ID: 5.3.1.12.12
    ...    Test title: DELETE PNFD - Method not implemented
    ...    Test title: DELETE PNFD - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete PNFD
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete PNFD
    ...    Pre-conditions: none
    ...    Pre-conditions: none
+96 −0
Original line number Original line Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          environment/nsDescriptors.txt    # Specific nsDescriptors Parameters
Resource          NSDManagementKeywords.robot
Library           JSONLibrary
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           OperatingSystem

*** Test Cases ***
Get PNFD Archive Manifest
    [Documentation]    Test ID: 5.3.1.13.1
    ...    Test title: Get PNFD Archive Manifest
    ...    Test objective: The objective is to test that GET method reads the content of the manifest file within an PNFD archive
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get PNFD Archive Manifest
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Content-Type Is    text/plain
    
Get PNFD Archive Manifest with security information
    [Documentation]    Test ID: 5.3.1.13.2
    ...    Test title: Get PNFD Archive Manifest with security information
    ...    Test objective: The objective is to test the retrieval of content of the manifest file within an PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter
    ...    Pre-conditions: One or more PNFDs are onboarded in the NFVO.
    ...    Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get PNFD Archive Manifest with security information
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Content-Type Is    application/zip
    
Get PNFD Archive Manifest with conflict due to onboarding state
    [Documentation]    Test ID: 5.3.1.13.3
    ...    Test title: Get PNFD Archive Manifest with conflict due to onboarding state
    ...    Test objective: The objective is to test that the retrieval of content of the manifest file within an PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED.
    ...    Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get PNFD Archive Manifest with conflict due to onboarding state
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is   ProblemDetails  
    
POST PNFD Archive Manifest - Method not implemented
    [Documentation]    Test ID: 5.3.1.13.4
    ...    Test title: POST PNFD Archive Manifest - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.7b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send POST Request for PNFD Archive Manifest
    Check HTTP Response Status Code Is    405
    
PUT PNFD Archive Manifest - Method not implemented
    [Documentation]    Test ID: 5.3.1.13.5
    ...    Test title: PUT PNFD Archive Manifest - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.7b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PUT Request for PNFD Archive Manifest
    Check HTTP Response Status Code Is    405

PATCH PNFD Archive Manifest - Method not implemented
    [Documentation]    Test ID: 5.3.1.13.6
    ...    Test title: PATCH PNFD Archive Manifest - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.7b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PATCH Request for PNFD Archive Manifest
    Check HTTP Response Status Code Is    405

DELETE PNFD Archive Manifest - Method not implemented
    [Documentation]    Test ID: 5.3.1.13.7
    ...    Test title: DELETE PNFD Archive Manifest - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.7b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send DELETE Request for PNFD Archive Manifest
    Check HTTP Response Status Code Is    405
 No newline at end of file