ChangeExternalVNFConnectivityTask.robot 4.16 KB
Newer Older
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
1
*** Settings ***
2
Resource    environment/configuration.txt
3
Resource    environment/variables.txt 
4
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
aureliano sinatra's avatar
aureliano sinatra committed
5
Resource    VnfLcmMntOperationKeywords.robot
6
7
8
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
9
10

*** Test Cases ***
aureliano sinatra's avatar
aureliano sinatra committed
11
POST Change external VNF connectivity 
12
    [Documentation]    Test ID: 7.3.1.10.1
aureliano sinatra's avatar
aureliano sinatra committed
13
    ...    Test title: POST Change external VNF connectivity
aureliano sinatra's avatar
aureliano sinatra committed
14
    ...    Test objective: The objective is to test that POST method trigger a change in VNF external connectivity. Supported types of changes that this operation are: 1. Disconnect the external CPs that are connected to a particular external VL, and connect them to a different external VL. 2. Change the connectivity parameters of the existing external CPs, including changing addresses.
aureliano sinatra's avatar
aureliano sinatra committed
15
16
17
18
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.11.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
19
    ...    Post-Conditions: in response header Location shall not be null         
aureliano sinatra's avatar
aureliano sinatra committed
20
21
    POST Change External VNF Connectivity
    Check HTTP Response Status Code Is    202
22
23
    Check Operation Occurrence Id existence
        
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
24
GET Change external VNF connectivity - Method not implemented
25
    [Documentation]    Test ID: 7.3.1.10.2
aureliano sinatra's avatar
aureliano sinatra committed
26
27
28
29
30
31
32
33
34
    ...    Test title: GET Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that GET method is not implemented
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.11.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
35
36

PUT Change external VNF connectivity - Method not implemented
37
    [Documentation]    Test ID: 7.3.1.10.3
aureliano sinatra's avatar
aureliano sinatra committed
38
39
40
41
42
43
44
45
46
    ...    Test title: PUT Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.11.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
47
48

PATCH Change external VNF connectivity - Method not implemented
49
    [Documentation]    Test ID: 7.3.1.10.4
aureliano sinatra's avatar
aureliano sinatra committed
50
51
52
53
54
55
56
57
58
    ...    Test title: PATCH Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.11.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
59
60
    
DELETE Change external VNF connectivity - Method not implemented
61
    [Documentation]    Test ID: 7.3.1.10.5
aureliano sinatra's avatar
aureliano sinatra committed
62
63
64
65
66
67
68
69
70
    ...    Test title: DELETE Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference:  section 5.4.11.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
71

72
*** Keywords ***
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
73
74
75
76
77
78
79
80
81
82
83
Check resource existance
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} 
    Integer    response status    200

Launch another LCM operation
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
Elian Kraja's avatar
Elian Kraja committed
84
    ${body}=    Get File    jsons/scaleVnfRequest.json
mengxuan.zhao's avatar
mengxuan.zhao committed
85
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale    ${body}
mengxuan.zhao's avatar
upd  
mengxuan.zhao committed
86
    Integer    response status    202