RetryOperationWorkflow.robot 2.99 KB
Newer Older
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
6
7
8
9
10
11
12
13
Library    OperatingSystem
Library    BuiltIn
Library    Collections
Library    JSONLibrary
Library    Process

*** Test Cases ***
Retry VNF LCM Operation - Successful
aureliano sinatra's avatar
aureliano sinatra committed
14
    [Documentation]    Test ID: 7.3.1.29.1
15
    ...    Test title: Retry VNF LCM Operation - Successful
16
    ...    Test objective: The objective is to test the workflow for a successful Retry VNF LCM Operation and the status notifications
aureliano sinatra's avatar
aureliano sinatra committed
17
    ...    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
18
    ...    Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1
19
20
21
22
23
24
25
26
27
28
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: NFVO is able to receive notifications from VNFM
    ...    Post-Conditions: The VNF lifecycle management operation occurrence is in COMPLETED state
    Send Retry Operation Request
    Check HTTP Response Status Code Is    202
    Check Operation Notification For Retry    PROCESSING
    Check Operation Notification For Retry    COMPLETED
    Check Postcondition VNF Retry Successful

Retry VNF LCM Operation - Unsuccessful
aureliano sinatra's avatar
aureliano sinatra committed
29
    [Documentation]    Test ID: 7.3.1.29.2
30
    ...    Test title: Retry VNF LCM Operation - Unsuccessful
31
    ...    Test objective: The objective is to test the workflow for an unsuccesful Retry VNF LCM Operation and the status notifications
aureliano sinatra's avatar
aureliano sinatra committed
32
    ...    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
33
    ...    Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1
34
35
36
37
38
39
    ...    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 Retry Operation Request
    Check HTTP Response Status Code Is    202
    Check Operation Notification For Retry    PROCESSING
mengxuan.zhao's avatar
mengxuan.zhao committed
40
    Check Operation Notification For Retry    FAILED_TEMP
41
42
43
44
    Check Postcondition VNF Retry Unsuccessful

*** Keywords ***
Check Postcondition VNF Retry Successful
45
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
46
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} 
47
48
49
    String    response body operationState    COMPLETED

Check Postcondition VNF Retry Unsuccessful
50
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
51
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} 
52
53
54
55
    String    response body operationState    FAILED_TEMP
    
Check Operation Notification For Retry 
    [Arguments]    ${status}
56
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}