blob: f13543f14226d76b464b105682716b03021191a1 [file] [log] [blame]
Ray Milkeye0827772015-09-11 16:49:21 -07001<!--
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 ~ Copyright 2015-present Open Networking Laboratory
Ray Milkeye0827772015-09-11 16:49:21 -07003 ~
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-topo"
17 description="Network topology test">
18 <!-- TODO: parametrize this via recipes -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070019 <group name="Net-Topo">
Ray Milkeye0827772015-09-11 16:49:21 -070020
21 <!-- Verify the overall topology using the REST API -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070022 <step name="Net-Topo.Query-Topo"
Ray Milkeye0827772015-09-11 16:49:21 -070023 exec="query-topo.py ${OC1} topo"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070024 <step name="Net-Topo.Verify-Topo-Devices" requires="Net-Topo.Query-Topo"
Ray Milkeye0827772015-09-11 16:49:21 -070025 exec="test ${topoDevices} == 25"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070026 <step name="Net-Topo.Verify-Topo-Links" requires="Net-Topo.Query-Topo"
Ray Milkeye0827772015-09-11 16:49:21 -070027 exec="test ${topoLinks} == 140"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070028 <step name="Net-Topo.Verify-Topo-Clusters" requires="Net-Topo.Query-Topo"
Ray Milkeye0827772015-09-11 16:49:21 -070029 exec="test ${topoClusters} == 1"/>
30
31 <!-- Verify the cluster topology using the REST API -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070032 <step name="Net-Topo.Query-Cluster0"
Ray Milkeye0827772015-09-11 16:49:21 -070033 exec="query-cluster.py ${OC1} clusterTopo0 0"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070034 <step name="Net-Topo.Verify-Cluster0-Id" requires="Net-Topo.Query-Cluster0"
Ray Milkeye0827772015-09-11 16:49:21 -070035 exec="test ${clusterTopo0Id} == 0"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070036 <step name="Net-Topo.Verify-Cluster0-DeviceCount" requires="Net-Topo.Query-Cluster0"
Ray Milkeye0827772015-09-11 16:49:21 -070037 exec="test ${clusterTopo0DeviceCount} == 25"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070038 <step name="Net-Topo.Verify-Cluster0-LinkCount" requires="Net-Topo.Query-Cluster0"
Ray Milkeye0827772015-09-11 16:49:21 -070039 exec="test ${clusterTopo0LinkCount} == 140"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070040 <step name="Net-Topo.Verify-Cluster0-Root" requires="Net-Topo.Query-Cluster0"
Ray Milkey12595232016-05-18 11:06:01 -070041 exec="echo '${clusterTopo0Root}' | egrep -e 'of:000000000000000[0-9a-f]'"/>
Ray Milkeye0827772015-09-11 16:49:21 -070042
43 <!-- Verify the list of devices for the cluster -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070044 <step name="Net-Topo.Verify-Cluster0-Devices"
Ray Milkeye0827772015-09-11 16:49:21 -070045 exec="verify-topo-devices.py ${OC1} 0 0 24"/>
46
47 <!-- Spot check some known links in the topology -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070048 <step name="Net-Topo.Verify-Cluster0-Link1"
Ray Milkeye0827772015-09-11 16:49:21 -070049 exec="find-link-in-cluster.py ${OC1} link1 0 140 of:000000000000000f 8 of:0000000000000015 3"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070050 <step name="Net-Topo.Verify-Cluster0-Link2"
Ray Milkeye0827772015-09-11 16:49:21 -070051 exec="find-link-in-cluster.py ${OC1} link2 0 140 of:0000000000000008 3 of:0000000000000005 4"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070052 <step name="Net-Topo.Verify-Cluster0-Link3"
Ray Milkeye0827772015-09-11 16:49:21 -070053 exec="find-link-in-cluster.py ${OC1} link3 0 140 of:0000000000000011 2 of:0000000000000002 9"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070054 <step name="Net-Topo.Verify-Cluster0-Link4"
Ray Milkeye0827772015-09-11 16:49:21 -070055 exec="find-link-in-cluster.py ${OC1} link4 0 140 of:000000000000000f 3 of:000000000000000d 10"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070056 <step name="Net-Topo.Verify-Cluster0-Link5"
Ray Milkeye0827772015-09-11 16:49:21 -070057 exec="find-link-in-cluster.py ${OC1} link5 0 140 of:000000000000000d 13 of:0000000000000010 6"/>
58
59 <!-- Verify the topology infrastructure query -->
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070060 <step name="Net-Topo.Query-Cluster0-Infra1"
Ray Milkeye0827772015-09-11 16:49:21 -070061 exec="find-topo-infrastructure.py ${OC1} infra1 of:000000000000000f:8"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070062 <step name="Net-Topo.Verify-Cluster0-Infra1" requires="Net-Topo.Query-Cluster0-Infra1"
Ray Milkeye0827772015-09-11 16:49:21 -070063 exec="test '${infra1Infrastructure}' == 'True'"/>
64
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070065 <step name="Net-Topo.Query-Cluster0-Infra2"
Ray Milkeye0827772015-09-11 16:49:21 -070066 exec="find-topo-infrastructure.py ${OC1} infra2 of:000000000000000d:8"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070067 <step name="Net-Topo.Verify-Cluster0-Infra2" requires="Net-Topo.Query-Cluster0-Infra2"
Ray Milkeye0827772015-09-11 16:49:21 -070068 exec="test '${infra2Infrastructure}' == 'True'"/>
69
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070070 <step name="Net-Topo.Query-Cluster0-Infra3"
Ray Milkey7728b6a2016-08-23 16:04:45 -070071 exec="find-topo-infrastructure.py ${OC1} infra3 of:0000000000000012:1"/>
Thomas Vachuskae5ab5f72015-10-13 11:55:52 -070072 <step name="Net-Topo.Verify-Cluster0-Infra3" requires="Net-Topo.Query-Cluster0-Infra3"
Ray Milkeye0827772015-09-11 16:49:21 -070073 exec="test '${infra3Infrastructure}' == 'False'"/>
74
75 </group>
76</scenario>