Step 1: Move vm scripts to the right place
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF10 / 010__vtn_manager.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager
3 Suite Setup       Start SuiteVtnMaTest
4 Suite Teardown    Stop SuiteVtnMaTest
5 Resource          ../../../libraries/VtnMaKeywords.robot
6
7 *** Test Cases ***
8 Check if switch1 detected
9     [Documentation]    Check if openflow:1 is detected
10     BuiltIn.Wait_Until_Keyword_Succeeds    12     3    Fetch vtn switch inventory     openflow:1
11
12 Check if switch2 detected
13     [Documentation]    Check if openflow:2 is detected
14     BuiltIn.Wait_Until_Keyword_Succeeds    3     1    Fetch vtn switch inventory     openflow:2
15
16 Check if switch3 detected
17     [Documentation]    Check if openflow:3 is detected
18     BuiltIn.Wait_Until_Keyword_Succeeds    3     1    Fetch vtn switch inventory     openflow:3
19
20 Add a vtn Tenant1
21     [Documentation]    Add a vtn Tenant1
22     Add a vtn    Tenant1    {"description": "Virtual Tenant 1 for Hackfest network"}
23
24 Add a vBridge vBridge1
25     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
26     Add a vBridge    Tenant1    vBridge1    {}
27
28 Add a interface If1
29     [Documentation]    Add a interface if1 into vBridge vBrdige1
30     Add a interface    Tenant1    vBridge1    if1    {}
31
32 Add a interface if2
33     [Documentation]    Add a interface if2 into vBridge vBrdige1
34     Add a interface    Tenant1    vBridge1    if2    {}
35
36 Add a portmap for interface if1
37     [Documentation]    Create a portmap on Interface if1 of vBridge1
38     ${node}=    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
39     ${port}=    Create Dictionary    name=s2-eth1
40     ${portmap_data}=    Create Dictionary    node=${node}    port=${port}
41     Add a portmap    Tenant1    vBridge1    if1    ${portmap_data}
42
43 Add a portmap for interface if2
44     [Documentation]    Create a portmap on Interface if2 of vBridge1
45     ${node}=    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
46     ${port}=    Create Dictionary    name=s3-eth1
47     ${portmap_data}=    Create Dictionary    node=${node}    port=${port}
48     Add a portmap    Tenant1    vBridge1    if2    ${portmap_data}
49
50 Add a vBridge vBridge2
51     [Documentation]    Add a vBridge vBridge2 in vtn Tenant1
52     Add a vBridge    Tenant1    vBridge2    {}
53
54 Add a interface If3
55     [Documentation]    Add a interface if3 into vBridge vBrdige2
56     Add a interface    Tenant1    vBridge2    if3    {}
57
58 Add a interface if4
59     [Documentation]    Add a interface if4 into vBridge vBrdige2
60     Add a interface    Tenant1    vBridge2    if4    {}
61
62 Add a portmap for interface if3
63     [Documentation]    Create a portmap on Interface if3 of vBridge2
64     ${node}=    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
65     ${port}=    Create Dictionary    name=s2-eth2
66     ${portmap_data}=    Create Dictionary    node=${node}    port=${port}
67     Add a portmap    Tenant1    vBridge2    if3    ${portmap_data}
68
69 Add a portmap for interface if4
70     [Documentation]    Create a portmap on Interface if4 of vBridge2
71     ${node}=    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
72     ${port}=    Create Dictionary    name=s3-eth2
73     ${portmap_data}=    Create Dictionary    node=${node}    port=${port}
74     Add a portmap    Tenant1    vBridge2    if4    ${portmap_data}
75
76 Ping h1 to h3
77     [Documentation]    Ping h1 to h3, verify no packet loss
78     Mininet Ping Should Succeed     h1    h3
79
80 Ping h2 to h4
81     [Documentation]    Ping h2 to h4, verify no packet loss
82     Mininet Ping Should Succeed     h2    h4
83
84 Delete a vtn Tenant1
85     [Documentation]    Delete a vtn Tenant1
86     Delete a vtn    Tenant1