blob: 888530b63bbc1274344262af6835fe59366273dc [file] [log] [blame]
Ray Milkeyedb02ce2018-05-17 16:49:45 -07001<!--
2 ~ Copyright 2018-present Open Networking Foundation
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-device_remove" description="Network device removal test">
17 <!-- Note: This scenario is tailored using 'topo' recipe mechanism; see topos/*.recipe files -->
18 <group name="Net-Device-Remove">
19
20 <step name="Query-Device-1"
21 exec="find-device.py ${OC1} unused ${OPSS1}"/>
22
23 <step name="Device-Ping-1"
24 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"
25 requires="~Query-Device-1"/>
26
27 <step name="Device-1-Down" requires="~Device-Ping-1"
28 exec="onos-mininet sendAndExpect switch ${OPSD1} stop"/>
29 <step name="Device-1-Remove" requires="~Device-1-Down"
30 exec="onos ${OC1} device-remove ${OPSS1}"/>
31
32 <step name="Query-Device-2"
33 exec="find-device.py ${OC1} unused ${OPSS1}"
34 env="!"
35 requires="Device-1-Remove"/>
36
37 <step name="Device-2-Down" requires="~Query-Device-2"
38 exec="onos-mininet sendAndExpect switch ${OPSD2} stop"/>
39 <step name="Device-2-Remove" requires="~Device-2-Down"
40 exec="onos ${OC1} device-remove ${OPSS2}"/>
41
42 <step name="Device-Ping-3" requires="~Device-2-Remove"
43 exec="onos-mininet sendAndExpect ${OPS} ping -c1 -w1 ${OPD} --expect 100% packet loss"/>
44
45 <step name="Device-1-Up" requires="~Device-Ping-3"
46 exec="onos-mininet sendAndExpect switch ${OPSD1} start"/>
47 <step name="Query-Device-4"
48 exec="find-device.py ${OC1} unused ${OPSS1}"
49 requires="~Device-1-Up"/>
50
51 <step name="Device-2-Up" requires="~Device-1-Up"
52 exec="onos-mininet sendAndExpect switch ${OPSD2} start"/>
53 <step name="Query-Device-5"
54 exec="find-device.py ${OC1} unused ${OPSS2}"
55 requires="~Device-2-Up"/>
56
57 <step name="Device-ARP-Hosts" requires="~Device-2-Up"
58 exec="onos-mininet sendAndExpect gratuitousArp --expect ."/>
59
60 <step name="Device-Ping-4-Prep" requires="~Device-ARP-Hosts"
61 exec="onos-mininet sendAndExpect ${OPS} ping -c5 ${OPD} --expect ."/>
62 <step name="Device-Ping-4" requires="~Device-Ping-4-Prep"
63 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"/>
64
65 <!--
66 <step name="Device-2-Up" requires="~Device-Ping-4"
67 exec="onos-change-device-Devicestate ${OC1} ${OPSS2} ${OPSP2} true"/>
68 <step name="Query-Link-6f"
69 exec="find-link.py ${OC1} unused ${OPSS2} ${OPSP2} ${OPDS2} ${OPDP2}"
70 requires="Device-2-Up"/>
71 <step name="Query-Link-6b"
72 exec="find-link.py ${OC1} unused ${OPDS2} ${OPDP2} ${OPSS2} ${OPSP2}"
73 requires="Device-2-Up"/>
74
75 <step name="Device-Ping-5-Prep" requires="~Device-2-Up"
76 exec="onos-mininet sendAndExpect ${OPS} ping -c5 ${OPD} -expect ."/>
77 <step name="Device-Ping-5" requires="~Device-Ping-5-Prep"
78 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} -expect \ 0% packet loss"/>
79 -->
80 </group>
81</scenario>