blob: 6a6a80b0a54f9f7a5e5aaa66d616df284ece0c27 [file] [log] [blame]
Ray Milkey43ee97f2015-09-04 15:14:40 -07001<!--
2 ~ Copyright 2015 Open Networking Laboratory
3 ~
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
21 <!-- Make sure that reactive forwarding is off -->
22 <step name="Net-Create-Flows.Uninstall-Reactive-Forwarding"
23 exec="onos ${OC1} app deactivate org.onosproject.fwd org.onosproject.ifwd"/>
24 <step name="Net-Create-Flows.Check-Apps" requires="^"
25 exec="onos-check-apps ${OC1} fwd,ifwd excludes"/>
26
27 <!-- Force discovery of hosts -->
28 <step name="Net-Create-Flows.Find-Host-1" requires="^"
29 exec="onos-mininet sendAndExpect h1 ping -c1 -w1 h4 --expect 100% packet loss"/>
30 <step name="Net-Create-Flows.Find-Host-2" requires="^"
31 exec="onos-mininet sendAndExpect h4 ping -c1 -w1 h1 --expect 100% packet loss"/>
32
33
34 <!-- Use REST API to create a point to point intent in each direction -->
35 <step name="Net-Create-Flows.1-to-Host" requires="Net-Create-Flows.Find-Host-2"
36 exec="create-flow.py ${OC1} f1 of:0000000000000001 5 1"/>
37 <step name="Net-Create-Flows.1-to-19" requires="^"
38 exec="create-flow.py ${OC1} f2 of:0000000000000001 1 2"/>
39 <step name="Net-Create-Flows.19-to-7" requires="^"
40 exec="create-flow.py ${OC1} f3 of:0000000000000019 2 8"/>
41 <step name="Net-Create-Flows.7-to-4" requires="^"
42 exec="create-flow.py ${OC1} f4 of:0000000000000007 2 3"/>
43 <step name="Net-Create-Flows.4-to-Host" requires="^"
44 exec="create-flow.py ${OC1} f5 of:0000000000000004 1 3"/>
45
46 <step name="Net-Create-Flows.Host-to-1" requires="^"
47 exec="create-flow.py ${OC1} f6 of:0000000000000001 1 5"/>
48 <step name="Net-Create-Flows.19-to-1" requires="^"
49 exec="create-flow.py ${OC1} f7 of:0000000000000001 2 1"/>
50 <step name="Net-Create-Flows.7-to-19" requires="^"
51 exec="create-flow.py ${OC1} f8 of:0000000000000019 8 2"/>
52 <step name="Net-Create-Flows.4-to-7" requires="^"
53 exec="create-flow.py ${OC1} f9 of:0000000000000007 3 2"/>
54 <step name="Net-Create-Flows.Host-to-4" requires="^"
55 exec="create-flow.py ${OC1} f10 of:0000000000000004 3 1"/>
56
57 <!-- Check that connectivity was established -->
58 <step name="Net-Create-Flows.Ping-XY" requires="^"
59 exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 0% packet loss"/>
60 <step name="Net-Create-Flows.Ping-YX" requires="^"
61 exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 0% packet loss"/>
62
63 <!-- Use REST API to remove the flows. -->
64 <step name="Net-Create-Flows.Delete-f1" requires="^"
65 exec="curl -f -X DELETE -uonos:rocks ${f1Location}"/>
66 <step name="Net-Create-Flows.Delete-f2" requires="^"
67 exec="curl -f -X DELETE -uonos:rocks ${f2Location}"/>
68 <step name="Net-Create-Flows.Delete-f3" requires="^"
69 exec="curl -f -X DELETE -uonos:rocks ${f3Location}"/>
70 <step name="Net-Create-Flows.Delete-f4" requires="^"
71 exec="curl -f -X DELETE -uonos:rocks ${f4Location}"/>
72 <step name="Net-Create-Flows.Delete-f5" requires="^"
73 exec="curl -f -X DELETE -uonos:rocks ${f5Location}"/>
74 <step name="Net-Create-Flows.Delete-f6" requires="^"
75 exec="curl -f -X DELETE -uonos:rocks ${f6Location}"/>
76 <step name="Net-Create-Flows.Delete-f7" requires="^"
77 exec="curl -f -X DELETE -uonos:rocks ${f7Location}"/>
78 <step name="Net-Create-Flows.Delete-f8" requires="^"
79 exec="curl -f -X DELETE -uonos:rocks ${f8Location}"/>
80 <step name="Net-Create-Flows.Delete-f9" requires="^"
81 exec="curl -f -X DELETE -uonos:rocks ${f9Location}"/>
82 <step name="Net-Create-Flows.Delete-f10" requires="^"
83 exec="curl -f -X DELETE -uonos:rocks ${f10Location}"/>
84
85 <!-- Ping again to be sure the path was removed. -->
86 <step name="Net-Create-Flows.Fail-Ping-XY" requires="^"
87 exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 100% packet loss"/>
88 <step name="Net-Create-Flows.Fail-Ping-YX" requires="^"
89 exec="onos-mininet sendAndExpect h4 ping -c1 h1 --expect \ 100% packet loss"/>
90
91
92 </group>
93</scenario>