2 Documentation Test suite for VTN Manager PathPolicy using OF10
3 Suite Setup Start PathSuiteVtnMaTestOF10
4 Suite Teardown Stop PathSuiteVtnMaTest
5 Resource ../../../libraries/VtnMaKeywords.robot
8 ${pathmapdata} {"input":{"tenant-name":"Tenant_path","path-map-list":[{"condition":"flowcond_path","policy":"1","index": "1","idle-timeout":"300","hard-timeout":"0"}]}}
10 ${pathpolicydata} {"input":{"operation":"SET","id": "1","default-cost": "10000","vtn-path-cost": [{"port-desc":"openflow:1,3,s1-eth3","cost":"1000"},{"port-desc":"openflow:4,2,s4-eth2","cost":"1000"},{"port-desc":"openflow:3,3,s3-eth3","cost":"100000"}]}}
14 Check if switch1 detected
15 [Documentation] Check if openflow:1 is detected
16 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
18 Check if switch2 detected
19 [Documentation] Check if openflow:2 is detected
20 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
22 Check if switch3 detected
23 [Documentation] Check if openflow:3 is detected
24 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
26 Check if switch4 detected
27 [Documentation] Check if openflow:4 is detected
28 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:4
31 [Documentation] Add a vtn Tenant_path
34 Add a vBridge vBridge1
35 [Documentation] Add a vBridge vBridge1 in vtn Tenant_path
36 Add a vBridge Tenant_path vBridge1
38 Add a interface If1_path
39 [Documentation] Add a interface if1_path into vBrdige vBridge1
40 Add a interface Tenant_path vBridge1 if1_path
42 Add a portmap for interface if1_path
43 [Documentation] Create a portmap on Interface if1 of vBridge1
44 Add a portmap Tenant_path vBridge1 if1_path openflow:1 s1-eth1
46 Add a interface If2_path
47 [Documentation] Add a interface if2_path into vBrdige vBridge1
48 Add a interface Tenant_path vBridge1 if2_path
50 Add a portmap for interface if2_path
51 [Documentation] Create a portmap on Interface if2_path of vBridge1
52 Add a portmap Tenant_path vBridge1 if2_path openflow:3 s3-eth3
54 Ping h1 to h2 before path policy
55 [Documentation] Ping h1 to h2, verify no packet loss
56 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
58 Verify flowEntryBeforePathPolicy
59 [Documentation] Checking Flows on switch s1 and s3
61 Verify flowEntryPathPolicy OF10 ${in_port} ${out_before_pathpolicy}
63 Add a flowcondition flowcond_path
64 [Documentation] Create a flowcondition flowcond_path
65 Add a flowcondition flowcond_path
68 [Documentation] Create a pathmap in the vtn
69 Add a pathmap ${pathmapdata}
72 [Documentation] Create a pathpolicy in the vtn
73 Add a pathpolicy ${pathpolicydata}
76 [Documentation] Retrieve a pathpolicy in the vtn
77 Get a pathpolicy ${policy_id}
79 Ping h1 to h2 after path policy
80 [Documentation] Ping h1 to h2, verify no packet loss
81 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
83 Verify flowEntryAfterPathPolicy
84 [Documentation] Checking Flows on switch s1 and s3
86 Verify flowEntryPathPolicy OF10 ${in_port} ${out_after_pathpolicy}
89 [Documentation] Delete a pathmap
90 Delete a pathmap Tenant_path
93 [Documentation] Delete a pathpolicy
94 Delete a pathpolicy ${policy_id}
96 Delete a flowcondition
97 [Documentation] Delete a flowcondition
98 Remove flowcondition flowcond_path
100 Delete a vtn Tenant_path
101 [Documentation] Delete a vtn Tenant_path
102 Delete a vtn Tenant_path