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

*** Test Cases ***
Post Rollback operation task  
13
14
    [Documentation]    Test ID: 7.3.1.14.1
    ...    Test title: Post Rollback operation task
15
    ...    Test objective: The objective is to test that POST method initiates rollback on a VNF lifecycle operation
aureliano sinatra's avatar
aureliano sinatra committed
16
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state.
Najam UI Hassan's avatar
Najam UI Hassan committed
17
    ...    Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
18
19
20
21
22
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post Rollback operation
    Check HTTP Response Status Code Is    202
aureliano sinatra's avatar
aureliano sinatra committed
23
    Check Operation Occurrence Id existence
24

aureliano sinatra's avatar
aureliano sinatra committed
25
POST Rollback operation task Conflict (Not-FAILED_TEMP)
26
    [Documentation]    Test ID: 7.3.1.14.2
aureliano sinatra's avatar
aureliano sinatra committed
27
    ...    Test title: POST Rollback operation task Conflict (Not-FAILED_TEMP)
28
    ...    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
29
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state.
Najam UI Hassan's avatar
Najam UI Hassan committed
30
    ...    Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
31
32
33
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
Giacomo Bernini's avatar
Giacomo Bernini committed
34
    Post Rollback operation with conflict
35
36
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
37

aureliano sinatra's avatar
aureliano sinatra committed
38
POST Rollback operation task Not Found
39
    [Documentation]    Test ID: 7.3.1.14.3
aureliano sinatra's avatar
aureliano sinatra committed
40
    ...    Test title: POST Rollback operation task Not Found
41
42
    ...    Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported
    ...    Pre-conditions: 
Najam UI Hassan's avatar
Najam UI Hassan committed
43
    ...    Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
44
45
46
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
Giacomo Bernini's avatar
Giacomo Bernini committed
47
    Post Rollback operation not existing
48
    Check HTTP Response Status Code Is    404
49
    Check HTTP Response Body Json Schema Is    ProblemDetails
50
51

GET Rollback operation task - Method not implemented
52
    [Documentation]    Test ID: 7.3.1.14.4
aureliano sinatra's avatar
aureliano sinatra committed
53
    ...    Test title: GET Rollback operation task - Method not implemented
54
55
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
56
    ...    Reference: Clause 5.4.15.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
57
58
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
59
    ...    Post-Conditions: none
60
61
62
    Get Rollback operation
    Check HTTP Response Status Code Is    405
    
63
PUT Rollback operation task - Method not implemented
64
    [Documentation]    Test ID: 7.3.1.14.5
aureliano sinatra's avatar
aureliano sinatra committed
65
    ...    Test title: PUT Rollback operation task - Method not implemented
66
67
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
68
    ...    Reference: Clause 5.4.15.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
69
70
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
71
    ...    Post-Conditions: none 
72
73
    Put Rollback operation
    Check HTTP Response Status Code Is    405
74
75

PATCH Rollback operation task - Method not implemented
76
    [Documentation]    Test ID: 7.3.1.14.6
aureliano sinatra's avatar
aureliano sinatra committed
77
    ...    Test title: PATCH Rollback operation task - Method not implemented
78
79
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
80
    ...    Reference: Clause 5.4.15.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
81
82
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
83
    ...    Post-Conditions: none
84
85
    Patch Rollback operation
    Check HTTP Response Status Code Is    405
86
87
    
DELETE Rollback operation task - Method not implemented
88
    [Documentation]    Test ID: 7.3.1.14.7
aureliano sinatra's avatar
aureliano sinatra committed
89
    ...    Test title: DELETE Rollback operation task - Method not implemented
90
91
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
92
    ...    Reference: Clause 5.4.15.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
93
94
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
95
    ...    Post-Conditions: none
96
97
    Delete Rollback operation
    Check HTTP Response Status Code Is    405
98

99
*** Keywords ***
100
Check resource existence
101
    Set Headers    {"Accept":"${ACCEPT}"} 
102
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
103
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
104
    Integer    response status    200