2 Documentation Test suite for VTN Manager using OF10
3 Suite Setup Start PathSuiteVtnMaTestOF10
4 Suite Teardown Stop PathSuiteVtnMaTest
5 Resource ../../../libraries/VtnMaKeywordsLi.robot
8 ${pathmapdata} {"index": 1,"condition":"flowcond_path","policy":1,"idleTimeout": 300,"hardTimeout": 0}
9 ${pathpolicydata} {"id": 1,"default": 100000,"cost": [{"location": {"node": {"type": "OF","id": "00:00:00:00:00:00:00:01"},"port": {"type": "OF","id": "3","name": "s1-eth3"}},"cost": 1000},{"location": {"node": {"type": "OF","id": "00:00:00:00:00:00:00:04"},"port": {"type": "OF","id": "2","name": "s4-eth2"}},"cost": 1000},{"location": {"node": {"type": "OF", "id": "00:00:00:00:00:00:00:03"},"port": {"type": "OF","id": "3","name": "s3-eth3"}},"cost": 100000}]}
12 Check if switch1 detected
13 [Documentation] Check if openflow:1 is detected
14 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
16 Check if switch2 detected
17 [Documentation] Check if openflow:2 is detected
18 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
20 Check if switch3 detected
21 [Documentation] Check if openflow:3 is detected
22 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
24 Check if switch4 detected
25 [Documentation] Check if openflow:4 is detected
26 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:4
29 [Documentation] Add a vtn Tenant_path
30 Add a vtn Tenant_path {"idleTimeout": "200","hardTimeout": "600","description": "Virtual Tenant_path for Hackfest network"}
32 Add a vBridge vBridge1
33 [Documentation] Add a vBridge vBridge1 in vtn Tenant_path
34 Add a vBridge Tenant_path vBridge1 {"ageInterval": "300","description": "vBridge1 for Tenant_path"}
36 Add a interface If1_path
37 [Documentation] Add a interface if1_path into vBrdige vBridge1
38 Add a interface Tenant_path vBridge1 if1_path {}
40 Add a portmap for interface if1_path
41 [Documentation] Create a portmap on Interface if1 of vBridge1
42 ${node} Create Dictionary type=OF id=00:00:00:00:00:00:00:01
43 ${port} Create Dictionary name=s1-eth1 type=OF id=1
44 ${portmap_data} Create Dictionary node=${node} port=${port}
45 Add a portmap Tenant_path vBridge1 if1_path ${portmap_data}
47 Add a interface If2_path
48 [Documentation] Add a interface if2_path into vBrdige vBridge1
49 Add a interface Tenant_path vBridge1 if2_path {}
51 Add a portmap for interface if2_path
52 [Documentation] Create a portmap on Interface if2_path of vBridge1
53 ${node} Create Dictionary type=OF id=00:00:00:00:00:00:00:03
54 ${port} Create Dictionary name=s3-eth3 type=OF id=3
55 ${portmap_data} Create Dictionary node=${node} port=${port}
56 Add a portmap Tenant_path vBridge1 if2_path ${portmap_data}
58 Ping h1 to h2 before path policy
59 [Documentation] Ping h1 to h2, verify no packet loss
60 Mininet Ping Should Succeed h1 h2
62 Verify flowEntryBeforePathPolicy
63 [Documentation] Checking Flows on switch s1 and s3
65 Verify flowEntryPathPolicy OF10 ${in_port} ${out_before_pathpolicy}
67 Add a flowcondition flowcond_path
68 [Documentation] Create a flowcondition flowcond_path
69 ${inet4}= Create Dictionary src=10.0.0.1 dst=10.0.0.2 protocol=1
70 ${inetMatch}= Create Dictionary inet4=${inet4}
71 ${ethernet}= Create Dictionary src=ca:9e:58:0c:1e:f0 dst=ba:bd:0f:e3:a8:c8 type=2048
72 ${matchElement}= Create Dictionary index=1 ethernet=${ethernet} inetMatch=${inetMatch}
73 @{matchlist} Create List ${matchElement}
74 ${flowcond_data}= Create Dictionary name=flowcond_path match=${matchlist}
75 Add a flowcondition flowcond_path ${flowcond_data}
78 [Documentation] Create a pathmap in the vtn
79 Add a pathmap ${pathmapdata}
82 [Documentation] Retrieve a pathmap in the vtn
86 [Documentation] Create a pathpolicy in the vtn
87 Add a pathpolicy ${pathpolicydata}
90 [Documentation] Retrieve a pathpolicy in the vtn
93 Ping h1 to h2 after path policy
94 [Documentation] Ping h1 to h2, verify no packet loss
95 Mininet Ping Should Succeed h1 h2
97 Verify flowEntryAfterPathPolicy
98 [Documentation] Checking Flows on switch s1 and s3
100 Verify flowEntryPathPolicy OF10 ${in_port} ${out_after_pathpolicy}
103 [Documentation] Delete a pathmap
106 Get a pathmap after delete
107 [Documentation] Retrieve a pathmap in the vtn after delete to check whether it is deleted properly
108 Get a pathmap after delete
111 [Documentation] Delete a pathpolicy
114 Get a pathpolicy after delete
115 [Documentation] Retrieve a pathpolicy in the vtn after delete to check whether it is deleted properly
116 Get a pathpolicy after delete
118 Delete a flowcondition
119 [Documentation] Delete a flowcondition
120 Delete a flowcondition flowcond_path
122 Delete a vtn Tenant_path
123 [Documentation] Delete a vtn Tenant_path
124 Delete a vtn Tenant_path