FailOperationTask.robot 5.33 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
10

*** Test Cases ***
aureliano sinatra's avatar
aureliano sinatra committed
11
POST Fail operation task  
12
    [Documentation]    Test ID: 7.3.1.15.1
aureliano sinatra's avatar
aureliano sinatra committed
13
    ...    Test title: POST Fail operation task
aureliano sinatra's avatar
aureliano sinatra committed
14
    ...    Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation 
aureliano sinatra's avatar
aureliano sinatra committed
15
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state.
16
    ...    Reference: clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
17
18
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
19
    ...    Post-Conditions: VNF resource state is FINALLY_FAILED
20
21
    Post Fail operation
    Check HTTP Response Status Code Is    202
aureliano sinatra's avatar
aureliano sinatra committed
22
    Check Operation Occurrence Id existence
23
    Check operation resource state is FINALLY_FAILED
24
25
26

Post Fail operation task Conflict (Not-FAILED_TEMP)
    # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
27
    [Documentation]    Test ID: 7.3.1.15.2
root's avatar
root committed
28
    ...    Test title: Post Fail operation task Conflict (Not-FAILED_TEMP)
aureliano sinatra's avatar
aureliano sinatra committed
29
    ...    Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation 
aureliano sinatra's avatar
aureliano sinatra committed
30
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state.
31
    ...    Reference: clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
32
33
34
35
36
37
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none     
    Post Fail operation
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
38
39
40

Post Fail operation task Not Found
    # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
41
    [Documentation]    Test ID: 7.3.1.15.3
root's avatar
root committed
42
    ...    Test title: Post Fail operation task Not Found 
43
44
    ...    Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported
    ...    Pre-conditions: 
45
    ...    Reference: clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
46
47
48
49
50
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none  
    Post Fail operation
    Check HTTP Response Status Code Is    404
51
52

GET Fail operation task - Method not implemented
53
54
55
56
     [Documentation]    Test ID: 7.3.1.15.4
    ...    Test title: GET Fail operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
57
    ...    Reference: clause 5.4.16.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
58
59
60
61
62
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Get Fail operation
    Check HTTP Response Status Code Is    405
63
64

PUT Fail operation task - Method not implemented
65
66
67
68
     [Documentation]    Test ID: 7.3.1.15.5
    ...    Test title: PUT Fail operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
69
    ...    Reference: clause 5.4.16.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
70
71
72
73
74
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Put Fail operation
    Check HTTP Response Status Code Is    405
75
76

PATCH Fail operation task - Method not implemented
77
     [Documentation]    Test ID: 7.3.1.15.6
root's avatar
root committed
78
    ...    Test title: PATCH Fail operation task- Method not implemented
79
80
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
81
    ...    Reference: clause 5.4.16.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
82
83
84
85
86
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Patch Fail operation
    Check HTTP Response Status Code Is    405
87
88
    
DELETE Fail operation task - Method not implemented
89
90
91
92
     [Documentation]    Test ID: 7.3.1.15.7
    ...    Test title: DELETE Fail operation task- Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented 
    ...    Pre-conditions: none
93
    ...    Reference: clause 5.4.16.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
94
95
96
97
98
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Delete Fail operation
    Check HTTP Response Status Code Is    405
99

100
*** Keywords ***
101
Check resource existence
102
103
104
105
106
107
108
109
110
111
112
113
114
    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 Fail not supported
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
115
116
    # how to check if Fail is not supported?