RetryOperationTask.robot 4.99 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
8
Resource    VnfLcmMntOperationKeywords.robot

9
Documentation    This task resource represents the "Retry operation" operation. The client can use this resource to initiate retrying a VNF lifecycle operation.
10
Suite Setup    Check resource existence
11
12
13

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

Post Retry operation task Conflict (Not-FAILED_TEMP)
27
    [Documentation]    Test ID: 7.3.1.13.2
28
    ...    Test title: Post Retry operation task Conflict (Not-FAILED_TEMP)
29
    ...    Test objective: The objective is to test that the retry operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. (i.e. the VNF instance resource is not in FAILED_TEMP state)
aureliano sinatra's avatar
aureliano sinatra committed
30
    ...    Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state.
Najam UI Hassan's avatar
Najam UI Hassan committed
31
    ...    Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
32
33
34
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
Giacomo Bernini's avatar
Giacomo Bernini committed
35
    Post Retry operation with conflict
36
37
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
38
39

Post Retry operation task Not Found
40
    [Documentation]    Test ID: 7.3.1.13.3
41
    ...    Test title: Post Retry operation task Not Found
42
43
    ...    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
44
    ...    Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
45
46
47
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
Giacomo Bernini's avatar
Giacomo Bernini committed
48
    Post Retry operation not existing
49
    Check HTTP Response Status Code Is    404
50
    Check HTTP Response Body Json Schema Is    ProblemDetails
51
52

GET Retry operation task - Method not implemented
53
54
55
56
    [Documentation]    Test ID: 7.3.1.13.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
Najam UI Hassan's avatar
Najam UI Hassan committed
57
    ...    Reference: Clause 5.4.14.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
58
59
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
60
    ...    Post-Conditions: none
61
62
    Get Retry operation
    Check HTTP Response Status Code Is    405
63
64

PUT Retry operation task - Method not implemented
65
66
67
68
    [Documentation]    Test ID: 7.3.1.13.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
Najam UI Hassan's avatar
Najam UI Hassan committed
69
    ...    Reference: Clause 5.4.14.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
70
71
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
72
    ...    Post-Conditions: none
73
74
    Put Retry operation
    Check HTTP Response Status Code Is    405
75
76

PATCH Retry operation task - Method not implemented
77
78
79
80
    [Documentation]    Test ID: 7.3.1.13.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
Najam UI Hassan's avatar
Najam UI Hassan committed
81
    ...    Reference: Clause 5.4.14.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
82
83
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
84
    ...    Post-Conditions: none
85
86
    Patch Retry operation
    Check HTTP Response Status Code Is    405
87
88
    
DELETE Retry operation task - Method not implemented
89
90
91
92
    [Documentation]    Test ID: 7.3.1.13.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
Najam UI Hassan's avatar
Najam UI Hassan committed
93
    ...    Reference: Clause 5.4.14.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
94
95
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
96
    ...    Post-Conditions: none
97
98
    Delete Retry operation
    Check HTTP Response Status Code Is    405
99

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