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

added interconnected test case for VNF Instance Heal 11.3.1.12.1

parent 66cd1f81
Loading
Loading
Loading
Loading
+62 −30
Original line number Diff line number Diff line
@@ -129,9 +129,9 @@ VNF Instantiation
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Operation Occurrence Id existence
    Check Operation Notification For Instantiation  STARTING
    Check Operation Notification For Instantiation  PROCESSING
    Check Operation Notification For Instantiation  COMPLETED
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF Status  INSTANTIATED

POST Terminate a vnfInstance
@@ -161,9 +161,9 @@ Terminate a VNF Instance
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For Terminate    STARTING
    Check Operation Notification For Terminate    PROCESSING
    Check Operation Notification For Terminate    COMPLETED
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF Terminate

GET status information about multiple VNF LCM Operation OCC 
@@ -258,9 +258,9 @@ VNF Instance Scale Out
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For Scale   STARTING
    Check Operation Notification For Scale    PROCESSING
    Check Operation Notification For Scale    COMPLETED
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF    SCALE_OUT

Post Retry operation task
@@ -296,9 +296,9 @@ VNF Instance Scale In
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For Scale   STARTING
    Check Operation Notification For Scale    PROCESSING
    Check Operation Notification For Scale    COMPLETED
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF    SCALE_IN

VNF Instance Heal
@@ -306,9 +306,9 @@ VNF Instance Heal
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For Heal    STARTING
    Check Operation Notification For Heal    PROCESSING
    Check Operation Notification For Heal    COMPLETED
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF Heal

Send Heal VNF Request
@@ -317,17 +317,56 @@ Send Heal VNF Request
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/healVnfRequest.json
    Post    ${NFVO}/${NFVO_API_ROOT}/${NFVO_API_NAME}/${NFVO_API_MAJOR_VERSION}/vnf_instances/${vnfid}/heal    ${body}
    Post    ${VNFM}/${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_instances/${vnfid}/heal    ${body}
    ${output}=    Output    response
    Set Global Variable    ${response}    ${output}

Check Operation Notification For Heal 
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check Postcondition VNF Heal
    Check resource Instantiated

VNF Change External Connectivity
    Send Change Ext Connectivity Request
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF Change Ext Connectivity

Send Change Ext Connectivity Request
    Log    Trying to change the external connectivity of a VNF instance.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/changeExtVnfConnectivityRequest.json
    Post    ${VNFM}/${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_instances/${vnfInstanceId}/change_ext_conn    ${body}
    ${output}=    Output    response
    Set Global Variable    ${response}    ${output}

Get Vnf Ext Link Id
    [Arguments]    ${vnfInstanceId}
    ${vnfInstance}=    Get Vnf Instance    ${vnfInstanceId}
    [Return]    ${vnfInstance.instantiatedVnfInfo.extVirtualLinkInfo.id}

Get Vnf Instance 
    [Arguments]    ${vnfInstanceId}
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${VNFM}/${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_instances/${vnfInstanceId}
    ${body}=    Output    response body
    [Return]    ${body}

Check Postcondition VNF Change Ext Connectivity
    Check resource instantiated
    ${extVLId}=    Get Vnf Ext Link Id    ${vnfid}
    Should be Equal    ${changeVnfExtConnectivityRequest["extVirtualLinks"][0]["id"]}    ${extVLId}
    
Check Operation Notification For Change Ext Connectivity 
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

GET Individual VNF Package [keyword]
    Log    Trying to get a VNF Package present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -669,6 +708,7 @@ Configure Notification Forward

Check Operation Notification
    [Arguments]    ${element}    ${status}=""
    Log    Checking Operation Notification ${element} ${status}
    ${json}=	Get File	schemas/${element}.schema.json
    ${req1}=    Configure Notification Forward    ${element}    ${callback_endpoint}    ${callback_endpoint_fwd}
    ${req2}=    Configure Notification Status Handler    ${callback_endpoint_fwd}    ${status}
@@ -685,9 +725,9 @@ Check VNF Instance Operation Notification
    Clear Requests    ${callback_endpoint}
    Clear Requests    ${callback_endpoint_fwd}

Check Operation Notification For Instantiation
Check Operation Notification For
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}
    Run Keyword If    ${SKIP_INTERMEDIATE_NOTIFICATION_CHECKS} == 0 or (${SKIP_INTERMEDIATE_NOTIFICATION_CHECKS} == 1 and '${status}' == 'COMPLETED')    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check Postcondition VNF Status
    [Arguments]    ${status}
@@ -724,10 +764,6 @@ Send Terminate VNF Request
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}

Check Operation Notification For Terminate 
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check Postcondition VNF Terminate
    Check resource not Instantiated

@@ -861,10 +897,6 @@ Compare ScaleInfos
    Run Keyword If    ${type}==SCALE_OUT    Should Be True    ${old_level_value}<${new_level_value}
    ...    ELSE    Should Be True    ${old_level_value}<${new_level_value}

Check Operation Notification For Scale
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check resource Instantiated
    Check VNF Instance    ${vnfid}
    Check HTTP Response Status Code Is    200
+21 −0
Original line number Diff line number Diff line
*** Settings ***
Suite Setup       Initialize System
Suite Teardown    Terminate All Processes    kill=true
Resource          environment/variables.txt    # Generic Parameters
Resource          IC_TC_Keywords.robot
Library           JSONLibrary

*** Test Cases ***
VNF instance Change External Connectivity
    [Documentation]    Test ID: 11.3.1.12.1
    ...    Test title: VNF instance Change External Connectivity
    ...    Test objective: The objective is to test the interconnected case of VNF instance resource creation, instantiation and change external connectivity
    ...    Pre-conditions: none
    ...    Reference: ETSI GS NFV-SOL 003 [1] v5.1.1
    ...    Config ID: Config_prod_NFVO, Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Package
    POST Create a new vnfInstance
    VNF Instantiation
    VNF Change External Connectivity
 No newline at end of file
+8 −1
Original line number Diff line number Diff line
@@ -9,13 +9,20 @@ ${VNFM_PORT} 3001 # Listening port of the VNFM
${VNFM_SCHEMA}    http
${VNFM}    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}

################################################################################################
##### THIS VARIABLE BELOW ALLOWS TO SKIP INTERMEDIATE LIFEFYCLE OP OCC INTERMEDIATE CHECKS #####
##### IT IS INTENDED TO BE A KNOWN DEVIATION FROM STANDARDS                                #####

${SKIP_INTERMEDIATE_NOTIFICATION_CHECKS}    1

################################################################################################

${ACCEPT}         application/json
${ACCEPT_JSON}    application/json
${CONTENT_TYPE}    application/json
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${AUTH_USAGE}     1
${AUTH_USAGE}     0
${CONTENT_TYPE_PATCH}    application/merge-patch+json

${NFVO_API_ROOT}    
+65 −0
Original line number Diff line number Diff line
{{
  "extVirtualLinks": [
    {
      "id": "string",
      "vimConnectionId": "string",
      "resourceProviderId": "string",
      "resourceId": "string",
      "extCps": [
        {
          "cpdId": "string",
          "cpConfig": [
            {
              "cpInstanceId": "string",
              "linkPortId": "string",
              "cpProtocolData": [
                {
                  "layerProtocol": "IP_OVER_ETHERNET",
                  "ipOverEthernet": {
                    "macAddress": "string",
                    "ipAddresses": [
                      {
                        "type": "IPV4",
                        "fixedAddresses": [
                          "string"
                        ],
                        "numDynamicAddresses": 0,
                        "addressRange": {
                          "minAddress": "string",
                          "maxAddress": "string"
                        },
                        "subnetId": "string"
                      }
                    ]
                  }
                }
              ]
            }
          ]
        }
      ],
      "extLinkPorts": [
        {
          "id": "string",
          "resourceHandle": {
            "vimConnectionId": "string",
            "resourceProviderId": "string",
            "resourceId": "string",
            "vimLevelResourceType": "string"
          }
        }
      ]
    }
  ],
  "vimConnectionInfo": [
    {
      "id": "string",
      "vimId": "string",
      "vimType": "string",
      "interfaceInfo": {},
      "accessInfo": {},
      "extra": {}
    }
  ],
  "additionalParams": {}
}}
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
{{
  "cause": "{healingCause}",
  "additionalParams": {{}}
}}
 No newline at end of file