Tidy recently edited files
[integration/test.git] / csit / suites / openstack / vpnservice / basic_vpnservice.robot
1 *** Settings ***
2 Documentation     Test suite to validate vpnservice functionality in an openstack integrated environment.
3 ...               The assumption of this suite is that the environment is already configured with the proper
4 ...               integration bridges and vxlan tunnels.
5 Suite Setup       Basic Vpnservice Suite Setup
6 Suite Teardown    Basic Vpnservice Suite Teardown
7 Library           SSHLibrary
8 Library           OperatingSystem
9 Library           RequestsLibrary
10 Resource          ../../../libraries/Utils.robot
11 Resource          ../../../libraries/OpenStackOperations.robot
12 Resource          ../../../libraries/DevstackUtils.robot
13 Variables         ../../../variables/Variables.py
14
15 *** Variables ***
16 ${net_1}          NET10
17 ${net_2}          NET20
18 ${subnet_1}       SUBNET1
19 ${subnet_2}       SUBNET2
20 ${subnet_1_cidr}    10.1.1.0/24
21 ${subnet_2_cidr}    20.1.1.0/24
22 ${port_1}         PORT1
23 ${port_2}         PORT2
24 ${port_3}         PORT3
25 ${port_4}         PORT4
26
27 *** Test Cases ***
28 Verify Tunnel Creation
29     [Documentation]    Checks that vxlan tunnels have been created properly.
30     [Tags]    exclude
31     Log    This test case is currently a noop, but work can be added here to validate if needed.    However, as the    suite Documentation notes, it's already assumed that the environment has been configured properly.    If    we do add work in this test case, we need to remove the "exclude" tag for it to run.    In fact, if this
32     ...    test case is critical to run, and if it fails we would be dead in the water for the rest of the suite,    we should move it to Suite Setup so that nothing else will run and waste time in a broken environment.
33     #TC1
34
35 Create Neutron Networks
36     [Documentation]    Create two networks
37     Create Network    ${net_1}    --provider:network_type local
38     Create Network    ${net_2}    --provider:network_type local
39     List Networks
40
41 Create Neutron Subnets
42     [Documentation]    Create two subnets for previously created networks
43     Create SubNet    ${net_1}    ${subnet_1}    ${subnet_1_cidr}
44     Create SubNet    ${net_2}    ${subnet_2}    ${subnet_2_cidr}
45     List Subnets
46
47 Create Neutron Ports
48     [Documentation]    Create four ports under previously created subnets
49     Create Port    ${net_1}    ${port_1}
50     Create Port    ${net_1}    ${port_2}
51     Create Port    ${net_2}    ${port_3}
52     Create Port    ${net_2}    ${port_4}
53
54 Check OpenDaylight Neutron Ports
55     [Documentation]    Checking OpenDaylight Neutron API for known ports
56     ${resp}    RequestsLibrary.Get Request    session    ${NEUTRON_PORTS_API}
57     Log    ${resp.content}
58     Should be Equal As Strings    ${resp.status_code}    200
59
60 *** Keywords ***
61 Basic Vpnservice Suite Setup
62     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
63
64 Basic Vpnservice Suite Teardown
65     Delete All Sessions