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

mengxuan.zhao's avatar
mengxuan.zhao committed
11
12
13

*** Test Cases ***
Instantiate a vnfInstance
aureliano sinatra's avatar
aureliano sinatra committed
14
15
16
    [Documentation]    Test ID: 7.3.1.3.1
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to instantiate a VNF instance
aureliano sinatra's avatar
aureliano sinatra committed
17
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
18
    ...    Reference: clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
19
20
21
22
23
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    POST instantiate individual vnfInstance
    Check HTTP Response Status Code Is    202
aureliano sinatra's avatar
aureliano sinatra committed
24
    Check Operation Occurrence Id existence
mengxuan.zhao's avatar
mengxuan.zhao committed
25
26
27

Instantiate a vnfInstance Conflict
    # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
aureliano sinatra's avatar
aureliano sinatra committed
28
29
30
31
    [Documentation]    Test ID: 7.3.1.3.2
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
    ...    Pre-conditions: VNF instance resource is in INSTANTIATED state
32
    ...    Reference: clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
33
34
35
36
37
38
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    POST instantiate individual vnfInstance
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails 
mengxuan.zhao's avatar
mengxuan.zhao committed
39
40
    
GET Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
41
42
43
44
     [Documentation]    Test ID: 7.3.1.3.3
    ...    Test title: GET Instantiate Individual VNFInstance - Method not implemented
    ...    Test objective: The objective is to test that GET method is not implemented
    ...    Pre-conditions:  
45
    ...    Reference: clause 5.4.4.3.2  - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
46
47
48
49
50
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
51
52

PUT Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
53
54
55
56
    [Documentation]    Test ID: 7.3.1.3.4
    ...    Test title: PUT Instantiate Individual VNFInstance  - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions:  
57
    ...    Reference: clause 5.4.4.3.3  - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
58
59
60
61
62
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    PUT instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
63
64

PATCH Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
65
66
67
68
    [Documentation]    Test ID: 7.3.1.3.5
    ...    Test title: PATCH Instantiate Individual VNFInstance  - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions:  
69
    ...    Reference: clause 5.4.4.3.4  - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
70
71
72
73
74
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    PATCH instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
75
76
    
DELETE Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
77
78
79
80
    [Documentation]    Test ID: 7.3.1.3.6
    ...    Test title: DELETE Instantiate Individual VNFInstance  - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions:  
81
    ...    Reference: clause 5.4.4.3.5  - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
82
83
84
85
86
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    DELETE instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
87

88
*** Keywords ***
89
Check resource existence
mengxuan.zhao's avatar
mengxuan.zhao committed
90
91
92
93
94
95
96
97
98
99
100
101
    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

Check resource instantiated
    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} 
    String    response body instantiationState    INSTANTIATED