ONOS-7045 vnet stc - virtual network with 2 virtual devices, 1 virtual link, 2 virtual hosts
Change-Id: Idcb2d29dba27e8e70ce8336a154d9aeeb779a7fc
diff --git a/tools/test/scenarios/vnet2-test.xml b/tools/test/scenarios/vnet2-test.xml
new file mode 100644
index 0000000..9ecfe0b
--- /dev/null
+++ b/tools/test/scenarios/vnet2-test.xml
@@ -0,0 +1,46 @@
+<!--
+ ~ Copyright 2017-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<scenario name="vnet2-test" description="vnet 2 test">
+ <import file="${ONOS_SCENARIOS}/net-setup.xml"/>
+ <dependency name="Net-Setup"/>
+
+ <import file="${ONOS_SCENARIOS}/net-deactivate-fwd.xml"/>
+ <dependency name="Net-Deactivate-Fwd" requires="Net-Setup"/>
+
+ <step name="Check-ping-does-not-work-1" requires="Net-Deactivate-Fwd"
+ exec="onos-mininet sendAndExpect h3 ping -c3 h2 --expect \ 100% packet loss"/>
+
+ <import file="${ONOS_SCENARIOS}/net-setup-vnet2.xml"/>
+ <dependency name="Net-Setup-Vnet2" requires="Check-ping-does-not-work-1"/>
+
+ <import file="${ONOS_SCENARIOS}/net-activate-fwdvn.xml"/>
+ <dependency name="Net-Activate-Fwdvn" requires="Net-Setup-Vnet2"/>
+
+ <step name="Check-ping-does-work-1" requires="Net-Activate-Fwdvn"
+ exec="onos-mininet sendAndExpect h3 ping -c3 h2 --expect \ 0% packet loss"/>
+
+ <import file="${ONOS_SCENARIOS}/net-deactivate-fwdvn.xml"/>
+ <dependency name="Net-Deactivate-Fwdvn" requires="Check-ping-does-work-1"/>
+
+ <step name="Check-ping-does-not-work-2" requires="Net-Deactivate-Fwdvn"
+ exec="onos-mininet sendAndExpect h3 ping -c3 h2 --expect \ 100% packet loss"/>
+
+ <import file="${ONOS_SCENARIOS}/net-teardown-vnet2.xml"/>
+ <dependency name="Net-Teardown-Vnet2" requires="~Net-Deactivate-Fwdvn,~Check-ping-does-not-work-2"/>
+
+ <import file="${ONOS_SCENARIOS}/net-teardown.xml"/>
+ <dependency name="Net-Teardown" requires="~Net-Teardown-Vnet2"/>
+</scenario>