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 ${flowconditiondata} "vtn-flow-match":[{"vtn-ether-match":{"destination-address":"ba:bd:0f:e3:a8:c8","ether-type":"2048","source-address":"ca:9e:58:0c:1e:f0","vlan-id": "1"},"vtn-inet-match":{"source-network":"10.0.0.1/32","protocol":1,"destination-network":"10.0.0.2/32"},"index":"1"}]
9 ${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"}]}}
13 Check if switch1 detected
14 [Documentation] Check if openflow:1 is detected
15 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
17 Check if switch2 detected
18 [Documentation] Check if openflow:2 is detected
19 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
21 Check if switch3 detected
22 [Documentation] Check if openflow:3 is detected
23 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
25 Check if switch4 detected
26 [Documentation] Check if openflow:4 is detected
27 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:4
30 [Documentation] Add a vtn Tenant_path
33 Add a vBridge vBridge1
34 [Documentation] Add a vBridge vBridge1 in vtn Tenant_path
35 Add a vBridge Tenant_path vBridge1
37 Add a interface If1_path
38 [Documentation] Add a interface if1_path into vBrdige vBridge1
39 Add a interface Tenant_path vBridge1 if1_path
41 Add a portmap for interface if1_path
42 [Documentation] Create a portmap on Interface if1 of vBridge1
43 Add a portmap Tenant_path vBridge1 if1_path openflow:1 s1-eth1
45 Add a interface If2_path
46 [Documentation] Add a interface if2_path into vBrdige vBridge1
47 Add a interface Tenant_path vBridge1 if2_path
49 Add a portmap for interface if2_path
50 [Documentation] Create a portmap on Interface if2_path of vBridge1
51 Add a portmap Tenant_path vBridge1 if2_path openflow:3 s3-eth3
53 Ping h1 to h2 before path policy
54 [Documentation] Ping h1 to h2, verify no packet loss
55 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
57 Verify flowEntryBeforePathPolicy
58 [Documentation] Checking Flows on switch s1 and s3
60 Verify flowEntryPathPolicy OF10 ${in_port} ${out_before_pathpolicy}
62 Add a flowcondition flowcond_path
63 [Documentation] Create a flowcondition flowcond_path
64 Add a flowcondition flowcond_path ${flowconditiondata}
67 [Documentation] Create a pathmap in the vtn
68 Add a pathmap ${pathmapdata}
71 [Documentation] Create a pathpolicy in the vtn
72 Add a pathpolicy ${pathpolicydata}
75 [Documentation] Retrieve a pathpolicy in the vtn
76 Get a pathpolicy ${policy_id}
78 Ping h1 to h2 after path policy
79 [Documentation] Ping h1 to h2, verify no packet loss
80 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
82 Verify flowEntryAfterPathPolicy
83 [Documentation] Checking Flows on switch s1 and s3
85 Verify flowEntryPathPolicy OF10 ${in_port} ${out_after_pathpolicy}
88 [Documentation] Delete a pathmap
89 Delete a pathmap Tenant_path
92 [Documentation] Delete a pathpolicy
93 Delete a pathpolicy ${policy_id}
95 Delete a flowcondition
96 [Documentation] Delete a flowcondition
97 Remove flowcondition flowcond_path
99 Delete a vtn Tenant_path
100 [Documentation] Delete a vtn Tenant_path
101 Delete a vtn Tenant_path