2 Documentation Test suite for VTN Manager using OF13
3 Suite Setup Start SuiteVtnMaTest
4 Suite Teardown Stop SuiteVtnMaTest
5 Resource ../../../libraries/VtnMaKeywords.robot
8 ${flowconditiondata} "vtn-flow-match":[{"vtn-inet-match":{"source-network":"10.0.0.1/32","protocol":1,"destination-network":"10.0.0.3/32"},"index":"1"}]
10 ${flowfilterInetdata} "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}}],"index": "1"}]
12 ${flowfilterInetdropdata} "vtn-flow-filter":[{"condition":"cond_1","vtn-drop-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}}],"index": "1"}]
14 ${flowfilterIcmpCodedata} "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}}],"index": "1"}]
16 ${flowfilterTpsrcTpdstdata} "vtn-flow-filter": [{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-port-src-action": {"port": "5"}},{"order": "2","vtn-set-port-dst-action": {"port": "10"}}],"index": "1"}]
18 ${flowfilterDscpdata} "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-inet-dscp-action": {"dscp":"32"}}],"index":"1"}]
20 ${flowfiltervlanpcp} "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order":"3","vtn-set-icmp-code-action":{"code":"1"}},{"order":"4","vtn-set-vlan-pcp-action":{"vlan-pcp":"3"}}],"index":"1"}]
23 Check if switch1 detected
24 [Documentation] Check if openflow:1 is detected
25 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
27 Check if switch2 detected
28 [Documentation] Check if openflow:2 is detected
29 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
31 Check if switch3 detected
32 [Documentation] Check if openflow:3 is detected
33 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
36 [Documentation] Add a vtn Tenant1
39 Add a vBridge vBridge1
40 [Documentation] Add a vBridge vBridge1 in vtn Tenant1
41 Add a vBridge Tenant1 vBridge1
44 [Documentation] Add a interface if1 into vBridge vBridge1
45 Add a interface Tenant1 vBridge1 if1
48 [Documentation] Add a interface if2 into vBridge vBridge1
49 Add a interface Tenant1 vBridge1 if2
51 Add a portmap for interface if1
52 [Documentation] Create a portmap on Interface if1 of vBridge1
53 Add a portmap Tenant1 vBridge1 if1 openflow:2 s2-eth1
55 Add a portmap for interface if2
56 [Documentation] Create a portmap on Interface if2 of vBridge1
57 Add a portmap Tenant1 vBridge1 if2 openflow:3 s3-eth1
60 [Documentation] Ping h1 to h3, verify no packet loss
61 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
63 Add a vBridge vBridge2
64 [Documentation] Add a vBridge vBridge2 in vtn Tenant1
65 Add a vBridge Tenant1 vBridge2
68 [Documentation] Add a interface if3 into vBrdige vBridge1
69 Add a interface Tenant1 vBridge1 if3
72 [Documentation] Add a interface if4 into vBrdige vBridge1
73 Add a interface Tenant1 vBridge1 if4
75 Add a portmap for interface if3
76 [Documentation] Create a portmap on Interface if3 of vBridge1
77 Add a portmap Tenant1 vBridge1 if3 openflow:2 s2-eth2
79 Add a portmap for interface if4
80 [Documentation] Create a portmap on Interface if4 of vBridge1
81 Add a portmap Tenant1 vBridge1 if4 openflow:3 s3-eth2
84 [Documentation] Ping h2 to h4, verify no packet loss
85 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h2 h4
88 [Documentation] Create a flowcondition cond_1 using restconfig api
89 Add a flowcondition cond_1 ${flowconditiondata}
91 Add a vtn flowfilter with inet4src and inet4dst
92 [Documentation] Create a flowfilter with inet4 and Verify ping
93 Add a vtn flowfilter Tenant1 ${flowfilterInetdata}
94 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
96 Verify inet4src and inet4dst of vtn flowfilter
97 [Documentation] Verify vtn flowfilter actions in Flow Enties for inet4src and inet4dst
98 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{inet_actions}
100 Add a vbr flowfilter with inet4src and inet4dst
101 [Documentation] Create a flowfilter with inet4 and Verify ping
102 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterInetdata}
103 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
105 Verify inet4src and inet4dst of vbr flowfilter
106 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
107 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{inet_actions}
109 Add a vbrif flowfilter with inet4src and inet4dst
110 [Documentation] Create a flowfilter with inet4 and Verify ping
111 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdata}
112 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
114 Verify inet4src and inet4dst of vbrif flowfilter
115 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
116 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{inet_actions}
118 Add a vtn flowfilter with Icmp code
119 [Documentation] Create a flowfilter with icmp code and Verify ping
120 Add a vtn flowfilter Tenant1 ${flowfilterIcmpCodedata}
121 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
123 Verify icmp action for vtn flowfilter
124 [Documentation] Verify actions in Flow Enties for icmp code and type
125 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{icmp_action}
127 Add a vbr flowfilter with Icmp code
128 [Documentation] Create a flowfilter with icmp code and Verify ping
129 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterIcmpCodedata}
130 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
132 Verify icmp action for vbr flowfilter
133 [Documentation] Verify actions in Flow Enties for icmp code and type
134 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{icmp_action}
136 Add a vbrif flowfilter with Icmp code
137 [Documentation] Create a flowfilter with icmp code and Verify ping
138 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterIcmpCodedata}
139 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
141 Verify icmp action for vbrif flowfilter
142 [Documentation] Verify actions in Flow Enties for icmp code and type
143 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${DUMPFLOWS_OF13} @{icmp_action}
145 Add a flowfilter with tpsrc and tpdst
146 [Documentation] Create a flowfilter with tpsrc and tpdst and Verify ping
147 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterTpsrcTpdstdata}
148 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
150 Add a vtn flowfilter with dscp
151 [Documentation] Create a flowfilter with dscp and Verify ping
152 Add a vtn flowfilter Tenant1 ${flowfilterDscpdata}
153 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
155 Verify dscp action for vtn flowfilter
156 [Documentation] Verify actions in Flow Enties for dscp
157 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_action} ${DUMPFLOWS_OF13}
159 Add a vbr flowfilter with dscp
160 [Documentation] Create a flowfilter with dscp and Verify ping
161 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterDscpdata}
162 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
164 Verify dscp action for vbr flowfilter
165 [Documentation] Verify actions in Flow Enties for dscp
166 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_action} ${DUMPFLOWS_OF13}
168 Add a vbrif flowfilter with dscp
169 [Documentation] Create a flowfilter with dscp and Verify ping
170 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterDscpdata}
171 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
173 Verify dscp action for vbrif flowfilter
174 [Documentation] Verify actions in Flow Enties for dscp
175 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_action} ${DUMPFLOWS_OF13}
177 Add a flowfilter with vlanpcp
178 [Documentation] Create a flowfilter with vlanpcp and Verify ping
179 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfiltervlanpcp}
180 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
182 Add a flowfilter with inet4 for drop
183 [Documentation] Create a flowfilter with inet4 for drop action and Verify no pinging
184 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdropdata}
185 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
187 Verify Removed Flow Entry For Inet After Drop Action
188 [Documentation] Verify no flows between the hosts after drop
190 Verify Removed Flow Entry for Inet Drop Flowfilter @{inet_actions} ${DUMPFLOWS_OF13}
192 Delete a flowcondition
193 [Documentation] Delete a flowcondition
194 Remove flowcondition cond_1
197 [Documentation] Delete a vtn Tenant1