2 Documentation Test suite for VTN Manager PathPolicy using OF10
4 Resource ../../../libraries/VtnMaKeywords.robot
6 Suite Setup Start PathSuiteVtnMaTestOF10
7 Suite Teardown Stop PathSuiteVtnMaTest
12 ... "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"}]
14 ... {"input":{"tenant-name":"Tenant_path","path-map-list":[{"condition":"flowcond_path","policy":"1","index": "1","idle-timeout":"300","hard-timeout":"0"}]}}
16 ... {"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"}]}}
20 Check if switch1 detected
21 [Documentation] Check if openflow:1 is detected
22 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
24 Check if switch2 detected
25 [Documentation] Check if openflow:2 is detected
26 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
28 Check if switch3 detected
29 [Documentation] Check if openflow:3 is detected
30 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
32 Check if switch4 detected
33 [Documentation] Check if openflow:4 is detected
34 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:4
37 [Documentation] Add a vtn Tenant_path
40 Add a vBridge vBridge1
41 [Documentation] Add a vBridge vBridge1 in vtn Tenant_path
42 Add a vBridge Tenant_path vBridge1
44 Add a interface If1_path
45 [Documentation] Add a interface if1_path into vBrdige vBridge1
46 Add a interface Tenant_path vBridge1 if1_path
48 Add a portmap for interface if1_path
49 [Documentation] Create a portmap on Interface if1 of vBridge1
50 Add a portmap Tenant_path vBridge1 if1_path openflow:1 s1-eth1
52 Add a interface If2_path
53 [Documentation] Add a interface if2_path into vBrdige vBridge1
54 Add a interface Tenant_path vBridge1 if2_path
56 Add a portmap for interface if2_path
57 [Documentation] Create a portmap on Interface if2_path of vBridge1
58 Add a portmap Tenant_path vBridge1 if2_path openflow:3 s3-eth3
60 Ping h1 to h2 before path policy
61 [Documentation] Ping h1 to h2, verify no packet loss
62 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
64 Verify flowEntryBeforePathPolicy
65 [Documentation] Checking Flows on switch s1 and s3
67 Verify flowEntryPathPolicy OF10 ${in_port} ${out_before_pathpolicy}
69 Add a flowcondition flowcond_path
70 [Documentation] Create a flowcondition flowcond_path
71 Add a flowcondition flowcond_path ${flowconditiondata}
74 [Documentation] Create a pathmap in the vtn
75 Add a pathmap ${pathmapdata}
78 [Documentation] Create a pathpolicy in the vtn
79 Add a pathpolicy ${pathpolicydata}
82 [Documentation] Retrieve a pathpolicy in the vtn
83 Get a pathpolicy ${policy_id}
85 Ping h1 to h2 after path policy
86 [Documentation] Ping h1 to h2, verify no packet loss
87 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h2
89 Verify flowEntryAfterPathPolicy
90 [Documentation] Checking Flows on switch s1 and s3
92 Verify flowEntryPathPolicy OF10 ${in_port} ${out_after_pathpolicy}
95 [Documentation] Delete a pathmap
96 Delete a pathmap Tenant_path
99 [Documentation] Delete a pathpolicy
100 Delete a pathpolicy ${policy_id}
102 Delete a flowcondition
103 [Documentation] Delete a flowcondition
104 Remove flowcondition flowcond_path
106 Delete a vtn Tenant_path
107 [Documentation] Delete a vtn Tenant_path
108 Delete a vtn Tenant_path