blob: b77b4207f043b0d678a663758afed5e74ce39f77 [file] [log] [blame]
Ray Milkeyf16975b2018-05-15 14:14:24 -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-port-disable-enable" description="Network port enable-disable test">
17 <!-- Note: This scenario is tailored using 'topo' recipe mechanism; see topos/*.recipe files -->
18 <group name="Net-Port-Disable-Enable">
19
20 <step name="Query-Link-1f"
21 exec="find-link.py ${OC1} unused ${OPSS1} ${OPSP1} ${OPDS1} ${OPDP1}"/>
22 <step name="Query-Link-1b"
23 exec="find-link.py ${OC1} unused ${OPDS1} ${OPDP1} ${OPSS1} ${OPSP1}"/>
24 <step name="Query-Link-2f"
25 exec="find-link.py ${OC1} unused ${OPSS2} ${OPSP2} ${OPDS2} ${OPDP2}"/>
26 <step name="Query-Link-2b"
27 exec="find-link.py ${OC1} unused ${OPDS2} ${OPDP2} ${OPSS2} ${OPSP2}"/>
28
29 <step name="Port-Ping-1"
30 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"
31 requires="~Query-Link-1f, ~Query-Link-1b"/>
32
33 <step name="Port-1-Down" requires="~Port-Ping-1"
34 exec="onos-change-device-portstate ${OC1} ${OPSS1} ${OPSP1} false"/>
35 <step name="Query-Link-3f"
36 exec="find-link.py ${OC1} unused ${OPSS1} ${OPSP1} ${OPDS1} ${OPDP1}"
37 env="!"
38 requires="Port-1-Down"/>
39 <step name="Query-Link-3b"
40 exec="find-link.py ${OC1} unused ${OPDS1} ${OPDP1} ${OPSS1} ${OPSP1}"
41 env="!"
42 requires="Port-1-Down"/>
43
44 <step name="Port-Ping-2-Prep" requires="~Port-1-Down"
45 exec="onos-mininet sendAndExpect ${OPS} ping -c5 ${OPD} --expect ."/>
46 <step name="Port-Ping-2" requires="~Port-Ping-2-Prep"
47 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"/>
48
49 <step name="Port-2-Down" requires="~Port-Ping-2"
50 exec="onos-change-device-portstate ${OC1} ${OPSS2} ${OPSP2} false"/>
51 <step name="Query-Link-4f"
52 exec="find-link.py ${OC1} unused ${OPSS2} ${OPSP2} ${OPDS2} ${OPDP2}"
53 env="!"
54 requires="Port-2-Down"/>
55 <step name="Query-Link-4b"
56 exec="find-link.py ${OC1} unused ${OPDS2} ${OPDP2} ${OPSS2} ${OPSP2}"
57 env="!"
58 requires="Port-2-Down"/>
59
60 <step name="Port-Ping-3" requires="~Port-2-Down"
61 exec="onos-mininet sendAndExpect ${OPS} ping -c1 -w1 ${OPD} --expect 100% packet loss"/>
62
63 <step name="Port-1-Up" requires="~Port-Ping-3"
64 exec="onos-change-device-portstate ${OC1} ${OPSS1} ${OPSP1} true"/>
65 <step name="Query-Link-5f"
66 exec="find-link.py ${OC1} unused ${OPSS1} ${OPSP1} ${OPDS1} ${OPDP1}"
67 requires="Port-1-Up"/>
68 <step name="Query-Link-5b"
69 exec="find-link.py ${OC1} unused ${OPDS1} ${OPDP1} ${OPSS1} ${OPSP1}"
70 requires="Port-1-Up"/>
71
72 <step name="Port-Ping-4-Prep" requires="~Port-1-Up"
73 exec="onos-mininet sendAndExpect ${OPS} ping -c5 ${OPD} --expect ."/>
74 <step name="Port-Ping-4" requires="~Port-Ping-4-Prep"
75 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"/>
76
77 <step name="Port-2-Up" requires="~Port-Ping-4"
78 exec="onos-change-device-portstate ${OC1} ${OPSS2} ${OPSP2} true"/>
79 <step name="Query-Link-6f"
80 exec="find-link.py ${OC1} unused ${OPSS2} ${OPSP2} ${OPDS2} ${OPDP2}"
81 requires="Port-2-Up"/>
82 <step name="Query-Link-6b"
83 exec="find-link.py ${OC1} unused ${OPDS2} ${OPDP2} ${OPSS2} ${OPSP2}"
84 requires="Port-2-Up"/>
85
86 <step name="Port-Ping-5-Prep" requires="~Port-2-Up"
87 exec="onos-mininet sendAndExpect ${OPS} ping -c5 ${OPD} --expect ."/>
88 <step name="Port-Ping-5" requires="~Port-Ping-5-Prep"
89 exec="onos-mininet sendAndExpect ${OPS} ping -c1 ${OPD} --expect \ 0% packet loss"/>
90 </group>
91</scenario>