blob: 5e8e457424f67ed25b2fa4d50b7502e233068afe [file] [log] [blame]
Ray Milkey43ee97f2015-09-04 15:14:40 -07001<!--
Brian O'Connorce2a03d2017-08-03 19:21:03 -07002 ~ Copyright 2015-present Open Networking Foundation
Ray Milkey43ee97f2015-09-04 15:14:40 -07003 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15 -->
16<scenario name="net-create-flows"
17 description="Network Flow Creation Test Using REST API">
18 <!-- TODO: parametrize this via recipes -->
19 <group name="Net-Create-Flows">
20
Ray Milkey43ee97f2015-09-04 15:14:40 -070021 <!-- Force discovery of hosts -->
Ray Milkey955c4b82016-07-11 09:48:53 -070022 <step name="Net-Create-Flows.Find-Host-1"
Ray Milkey43ee97f2015-09-04 15:14:40 -070023 exec="onos-mininet sendAndExpect h1 ping -c1 -w1 h4 --expect 100% packet loss"/>
24 <step name="Net-Create-Flows.Find-Host-2" requires="^"
25 exec="onos-mininet sendAndExpect h4 ping -c1 -w1 h1 --expect 100% packet loss"/>
26
Ray Milkey43ee97f2015-09-04 15:14:40 -070027 <!-- Use REST API to create a point to point intent in each direction -->
Ray Milkey43ee97f2015-09-04 15:14:40 -070028 <step name="Net-Create-Flows.1-to-19" requires="^"
29 exec="create-flow.py ${OC1} f2 of:0000000000000001 1 2"/>
30 <step name="Net-Create-Flows.19-to-7" requires="^"
31 exec="create-flow.py ${OC1} f3 of:0000000000000019 2 8"/>
32 <step name="Net-Create-Flows.7-to-4" requires="^"
33 exec="create-flow.py ${OC1} f4 of:0000000000000007 2 3"/>
34 <step name="Net-Create-Flows.4-to-Host" requires="^"
35 exec="create-flow.py ${OC1} f5 of:0000000000000004 1 3"/>
36
Ray Milkey43ee97f2015-09-04 15:14:40 -070037 <step name="Net-Create-Flows.19-to-1" requires="^"
38 exec="create-flow.py ${OC1} f7 of:0000000000000001 2 1"/>
39 <step name="Net-Create-Flows.7-to-19" requires="^"
40 exec="create-flow.py ${OC1} f8 of:0000000000000019 8 2"/>
41 <step name="Net-Create-Flows.4-to-7" requires="^"
42 exec="create-flow.py ${OC1} f9 of:0000000000000007 3 2"/>
43 <step name="Net-Create-Flows.Host-to-4" requires="^"
44 exec="create-flow.py ${OC1} f10 of:0000000000000004 3 1"/>
45
Ray Milkey407ef252016-06-14 11:30:52 -070046 <!-- Make sure all flows are added -->
47 <step name="Net-Create-Flows.Check-Flows-Added" requires="^"
48 exec="onos-check-flows ${OC1}"/>
49
Ray Milkey43ee97f2015-09-04 15:14:40 -070050 <!-- Check that connectivity was established -->
51 <step name="Net-Create-Flows.Ping-XY" requires="^"
52 exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 0% packet loss"/>
53 <step name="Net-Create-Flows.Ping-YX" requires="^"
54 exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 0% packet loss"/>
55
56 <!-- Use REST API to remove the flows. -->
Ray Milkey43ee97f2015-09-04 15:14:40 -070057 <step name="Net-Create-Flows.Delete-f2" requires="^"
58 exec="curl -f -X DELETE -uonos:rocks ${f2Location}"/>
59 <step name="Net-Create-Flows.Delete-f3" requires="^"
60 exec="curl -f -X DELETE -uonos:rocks ${f3Location}"/>
61 <step name="Net-Create-Flows.Delete-f4" requires="^"
62 exec="curl -f -X DELETE -uonos:rocks ${f4Location}"/>
63 <step name="Net-Create-Flows.Delete-f5" requires="^"
64 exec="curl -f -X DELETE -uonos:rocks ${f5Location}"/>
Ray Milkey43ee97f2015-09-04 15:14:40 -070065 <step name="Net-Create-Flows.Delete-f7" requires="^"
66 exec="curl -f -X DELETE -uonos:rocks ${f7Location}"/>
67 <step name="Net-Create-Flows.Delete-f8" requires="^"
68 exec="curl -f -X DELETE -uonos:rocks ${f8Location}"/>
69 <step name="Net-Create-Flows.Delete-f9" requires="^"
70 exec="curl -f -X DELETE -uonos:rocks ${f9Location}"/>
71 <step name="Net-Create-Flows.Delete-f10" requires="^"
72 exec="curl -f -X DELETE -uonos:rocks ${f10Location}"/>
73
74 <!-- Ping again to be sure the path was removed. -->
75 <step name="Net-Create-Flows.Fail-Ping-XY" requires="^"
76 exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 100% packet loss"/>
77 <step name="Net-Create-Flows.Fail-Ping-YX" requires="^"
78 exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 100% packet loss"/>
79
80
81 </group>
82</scenario>