RollbackOperationTask.robot 5.28 KB
Newer Older
1
*** Settings ***
2
Resource    environment/configuration.txt
3
Resource    environment/variables.txt 
4
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
5
Library    DependencyLibrary
6
7
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
8
Resource    VnfLcmMntOperationKeywords.robot
9
Documentation    This task resource represents the "Rollback operation" operation. The client can use this resource to initiate rolling back a VNF lifecycle operation
Elian Kraja's avatar
Elian Kraja committed
10
Suite Setup    Check resource existance
11
12
13

*** Test Cases ***
Post Rollback operation task  
14
15
    [Documentation]    Test ID: 7.3.1.14.1
    ...    Test title: Post Rollback operation task
16
    ...    Test objective: The objective is to test that POST method initiates rollback on a VNF lifecycle operation
aureliano sinatra's avatar
aureliano sinatra committed
17
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state.
18
19
20
21
22
23
24
    ...    Reference:  section 5.4.15.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post Rollback operation
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id
25
26
27

Post Rollback operation task Conflict (Not-FAILED_TEMP)
    # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
28
    [Documentation]    Test ID: 7.3.1.14.2
29
30
    ...    Test title: Post Rollback operation task Conflict (Not-FAILED_TEMP)
    ...    Test objective: The objective is to test that POST method initiates a rollback on a VNF lifecycle operation 
aureliano sinatra's avatar
aureliano sinatra committed
31
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state.
32
33
34
35
36
37
38
    ...    Reference:  section 5.4.15.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post Rollback operation
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
39

40
41

Post Rollback operation task Not Found
42
    [Documentation]    Test ID: 7.3.1.14.3
43
    ...    Test title: Post Rollback operation task Not Found
44
45
46
47
48
49
50
51
    ...    Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported
    ...    Pre-conditions: 
    ...    Reference:  section 5.4.15.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post Rollback operation
    Check HTTP Response Status Code Is    404
52
53

GET Rollback operation task - Method not implemented
54
55
56
57
58
59
60
61
62
63
64
    [Documentation]    Test ID: 7.3.1.14.4
    ...    Test title: GET Retry operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.15.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Get Rollback operation
    Check HTTP Response Status Code Is    405
    
65
PUT Rollback operation task - Method not implemented
66
67
68
69
70
71
72
73
74
75
    [Documentation]    Test ID: 7.3.1.14.5
    ...    Test title: PUT Retry operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.15.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Put Rollback operation
    Check HTTP Response Status Code Is    405
76
77

PATCH Rollback operation task - Method not implemented
78
79
80
81
82
83
84
85
86
87
    [Documentation]    Test ID: 7.3.1.14.6
    ...    Test title: PATCH Retry operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.15.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Patch Rollback operation
    Check HTTP Response Status Code Is    405
88
89
    
DELETE Rollback operation task - Method not implemented
90
91
92
93
94
95
96
97
98
99
    [Documentation]    Test ID: 7.3.1.14.7
    ...    Test title: DELETE Retry operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.15.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Delete Rollback operation
    Check HTTP Response Status Code Is    405
100

101
*** Keywords ***
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Check resource existance
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
    Integer    response status    200

Launch another error handling action
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry
    Integer    response status    202
    
Check Rollback not supported
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
116
117
    # how to check if Rollback is not supported?