Adding net-prerequisites.xml scenario - included in fast & smoke scenarios.

Adding net-setup.xml dependency on arping (sudo apt-get install iputils-arping)

Change-Id: I3276247dc8ae2a2c4ed47801385eb8e50be8f244
diff --git a/tools/test/scenarios/fast.xml b/tools/test/scenarios/fast.xml
index 0d38c45..9d979a8 100644
--- a/tools/test/scenarios/fast.xml
+++ b/tools/test/scenarios/fast.xml
@@ -15,9 +15,10 @@
   -->
 <scenario name="fast" description="ONOS fast smoke test">
     <import file="${ONOS_SCENARIOS}/prerequisites.xml"/>
+    <import file="${ONOS_SCENARIOS}/net-prerequisites.xml"/>
 
     <import file="${ONOS_SCENARIOS}/setup.xml"/>
-    <dependency name="Setup" requires="Prerequisites"/>
+    <dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/>
 
     <import file="${ONOS_SCENARIOS}/net-fast.xml"/>
     <dependency name="Net-Fast" requires="Setup"/>
diff --git a/tools/test/scenarios/net-prerequisites.xml b/tools/test/scenarios/net-prerequisites.xml
new file mode 100644
index 0000000..33f836a
--- /dev/null
+++ b/tools/test/scenarios/net-prerequisites.xml
@@ -0,0 +1,22 @@
+<!--
+  ~ Copyright 2016 Open Networking Laboratory
+  ~
+  ~ 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="net-prerequisites" description="Network setup prerequisites check">
+    <group name="Net-Prerequisites">
+        <step name="Check-mininet" exec="ssh ${ONOS_USER}@${OCN} type mn"/>
+        <step name="Check-screen" exec="ssh ${ONOS_USER}@${OCN} type screen"/>
+        <step name="Check-arping" exec="ssh ${ONOS_USER}@${OCN} type arping"/>
+    </group>
+</scenario>
diff --git a/tools/test/scenarios/net-setup.xml b/tools/test/scenarios/net-setup.xml
index 7ad2ccc..702480e 100644
--- a/tools/test/scenarios/net-setup.xml
+++ b/tools/test/scenarios/net-setup.xml
@@ -34,8 +34,14 @@
         <step name="Wait-For-Mininet" requires="Start-Mininet"
               exec="onos-mininet wait 10"/>
 
-        <step name="Check-Summary" requires="Wait-For-Mininet"
-              exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/>
+        <step name="Show-Network" requires="Wait-For-Mininet"
+              exec="onos-mininet sendAndExpect net --expect ."/>
+
+        <step name="Discover-Hosts" requires="Show-Network"
+              exec="onos-mininet sendAndExpect py [ h.cmd('arping -U -c 1 ' + h.IP()) for h in net.hosts ] --expect ."/>
+
+        <step name="Check-Summary" requires="Discover-Hosts"
+              exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
 
         <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
               exec="onos ${OC1} balance-masters"/>
diff --git a/tools/test/scenarios/smoke.xml b/tools/test/scenarios/smoke.xml
index ce8140a..2344972 100644
--- a/tools/test/scenarios/smoke.xml
+++ b/tools/test/scenarios/smoke.xml
@@ -15,9 +15,10 @@
   -->
 <scenario name="smoke" description="ONOS smoke test">
     <import file="${ONOS_SCENARIOS}/prerequisites.xml"/>
+    <import file="${ONOS_SCENARIOS}/net-prerequisites.xml"/>
 
     <import file="${ONOS_SCENARIOS}/setup.xml"/>
-    <dependency name="Setup" requires="Prerequisites"/>
+    <dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/>
 
     <import file="${ONOS_SCENARIOS}/net-smoke.xml"/>
     <dependency name="Net-Smoke" requires="Setup"/>