blob: e8e23997753fe23a4a45a1e5037a8a307925e430 [file] [log] [blame]
Ray Milkeye0827772015-09-11 16:49:21 -07001<!--
2 ~ Copyright 2015 Open Networking Laboratory
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-topo"
17 description="Network topology test">
18 <!-- TODO: parametrize this via recipes -->
19 <group name="Net-topo">
20
21 <!-- Verify the overall topology using the REST API -->
22 <step name="Net-topo.Query-Topo"
23 exec="query-topo.py ${OC1} topo"/>
24 <step name="Net-topo.Verify-Topo-Devices" requires="Net-topo.Query-Topo"
25 exec="test ${topoDevices} == 25"/>
26 <step name="Net-topo.Verify-Topo-Links" requires="Net-topo.Query-Topo"
27 exec="test ${topoLinks} == 140"/>
28 <step name="Net-topo.Verify-Topo-Clusters" requires="Net-topo.Query-Topo"
29 exec="test ${topoClusters} == 1"/>
30
31 <!-- Verify the cluster topology using the REST API -->
32 <step name="Net-topo.Query-Cluster0"
33 exec="query-cluster.py ${OC1} clusterTopo0 0"/>
34 <step name="Net-topo.Verify-Cluster0-Id" requires="Net-topo.Query-Cluster0"
35 exec="test ${clusterTopo0Id} == 0"/>
36 <step name="Net-topo.Verify-Cluster0-DeviceCount" requires="Net-topo.Query-Cluster0"
37 exec="test ${clusterTopo0DeviceCount} == 25"/>
38 <step name="Net-topo.Verify-Cluster0-LinkCount" requires="Net-topo.Query-Cluster0"
39 exec="test ${clusterTopo0LinkCount} == 140"/>
40 <step name="Net-topo.Verify-Cluster0-Root" requires="Net-topo.Query-Cluster0"
41 exec="test '${clusterTopo0Root}' == 'of:000000000000000a'"/>
42
43 <!-- Verify the list of devices for the cluster -->
44 <step name="Net-topo.Verify-Cluster0-Devices"
45 exec="verify-topo-devices.py ${OC1} 0 0 24"/>
46
47 <!-- Spot check some known links in the topology -->
48 <step name="Net-topo.Verify-Cluster0-Link1"
49 exec="find-link-in-cluster.py ${OC1} link1 0 140 of:000000000000000f 8 of:0000000000000015 3"/>
50 <step name="Net-topo.Verify-Cluster0-Link2"
51 exec="find-link-in-cluster.py ${OC1} link2 0 140 of:0000000000000008 3 of:0000000000000005 4"/>
52 <step name="Net-topo.Verify-Cluster0-Link3"
53 exec="find-link-in-cluster.py ${OC1} link3 0 140 of:0000000000000011 2 of:0000000000000002 9"/>
54 <step name="Net-topo.Verify-Cluster0-Link4"
55 exec="find-link-in-cluster.py ${OC1} link4 0 140 of:000000000000000f 3 of:000000000000000d 10"/>
56 <step name="Net-topo.Verify-Cluster0-Link5"
57 exec="find-link-in-cluster.py ${OC1} link5 0 140 of:000000000000000d 13 of:0000000000000010 6"/>
58
59 <!-- Verify the topology infrastructure query -->
60 <step name="Net-topo.Query-Cluster0-Infra1"
61 exec="find-topo-infrastructure.py ${OC1} infra1 of:000000000000000f:8"/>
62 <step name="Net-topo.Verify-Cluster0-Infra1" requires="Net-topo.Query-Cluster0-Infra1"
63 exec="test '${infra1Infrastructure}' == 'True'"/>
64
65 <step name="Net-topo.Query-Cluster0-Infra2"
66 exec="find-topo-infrastructure.py ${OC1} infra2 of:000000000000000d:8"/>
67 <step name="Net-topo.Verify-Cluster0-Infra2" requires="Net-topo.Query-Cluster0-Infra2"
68 exec="test '${infra2Infrastructure}' == 'True'"/>
69
70 <step name="Net-topo.Query-Cluster0-Infra3"
71 exec="find-topo-infrastructure.py ${OC1} infra3 of:0000000000000012:8"/>
72 <step name="Net-topo.Verify-Cluster0-Infra3" requires="Net-topo.Query-Cluster0-Infra3"
73 exec="test '${infra3Infrastructure}' == 'False'"/>
74
75 </group>
76</scenario>