RollBackOperationWorkflow.robot 3.18 KB
Newer Older
mengxuan.zhao's avatar
mengxuan.zhao committed
1
2
3
4
*** Settings ***
Resource    environment/variables.txt
Resource    VnfLcmMntOperationKeywords.robot
Resource    SubscriptionKeywords.robot
5
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
mengxuan.zhao's avatar
mengxuan.zhao committed
6
7
8
9
10
11
12
13
14
Library    OperatingSystem
Library    BuiltIn
Library    Collections
Library    JSONLibrary
Library    Process
Suite Setup    Initialize System
Suite Teardown    Terminate All Processes    kill=true

*** Test Cases ***
15
Rollback a VNF LCM Operation - Successful
aureliano sinatra's avatar
aureliano sinatra committed
16
    [Documentation]    Test ID: 7.3.1.30.1
17
    ...    Test title: Rollback VNF LCM Operation - Successful
mengxuan.zhao's avatar
mengxuan.zhao committed
18
    ...    Test objective: The objective is to test the workflow for a Rolling Back a VNF LCM Operation and the operation is successful
19
    ...    Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications 
Najam UI Hassan's avatar
Najam UI Hassan committed
20
    ...    Reference: Clause 5.3.11 - ETSI GS NFV-SOL 003 [1] v2.7.1
mengxuan.zhao's avatar
mengxuan.zhao committed
21
22
23
24
25
26
27
28
29
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: NFVO is able to receive notifications from VNFM
    ...    Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state
    Send Roll back Operation Request
    Check HTTP Response Status Code Is    202
    Check Operation Notification For Roll Back    ROLLING_BACK
    Check Operation Notification For Roll Back    ROLLED_BACK
    Check Postcondition VNF Roll Back Successful

30
Rollback VNF LCM Operation - Unsuccessful
aureliano sinatra's avatar
aureliano sinatra committed
31
    [Documentation]    Test ID: 7.3.1.30.2
32
33
34
    ...    Test title: Rollback VNF LCM Operation - Unsuccessful
    ...    Test objective: The objective is to test the workflow for a Rollback VNF LCM Operation and the operation is not successful
    ...    Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications 
Najam UI Hassan's avatar
Najam UI Hassan committed
35
    ...    Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1
mengxuan.zhao's avatar
mengxuan.zhao committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: NFVO is able to receive notifications from VNFM
    ...    Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state
    Send Roll back Operation Request
    Check HTTP Response Status Code Is    202
    Check Operation Notification For Roll Back    ROLLING_BACK
    Check Operation Notification For Roll Back    FAILED_TEMP
    Check Postcondition VNF Roll Back UnSuccessful

*** Keywords ***

Initialize System
    Create Sessions

Check Postcondition VNF Roll Back Successful
51
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
52
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} 
mengxuan.zhao's avatar
mengxuan.zhao committed
53
54
55
    String    response body operationState    ROLLED_BACK

Check Postcondition VNF Roll Back Unsuccessful
56
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
57
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} 
mengxuan.zhao's avatar
mengxuan.zhao committed
58
59
60
61
    String    response body operationState    FAILED_TEMP
    
Check Operation Notification For Roll Back 
    [Arguments]    ${status}
62
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}