Commit ec34c3d2 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

removed subscription and fixed minor bugs

parent a2ea192d
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -65,27 +65,25 @@ POST Individual VNF Performance Job - Method not implemented
    [Documentation]    Test ID: 6.3.3.2.5
    ...    Test title: POST Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is not created on the VNFM
    ...    Post-Conditions: none
    Send Post request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Job is not Created

PUT Individual VNF Performance Job - Method not implemented
    [Documentation]    Test ID: 6.3.3.2.6
    ...    Test title: PUT Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Job is Unmodified (Implicit)

PATCH Individual VNF Performance Job
    [Documentation]    Test ID: 6.3.3.2.7
@@ -175,15 +173,6 @@ Send Patch request for individual VNF Performance Job
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check Postcondition VNF Performance Job is not Created
    Log    Trying to get a new Pm Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition VNF Performance Job is Unmodified (Implicit)
    Log    Check Postcondition VNF PM job is not modified
    GET individual VNF Performance Job
+9 −32
Original line number Diff line number Diff line
@@ -30,58 +30,55 @@ Get Individual Performance Report with invalid resource endpoint
    ...    Post-Conditions: none
    Get Individual Performance Report with invalid resource endpoint
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

POST Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 6.3.3.3.3
    ...    Test title: POST Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF performance report is not created on the VNFM
    ...    Post-Conditions: none
    Send Post request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Individual Performance Report is not Created

PUT Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 6.3.3.3.4
    ...    Test title: PUT Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF performance report is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)

PATCH Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 6.3.3.3.5
    ...    Test title: PATCH Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF performance report is not modified by the operation
    ...    Post-Conditions: none
    Send Patch request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)

DELETE Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 6.3.3.3.6
    ...    Test title: DELETE Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF performance report is not deleted by the operation
    ...    Post-Conditions: none
    Send Delete request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Individual Performance Report Exists

*** Keywords ***
Get Individual Performance Report
@@ -134,26 +131,6 @@ Send Delete request for Individual Performance Report
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check Postcondition VNF Individual Performance Report Exists
    Log    Checking that report still exists
    Get Individual Performance Report

Check Postcondition VNF Individual Performance Report is not Created
    Log    Trying to get a new report
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition VNF Individual Performance Report is Unmodified (Implicit)
    Log    Check Postcondition VNF PM job is not modified
    Get Individual Performance Report
    Log    Check Response matches original VNF report
    ${report}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal    ${origResponse['body']['entries'][0]['objectInstanceId']}    ${report['entries'][0]['objectInstanceId']}

Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}
    ${status}=    Convert To Integer    ${expected_status}    
+0 −99
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           OperatingSystem
Library           JSONLibrary
Resource          environment/individualSubscription.txt
Resource          VNFPerformanceManagementKeywords.robot

*** Test Cases ***
GET Individual VNF Performance Subscription
    [Documentation]    Test ID: 6.3.3.7.1
    ...    Test title: GET Individual VNF Performance Subscription
    ...    Test objective: The objective is to test the retrieval of individual VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Individual VNF Performance Subscription
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmSubscription
    Check HTTP Response Body Subscription Identifier matches the requested Subscription

GET Individual VNF Performance Subscription with invalid resource identifier
    [Documentation]    Test ID: 6.3.3.7.2
    ...    Test title: GET Individual VNF Performance Subscription with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual VNF performance subscription fails when using an invalid resource identifier
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual VNF Performance Subscription with invalid resource identifier
    Check HTTP Response Status Code Is    404

DELETE Individual VNF Performance Subscription
    [Documentation]    Test ID: 6.3.3.7.3
    ...    Test title: DELETE Individual VNF Performance Subscription
    ...    Test objective: The objective is to test the deletion of an individual VNF performance subscription
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Subscription is not available anymore in the VNFM    
    Send Delete request for individual VNF Performance Subscription
    Check HTTP Response Status Code Is    204
    Check Postcondition VNF Performance Subscription is Deleted

DELETE Individual VNF Performance Subscription with invalid resource identifier
    [Documentation]    Test ID: 6.3.3.7.4
    ...    Test title: DELETE Individual VNF Performance Subscription with invalid resource identifier
    ...    Test objective: The objective is to test that the deletion of an individual VNF performance subscription fails when using an invalid resource identifier
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none   
    Send Delete request for individual VNF Performance Subscription with invalid resource identifier
    Check HTTP Response Status Code Is    404

POST Individual VNF Performance Subscription - Method not implemented
    [Documentation]    Test ID: 6.3.3.7.5
    ...    Test title: POST Individual VNF Performance Subscription - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Subscription
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Subscription is not created on the VNFM
    Send Post request for individual VNF Performance Subscription
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Subscription is not Created

PUT Individual VNF Performance Subscription - Method not implemented
    [Documentation]    Test ID: 6.3.3.7.6
    ...    Test title: PUT Individual VNF Performance Subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance subscription
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance subscription is not modified by the operation
    Send Put request for individual VNF Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Subscription is Unmodified (Implicit)

PATCH Individual VNF Performance Subscription - Method not implemented
    [Documentation]    Test ID: 6.3.3.7.7
    ...    Test title: PATCH Individual VNF Performance Subscription - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance subscription
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance subscription is not modified by the operation
    Send Patch request for individual VNF Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Subscription is Unmodified (Implicit)
 No newline at end of file
+5 −14
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ GET Individual Threshold with invalid resource identifier
    ...    Post-Conditions: none
    GET individual VNF Performance Threshold with invalid resource identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

DELETE Individual Threshold
    [Documentation]    Test ID: 6.3.3.5.3
@@ -57,32 +58,31 @@ DELETE Individual Threshold with invalid resource identifier
    ...    Post-Conditions: none   
    Send Delete request for individual VNF Performance Threshold with invalid resource identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

POST Individual Threshold - Method not implemented
    [Documentation]    Test ID: 6.3.3.5.5
    ...    Test title: POST Individual Threshold - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Threshold is not created on the VNFM
    Send Post request for individual VNF Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Threshold is not Created

PUT Individual Threshold - Method not implemented
    [Documentation]    Test ID: 6.3.3.5.6
    ...    Test title: PUT Individual Threshold - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Threshold is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual VNF Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Threshold is Unmodified (Implicit)

PATCH Individual Threshold 
    [Documentation]    Test ID: 6.3.3.5.7
@@ -178,15 +178,6 @@ Check Postcondition VNF Performance Threshold is Unmodified (Implicit)
    Should Be Equal    ${origresponse['body']['id']}    ${threshold.id}
    Should Be Equal    ${origresponse['body']['criteria']}    ${threshold.criteria}

Check Postcondition VNF Performance Threshold is not Created
    Log    Trying to get a new Threshold
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition VNF Performance Threshold is Deleted
    Log    Check Postcondition Threshold is deleted
    GET individual VNF Performance Threshold
+6 −18
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ GET all VNF Performance Monitoring Jobs
    GET all VNF Performance Monitoring Jobs
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Does Not Contain reports

GET VNF Performance Monitoring Jobs with attribute-based filter
    [Documentation]    Test ID: 6.3.3.1.2
@@ -136,7 +135,7 @@ PUT all VNF Performance Monitoring Jobs - Method not implemented
    [Documentation]    Test ID: 6.3.3.1.10
    ...    Test title: PUT all VNF Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Monitoring Jobs
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
@@ -144,11 +143,11 @@ PUT all VNF Performance Monitoring Jobs - Method not implemented
    Send PUT Request for all VNF Performance Monitoring Jobs
    Check HTTP Response Status Code Is    405
    
PATCH all VNF Performance Monitoring Jobs - (Method not implemented)
PATCH all VNF Performance Monitoring Jobs - Method not implemented
    [Documentation]    Test ID: 6.3.3.1.11
    ...    Test title: PATCH all VNF Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update VNF Performance Monitoring Jobs
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
@@ -160,14 +159,13 @@ DELETE all VNF Performance Monitoring Jobs - Method not implemented
    [Documentation]    Test ID: 6.3.3.1.12
    ...    Test title: DELETE all VNF Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Monitoring Jobs
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Pre-conditions: none
    ...    Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PATCH Request for all VNF Performance Monitoring Jobs
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Monitoring Jobs Exist
    
GET VNF Performance Monitoring Jobs to get Paged Response   
    [Documentation]    Test ID: 6.3.3.1.13
@@ -180,7 +178,7 @@ GET VNF Performance Monitoring Jobs to get Paged Response
    ...    Post-Conditions: none   
    GET all VNF Performance Monitoring Jobs
    Check HTTP Response Status Code Is    200
    Check LINK in Header 
    Check HTTP Response Header Contain Link
    
GET VNF Performance Monitoring Jobs for Bad Request Response too big
    [Documentation]    Test ID: 6.3.3.1.14
@@ -317,10 +315,6 @@ Send DELETE Request for all VNF Performance Monitoring Jobs
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Check Postcondition VNF Performance Monitoring Jobs Exist
    Log    Checking that Pm Job still exists
    GET all VNF Performance Monitoring Jobs
    
Check Postcondition PmJob Exists
    Log    Checking that Pm Job exists
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -375,12 +369,6 @@ Check HTTP Response Body Matches filter
    @{words} =  Split String    ${POS_FILTER}       ,${SEPERATOR} 
    Should Be Equal As Strings    ${response['body'][0]['objectInstanceIds']}    @{words}[1]
    
Check HTTP Response Body Does Not Contain reports
    Log    Checking that field element is missing
    ${reports}=    Get Value From Json    ${response['body']}    $..reports
    Should Be Empty    ${reports}
    Log    Reports element is empty as expected
    
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}
    Should Be Equal As Strings   ${response['status']}    ${expected_status} 
@@ -402,6 +390,6 @@ Check HTTP Response Body Json Schema Is
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
    
Check LINK in Header
Check HTTP Response Header Contain Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
 No newline at end of file
Loading