aboutsummaryrefslogtreecommitdiffstats
path: root/robot/testsuites/demo.robot
blob: 6ec506a3f0c7fb8c2fec96e0c2e053c28fd5ada3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
*** Settings ***
Documentation   Executes the VNF Orchestration Test cases including setup and teardown

Library           ONAPLibrary.SO    WITH NAME    SO
Library   Collections
Resource         ../resources/demo_preload.robot

*** Variables ***

${VNF_NAME}       DemoVNF
${MODULE_NAME}    DemoModuleName

${HB_STACK}
${HB_SERVICE}
${HB_IPV4_OAM_ADDRESS}
${TENANT_NAME}
${VVG_SERVER_ID}
${SERVICE}
${CUSTOMER_NAME}
${SERVICE_INSTANCE_ID}
${STACK_NAMES}
${CATALOG_SERVICE_ID}
${CATALOG_RESOURCE_IDS}
${REVERSE_HEATBRIDGE}
${HB_VNF}

${API_TYPE}   GRA_API

*** Test Cases ***
Initialize Customer And Models
    [Tags]   InitDemo
    Load Customer And Models   Demonstration
    Load Customer   SDN-ETHERNET-INTERNET

Initialize SO Openstack Identity For V3
    [Tags]   InitDemo
    ${arguments}=    Create Dictionary    site_name=${GLOBAL_INJECTED_REGION}    region_id=${GLOBAL_INJECTED_REGION}    clli=${GLOBAL_INJECTED_REGION}    identity_id=DEFAULT_KEYSTONE    identity_url=${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}    mso_id=${GLOBAL_INJECTED_OPENSTACK_USERNAME}    mso_pass=${GLOBAL_INJECTED_OPENSTACK_SO_ENCRYPTED_PASSWORD}    admin_tenant=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}    member_role=admin    identity_server_type=KEYSTONE_V3     authentication_type=USERNAME_PASSWORD    project_domain_name=${GLOBAL_INJECTED_OPENSTACK_DOMAIN_ID}    user_domain_name=${GLOBAL_INJECTED_OPENSTACK_USER_DOMAIN}
    ${auth}=  Create List  ${GLOBAL_SO_CATDB_USERNAME}    ${GLOBAL_SO_PASSWORD}
    Run Keyword If    '${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}'=='v3'     SO.Upsert Cloud Configuration    ${GLOBAL_SO_CATDB_ENDPOINT}    ${GLOBAL_SO_CLOUD_CONFIG_PATH}    ${GLOBAL_TEMPLATE_FOLDER}    ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE}    ${arguments}    auth=${auth}

Initialize vCPE Models
   [Tags]  distributeVCPE
   Load vCPE Models  Demonstration

Initialize Customer
    [Tags]   InitCustomer
    Load Customer   Demonstration
    Load Customer   SDN-ETHERNET-INTERNET

Initialize Models
    [Tags]   InitDistribution
    Load Models   Demonstration

Preload VNF
    [Tags]   PreloadDemo
    Preload User Model   ${VNF_NAME}   ${MODULE_NAME}    ${SERVICE}    ${SERVICE_INSTANCE_ID}

Preload VNF GRA
    [Tags]   PreloadDemoGRA
    Set Global Variable    ${API_TYPE}   GRA_API
    Preload User Model   ${VNF_NAME}   ${MODULE_NAME}    ${SERVICE}    ${SERVICE_INSTANCE_ID}

Instantiate VFW
    [Tags]   instantiateVFW
    Instantiate VNF   vFW   base_vfw

Instantiate Demo VFWCL
    [Tags]   instantiateDemoVFWCL
    Instantiate Demo VNF   vFWCL   base_vpkg

Instantiate Demo VFWCL GRA
    [Tags]   instantiateDemoVFWCLGRA
    Set Global Variable    ${API_TYPE}   GRA_API
    Instantiate Demo VNF   vFWCL   base_vpkg

Instantiate VFWCL
    [Tags]   instantiateVFWCL
    Instantiate VNF   vFWCL  base_vpkg

Instantiate VFWCL GRA
    [Tags]   instantiateVFWCLGRA
    Set Global Variable    ${API_TYPE}   GRA_API
    Instantiate VNF   vFWCL  base_vpkg

Instantiate VFWCL DANOS
    [Tags]   instantiateVFWCLDN
    Set Global Variable    ${API_TYPE}   GRA_API
    Instantiate VNF   vFWCLDN   base_vpkg

Instantiate VLB GRA
    [Tags]   instantiateVLBGRA
    Set Global Variable    ${API_TYPE}   GRA_API
    Instantiate VNF   vLB  base_vpkg

Instantiate VFWDT GRA
    [Tags]   instantiateVFWDTGRA
    Set Global Variable    ${API_TYPE}   GRA_API
    Instantiate VNF   vFWDT  base_vpkg


Instantiate VFWDT
    [Tags]   instantiateVFWDT
    Instantiate VNF   vFWDT  base_vpkg

Instantiate VLB_CDS
    [Tags]   instantiateVLB_CDS
    Instantiate VNF CDS    vLB_CDS   demoVLB_CDS

Delete Instantiated VNF
    [Documentation]   This test assumes all necessary variables are loaded via the variable file create in  Save For Delete
    ...    The Teardown VNF needs to be in the teardown step of the test case...
    [Tags]   deleteVNF
    Setup Browser
    Login To VID GUI
    Delete VNF    ${TENANT_NAME}    ${VVG_SERVER_ID}    ${CUSTOMER_NAME}    ${SERVICE_INSTANCE_ID}    ${STACK_NAMES}    ${REVERSE_HEATBRIDGE}
    [Teardown]   Teardown VNF    ${CUSTOMER_NAME}    ${CATALOG_SERVICE_ID}    ${CATALOG_RESOURCE_IDS}

#Run Heatbridge
#    [Documentation]
#    ...    Try to run heatbridge
#    [Tags]   heatbridge
#    Execute Heatbridge   ${HB_STACK}   ${HB_VNF}    ${HB_SERVICE}    ${HB_IPV4_OAM_ADDRESS}

Distribute vFWNG CDS Model
    [Documentation]    Distribute vFWNG for CDS
    [Tags]    DistributeVFWNG
    [Timeout]    600
    Model Distribution For Directory    service=vFWNG    cds=vfwng

Distribute Demo vFWDT Model
    [Documentation]    Distribute Demo vFWDT  (does not delete model after distribution)
    [Tags]    DistributeDemoVFWDT
    [Timeout]    600
    Model Distribution For Directory    service=vFWDT

Download Service CSAR To Robot
    [Tags]   downloadCsar
    Download CSAR   ${CATALOG_SERVICE_ID}