Simplifying the CO/FO null access topology to exclude layout info.
Change-Id: Ib7c0ae8d8fcd1e041651ef6dc69acc0758e7c9be
diff --git a/tools/test/topos/co-fo-access-null b/tools/test/topos/co-fo-access-null
index 3c07f5b..0fff17b 100755
--- a/tools/test/topos/co-fo-access-null
+++ b/tools/test/topos/co-fo-access-null
@@ -69,22 +69,17 @@
echo "$@" >> $CMDS
}
-function y {
- let p="${3:-400} * ($1 - 1) - (${3:-400} * ($2 - 1)) / 2 + ${4:-0}"
- echo $p
-}
-
# Create central office spines
for spine in $(seq 1 $spines); do
- sim "null-create-device switch Spine-${spine} ${spinePorts} 0 $(y $spine $spines) grid"
+ sim "null-create-device switch Spine-${spine} ${spinePorts}"
done
# Create 2 leaf pairs with dual links to the spines and a link between the pair
for pair in $serviceLeafGroups; do
[ $pair = A ] && l1=1 || l1=3
[ $pair = A ] && l2=2 || l2=4
- sim "null-create-device switch Leaf-${pair}1 ${leafPorts} -200 $(y $l1 4) grid"
- sim "null-create-device switch Leaf-${pair}2 ${leafPorts} -200 $(y $l2 4) grid"
+ sim "null-create-device switch Leaf-${pair}1 ${leafPorts}"
+ sim "null-create-device switch Leaf-${pair}2 ${leafPorts}"
sim "null-create-link direct Leaf-${pair}1 Leaf-${pair}2"
for spine in $(seq 1 $spines); do
@@ -96,42 +91,33 @@
# Create gateways attached to each leaf group; multi-homed to each leaf in the pair
[ $pair = A ] && pn=1 || pn=2
- [ $pair = A ] && gwy=-800 || gwy=800
for gw in $(seq 1 $gateways); do
- sim "null-create-host Leaf-${pair}1,Leaf-${pair}2 10.${pn}.0.${gw} $(y $gw $gateways 200 -200) ${gwy} grid"
+ sim "null-create-host Leaf-${pair}1,Leaf-${pair}2 10.${pn}.0.${gw}"
done
# Create hosts for each leaf group; multi-homed to each leaf in the pair
- [ $pair = A ] && offset=-400 || offset=400
for host in $(seq 1 $serviceHosts); do
- sim "null-create-host Leaf-${pair}1,Leaf-${pair}2 10.${pn}.1.${host} -400 $(y $host $serviceHosts 60 $offset) grid"
+ sim "null-create-host Leaf-${pair}1,Leaf-${pair}2 10.${pn}.1.${host}"
done
done
-# Indexes for HAG and access leaves across all field offices
-let iagg=1
-let iacc=1
-
# Create field offices
for field in $(seq $fieldOffices); do
# Create HAG spines for each office and connect it to central office spines
for spine in $(seq $spines); do
- sim "null-create-device switch Spine-${field}-${spine} ${hagPorts} 200 $(y $iagg $totalHags) grid"
+ sim "null-create-device switch Spine-${field}-${spine} ${hagPorts}"
sim "null-create-link direct Spine-${spine} Spine-${field}-${spine}"
- let iagg=iagg+1
done
# Create single access leafs with links to the spines
for access in $(seq $accessLeaves); do
- sim "null-create-device switch Access-${field}-${access} ${accessPorts} 400 $(y $iacc $totalAccess) grid"
+ sim "null-create-device switch Access-${field}-${access} ${accessPorts}"
for spine in $(seq 1 $spines); do
sim "null-create-link direct Spine-${field}-${spine} Access-${field}-${access}"
done
# Create hosts for each access single leaf
- sim "null-create-hosts Access-${field}-${access} 10.${field}${access}.1.*" $accessHosts 700 $(y $iacc $totalAccess) 6
-
- let iacc=iacc+1
+ sim "null-create-hosts Access-${field}-${access} 10.${field}${access}.1.* $accessHosts"
done
done