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

templating, minor fix and new testcases added

parent ee694009
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal
Library     OperatingSystem
Library     DependencyLibrary


*** Test Cases ***
GET individual VNF Performance Job
    [Documentation]    Test ID: 6.3.3.2.1
@@ -96,7 +95,7 @@ PATCH Individual VNF Performance Job
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    ...    Post-Conditions: none
    Send Patch request for individual VNF Performance Job
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PMJobModifications
+1 −2
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ PATCH Individual Threshold
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    ThresholdModifications
       
    
PATCH Individual Threshold - Precondition failed
    [Documentation]    Test ID: 6.3.3.5.8
    ...    Test title: PATCH Individual Threshold - Preconition failed
+23 −5
Original line number Diff line number Diff line
@@ -195,7 +195,18 @@ GET VNF Performance Monitoring Jobs for Bad Request Response too big
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

    
GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector
    [Documentation]    Test ID: 6.3.3.1.15
    ...    Test title: GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector
    ...    Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs with exclude_default and fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmJobs  
*** Keywords ***
GET all VNF Performance Monitoring Jobs
    Log    Trying to get all PM Jobs present in the VNFM
@@ -238,6 +249,14 @@ GET VNF Performance Monitoring Jobs with fields attribute selector
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector
    Log    Trying to get all VNF Packages present in the VNFM, using filter params
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields}&exclude_default
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET VNF Performance Monitoring Jobs with exclude_fields attribute selector
    Log    Trying to get all VNF Packages present in the VNFM, using filter params
    Pass Execution If    ${FIELD_USAGE} == 0    Skipping test as VNFM is not supporting 'fields'
@@ -268,7 +287,8 @@ Send Post Request Create new VNF Performance Monitoring Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/CreatePmJobRequest.json
    ${template}=    Get File    jsons/CreatePmJobRequest.json
    ${body}=        Format String   ${template}     objectInstanceIds=${objectInstanceIds}    callbackuri=${callback_uri}
    POST    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
@@ -385,5 +405,3 @@ Check HTTP Response Body Json Schema Is
Check LINK in Header
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
 No newline at end of file

+3 −2
Original line number Diff line number Diff line
@@ -176,8 +176,9 @@ Send Post Request Create new Performance Threshold
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": ${AUTHORIZATION}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${request}=    Get File    jsons/CreateThresholdRequest.json
    POST    ${apiRoot}/${apiName}/${apiVersion}/thresholds    ${request}
    ${template}=    Get File    jsons/CreateThresholdRequest.json
    ${body}=        Format String   ${template}     objectInstanceIds=${objectInstanceIds}    callback_uri=${callback_uri}
    POST    ${apiRoot}/${apiName}/${apiVersion}/thresholds    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

+3 −1
Original line number Diff line number Diff line
*** Settings ***
Resource          variables.txt    # Generic Parameters
*** Variables ***
${POS_FILTER}     objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a
${POS_FILTER}     objectInstanceIds=${objectInstanceIds}
${NEG_FILTER}     criteriaPmJob=erroneousAttributeName
${fields}         criteria,reports
${response}=    httpresponse
Loading