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

added SOL005 nsd management docs for PNFs

parent d068f2f2
Loading
Loading
Loading
Loading
+84 −74
Original line number Original line Diff line number Diff line
@@ -3,89 +3,99 @@ Documentation This clause defines all the resources and methods provided by
Library           JSONSchemaLibrary    schemas/
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          environment/variables.txt    # Generic Parameters
Resource          environment/pnfDescriptors.txt    # Specific nsDescriptors Parameters
Resource          environment/pnfDescriptors.txt    # Specific nsDescriptors Parameters
Resource          NSDManagementKeywords.robot
Library           JSONLibrary
Library           JSONLibrary
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
Library           OperatingSystem
Library           OperatingSystem


*** Test Cases ***
*** Test Cases ***
GET Single PNF Descriptor
GET Individual PNF Descriptor Information
    [Documentation]   The GET method reads information about an individual PNF descriptor.
    [Documentation]    Test ID: 5.3.1.5.1
    ...    This method shall follow the provisions specified in the Tables 5.4.6.3.2-1 and 5.4.6.3.2-2 for URI query parameters,
    ...    Test title: GET Individual PNF Descriptor Information
    ...    request and response data structures, and response codes.
    ...    Test objective: The objective is to test the retrieval of an individual PNF Descriptor information and perform a JSON schema validation of the collected data structure
    Log    The GET method reads information about an individual PNF descriptor
    ...    Pre-conditions: One or more PNF Descriptors are set in the NFVO.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ...    Reference: section 5.4.6.3.2 - SOL005 v2.4.1
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ...    Config ID: Config_prod_NFVO
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ...    Applicability: none
    Integer    response status    200
    ...    Post-Conditions: none
    ${contentType}=    Output    response headers Content-Type
    GET Individual PNF Descriptor Information
    Should Contain    ${contentType}    application/json
    Check HTTP Response Status Code Is    200
    Log  Validation of Content-Type : OK
    Check HTTP Response Body Json Schema Is   PnfdInfo
   Log    Trying to validate response
    Check HTTP Response Header Contains ETag
   ${result}=    Output    response body
    Check HTTP Response Body PnfdInfo Identifier matches the requested PNF Descriptor Information
   Validate Json    PnfdInfo.schema.json    ${result}
   Log    Validation OK


GET Individual PNF Descriptor Information with invalid resource identifier
    [Documentation]    Test ID: 5.3.1.5.2
    ...    Test title: GET Individual PNF Descriptor Information with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual PNF Descriptor Information fails when using an invalid resource identifier
    ...    Pre-conditions: One or more PNF Descriptors are set in the NFVO.
    ...    Reference: section 5.4.6.3.2 - SOL005 v2.4.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual PNF Descriptor Information with invalid resource identifier
    Check HTTP Response Status Code Is    404


GET Single PNF Descriptor (Negative: Not found)
Update Individual PNF Descriptor
    Log    Trying to perform a GET on an erroneous pnfDescriptorInfoId
    [Documentation]    Test ID: 5.3.1.5.3
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ...    Test title: Update Individual PNF Descriptor
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ...    Test objective: The objective is to test the update of an individual PNF Descriptor and perform a JSON schema and content validation of the collected data structure
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId}
    ...    Pre-conditions: One or more Update Individual PNF Descriptors are onboarded in the NFVO.
    Integer    response status    404
    ...    Reference: section 5.4.6.3.4 - SOL005 v2.4.1
    Log    Received 404 Not Found as expected
    ...    Config ID: Config_prod_NFVO
    ${contentType}=    Output    response headers Content-Type
    ...    Applicability: none
    Should Contain    ${contentType}    application/json
    ...    Post-Conditions: The PNF Descriptor is modified according to the update request
    Log    Trying to validate ProblemDetails
    Send PATCH to update Individual PNF Descriptor
    ${problemDetails}=    Output    response body
    Check HTTP Response Status Code Is    200
    Validate Json    ProblemDetails.schema.json    ${problemDetails}
    Check HTTP Response Body Json Schema Is   PnfdInfoModification
    Log    Validation OK
    Check Postcondition PNF Descriptor is modified according to the requested update  




PATCH Single PNF Descriptor - (Disabling a nsdInfo)
Update Individual PNF Descriptor with HTTP Etag precondition failure
    [Documentation]   The PATCH method modifies the user defined data of an individual PNF descriptor resource.
    [Documentation]    Test ID: 5.3.1.5.4
    ...    This method shall follow the provisions specified in the Tables 5.4.6.3.4-1 and 5.4.6.3.4-2 for URI query parameters,
    ...    Test title:  Update Individual PNF Descriptor with HTTP Etag precondition failure
    ...    request and response data structures, and response codes.
    ...    Test objective: The objective is to test that the update of a PNF Descriptor fails due to a precondition failure when using an uncorrect Http Etag identified.
    Log    The PATCH method modifies the user defined data of an individual PNF descriptor resource.
    ...    Pre-conditions: One or more Update Individual PNF Descriptors are onboarded in the NFVO.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ...    Reference: section 5.4.6.3.4 - SOL005 v2.4.1
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ...    Config ID: Config_prod_NFVO
    ${body}=    Get File    jsons/PnfdInfoModification.json
    ...    Applicability: none
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ...    Post-Conditions: none
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}    ${body}
    Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failure
    Integer    response status    200
    Check HTTP Response Status Code Is    412
    Log    Received 200 OK as expected
   ${result}=    Output    response body
   Validate Json    PnfdInfoModification.schema.json    ${result}
   Log    Validation of PnfdInfoModification OK


POST Individual PNF Descriptor - Method not implemented
    [Documentation]    Test ID: 5.3.1.5.5
    ...    Test title: POST Individual PNF Descriptor - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new PNF Descriptor
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.6.3.1 - SOL005 v2.4.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send POST Request for Individual PNF Descriptor
    Check HTTP Response Status Code Is    405


DELETE Single PNF Descriptor
PUT Individual PNF Descriptor - Method not implemented
    Log    Trying to perform a DELETE pnfdInfo.
    [Documentation]    Test ID: 5.3.1.5.6
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ...    Test title: PUT Individual PNF Descriptor - Method not implemented
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ...    Test objective: The objective is to test that PUT method is not allowed to modify a new PNF Descriptor
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ...    Pre-conditions: none
    Integer    response status    204
    ...    Reference:  section 5.4.6.3.3 - SOL005 v2.4.1
    Log    Received 204 No Content as expected
    ...    Config ID: Config_prod_NFVO

    ...    Applicability: none

    ...    Post-Conditions: none
POST Single PNF Descriptor (Method not implemented)
    Send PUT Request for Individual PNF Descriptor
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
    Check HTTP Response Status Code Is    405
    Log    Trying to perform a POST. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    Integer    response status    405
    Log    Received 405 Method not implemented as expected



PUT Single PNF Descriptor (Method not implemented)
    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
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    Integer    response status    405
    Log    Received 405 Method not implemented as expected



DELETE Individual PNF Descriptor
    [Documentation]    Test ID: 5.3.1.5.7
    ...    Test title:  DELETE Individual PNF Descriptor
    ...    Test objective: The objective is to test the deletion of an individual PNF Descriptor.
    ...    Pre-conditions: One or more Individual PNF Descriptors are onboarded in the NFVO.
    ...    Reference: section 5.4.6.3.5 - SOL005 v2.4.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The PNF Descriptor is not available anymore in the NFVO 
    Send DELETE Request for Individual PNF Descriptor
    Check HTTP Response Status Code Is    204
    Check Postcondition PNF Descriptor is Deleted
 No newline at end of file
+167 −12
Original line number Original line Diff line number Diff line
@@ -615,7 +615,159 @@ Check Postcondition PNF Descriptors Exist
    Log    Checking that PNFD still exists
    Log    Checking that PNFD still exists
    GET all PNF Descriptors Information
    GET all PNF Descriptors Information


Get all NS Descriptor Subscriptions
GET Individual PNF Descriptor Information
    Log    The GET method reads information about an individual PNF descriptor
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check HTTP Response Body PnfdInfo Identifier matches the requested PNF Descriptor Information
    Log    Going to validate info retrieved
    Should Be Equal    ${response['body']['id']}    ${pnfdInfoId} 
    Log    PNFD identifier as expected

GET Individual PNF Descriptor Information with invalid resource identifier
    Log    Trying to perform a GET on an erroneous nsDescriptorInfoId
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId}
    Integer    response status    404
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send PATCH to update Individual PNF Descriptor
    Log    Trying to perform a PATCH.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"If-Match": "${original_etag[0]}"}
    ${body}=    Get File    jsons/PnfdInfoModification.json
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${body["userDefinedData"]}    ${userDefinedDataSet}

Check Postcondition PNF Descriptor is modified according to the requested update
    Log    Checking postcondition op status
    Should Be Equal   ${response['body']['userDefinedData']}    ${userDefinedDataSet} 

Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failure
    Log    Trying to perform a PATCH. As prerequisite the pnfdInfo shall be modified by another entity
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"If-Match": "${wrong_etag[0]}"}
    ${body}=    Get File    jsons/PnfdInfoModification.json
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send DELETE Request for Individual PNF Descriptor
    Log    Trying to perform a DELETE pnfdInfo.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check Postcondition PNF Descriptor is Deleted
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    Integer    response status    404

Send POST Request for Individual PNF Descriptor
    Log    Trying to perform a POST. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send PUT Request for Individual PNF Descriptor
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Get PNFD Content
    Log    Trying to get a NSD present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Get PNFD Content with invalid resource identifier
    Log    Trying to perform a negative get, using an erroneous package ID
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId}/pnfd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Get PNFD Content with conflict due to onboarding state
    Log    Trying to get a PNFD present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${onboardingStatePnfdId}/pnfd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send PUT Request to upload PNFD Content as plain text file
    Log    Trying to perform a PUT. This method upload the content of a PNFD
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=  Get File  ${contentFilePnfd}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content    ${body}
    ${response}=    Output    response body
    Should Be Empty    ${response}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

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_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=  Get Binary File  ${contentFilePnfd}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${creatingNsdInfoId}/pnfd_content    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send POST Request for PNFD Content
    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}/pnf_descriptors/${pnfdInfoId}/nsd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send PATCH Request for PNFD Content
    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}/pnf_descriptors/${pnfdInfoId}/nsd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Send DELETE Request for PNFD Content
    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}/pnf_descriptors/${pnfdInfoId}/nsd_content
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Check Postcondition PNFD Content Exists
    Get PNFD Content
    
Get all NSD Management Subscriptions
    [Documentation]    This method shall support the URI query parameters, request and response data structures, and response codes, as
    [Documentation]    This method shall support the URI query parameters, request and response data structures, and response codes, as
    ...    specified in the Tables 5.4.8.3.2-1 and 5.4.8.3.2-2.
    ...    specified in the Tables 5.4.8.3.2-1 and 5.4.8.3.2-2.
    Log    Trying to get the list of subscriptions
    Log    Trying to get the list of subscriptions
@@ -625,7 +777,7 @@ Get all NS Descriptor Subscriptions
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    
    
Get NS Descriptor Subscriptions with attribute-based filters
Get NSD Management Subscriptions with attribute-based filters
    Log    Trying to get the list of subscriptions using filters
    Log    Trying to get the list of subscriptions using filters
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
@@ -634,7 +786,7 @@ Get NS Descriptor Subscriptions with attribute-based filters
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}




Get NS Descriptor Subscriptions with invalid attribute-based filters
Get NSD Management Subscriptions with invalid attribute-based filters
    Log    Trying to get the list of subscriptions using filters with wrong attribute name
    Log    Trying to get the list of subscriptions using filters with wrong attribute name
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
@@ -643,7 +795,7 @@ Get NS Descriptor Subscriptions with invalid attribute-based filters
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}




Get NS Descriptor Subscriptions with invalid resource endpoint
Get NSD Management Subscriptions with invalid resource endpoint
    Log    Trying to perform a request on a Uri which doesn't exist
    Log    Trying to perform a request on a Uri which doesn't exist
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
@@ -652,7 +804,7 @@ Get NS Descriptor Subscriptions with invalid resource endpoint
    Set Suite Variable    ${response}    ${output}    
    Set Suite Variable    ${response}    ${output}    




Send Post Request for NS Descriptor Subscription
Send Post Request for NSD Management Subscription
    [Documentation]    This method shall support the URI query parameters, request and response data structures, and response codes, as
    [Documentation]    This method shall support the URI query parameters, request and response data structures, and response codes, as
    ...    specified in the Tables 5.4.8.3.1-1 and 5.4.8.3.1-2.
    ...    specified in the Tables 5.4.8.3.1-1 and 5.4.8.3.1-2.
    Log    Trying to create a new subscription
    Log    Trying to create a new subscription
@@ -667,7 +819,7 @@ Send Post Request for NS Descriptor Subscription
    ...    Check Notification Endpoint  
    ...    Check Notification Endpoint  




Send Post Request for Duplicated NS Descriptor Subscription
Send Post Request for Duplicated NSD Management Subscription
    Log    Trying to create a subscription with an already created content
    Log    Trying to create a subscription with an already created content
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
@@ -681,7 +833,7 @@ Send Post Request for Duplicated NS Descriptor Subscription






Send Put Request for NS Descriptor Subscriptions
Send Put Request for NSD Management Subscriptions
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
    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
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -691,7 +843,7 @@ Send Put Request for NS Descriptor Subscriptions
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    
    


Send Patch Request for NS Descriptor Subscriptions
Send Patch Request for NSD Management Subscriptions
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
    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
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -700,7 +852,7 @@ Send Patch Request for NS Descriptor Subscriptions
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}


Send Delete Request for NS Descriptor Subscriptions
Send Delete Request for NSD Management Subscriptions
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
    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
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -709,6 +861,9 @@ Send Delete Request for NS Descriptor Subscriptions
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}


Check Postcondition NSD Management Subscriptions Exists
    Log    Checking that subscriptions exists
    Get all NSD Management Subscriptions    


Check HTTP Response Status Code Is
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}    
    [Arguments]    ${expected_status}    
@@ -735,14 +890,14 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte
    #TODO
    #TODO




Check HTTP Response Body Matches the Subscription
Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription
    Log    Check Response matches subscription
    Log    Check Response matches subscription
    ${body}=    Get File    jsons/subscriptions.json
    ${body}=    Get File    jsons/subscriptions.json
    ${subscription}=    evaluate    json.loads('''${body}''')    json
    ${subscription}=    evaluate    json.loads('''${body}''')    json
    Should Be Equal    ${response['body']['callbackUri']}    ${subscription['callbackUri']}
    Should Be Equal    ${response['body']['callbackUri']}    ${subscription['callbackUri']}




Check Postcondition NS Descriptor Subscription Is Set
Check Postcondition NSD Management Subscription Is Set
    Log    Check Postcondition subscription exist
    Log    Check Postcondition subscription exist
    Log    Trying to get the subscription
    Log    Trying to get the subscription
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -753,7 +908,7 @@ Check Postcondition NS Descriptor Subscription Is Set
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    
    
    
    
Check Postcondition Subscription Resource URI Returned in Location Header Is Valid
Check Postcondition Subscription Resource Returned in Location Header Is Available
    Log    Going to check postcondition
    Log    Going to check postcondition
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${response.headers['Location']}
    GET    ${response.headers['Location']}
+96 −97

File changed.

Preview size limit exceeded, changes collapsed.

+109 −27

File changed.

Preview size limit exceeded, changes collapsed.

+3 −2
Original line number Original line Diff line number Diff line
@@ -10,5 +10,6 @@ ${ACCEPT_PLAIN} text/plain
${CONTENT_TYPE_PLAIN}    text/plain
${CONTENT_TYPE_PLAIN}    text/plain
${erroneous_pnfdId}    erroneousPnfdId
${erroneous_pnfdId}    erroneousPnfdId
${onboardingStatePnfdId}    8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2
${onboardingStatePnfdId}    8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2
${contentFile}    files/pnfdContent.zip
${contentFilePnfd}    files/pnfdContent.zip
${creatingPnfdId}    2e4ce0ef-3ea8-49f9-92dd-8771866015bb
${creatingPnfdId}    2e4ce0ef-3ea8-49f9-92dd-8771866015bb
${userDefinedDataSet}    some
 No newline at end of file