-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* multi-region-usecase params * add test script for development * Update scenario scripts for exploring phase * Fix pre-clean condition * Update candidate model api * add multi-src-as-te params * update params for multi_src_as_te * Fix diff2csv * update multi_src_as_te params/flows * update .env, configs/mddo-bgp, repos for multi_src_as_te usecase --------- Co-authored-by: mddo <mddo>
- Loading branch information
1 parent
4679b52
commit 9983dac
Showing
32 changed files
with
919 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mddo-bgp
updated
10 files
+4 −0 | README.md | |
+ − | demo-2024-topo.png | |
+38 −38 | original_asis/batfish/layer1_topology.json | |
+23 −28 | original_asis/configs/Core-TK01 | |
+23 −28 | original_asis/configs/Core-TK02 | |
+26 −62 | original_asis/configs/Edge-TK01 | |
+625 −289 | original_asis/configs/Edge-TK02 | |
+253 −572 | original_asis/configs/Edge-TK03 | |
+534 −0 | original_asis/configs/Edge-TK11 | |
+5 −4 | original_asis/configs/SW-TK01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/bash | ||
|
||
print_usage() { | ||
echo "Usage: $(basename "$0") [options]" | ||
echo "Options:" | ||
echo " -b Benchmark topology name (default: original_asis)" | ||
echo " -c Number of candidate topology to generate (default: 2)" | ||
echo " -d Debug/data check, without executing ansible-runner (clab)" | ||
echo " -p Phase number (default: 1)" | ||
echo " -u Debug/step until (default: 99)" | ||
echo " -h Display this help message" | ||
} | ||
|
||
# option check | ||
# defaults | ||
WITH_CLAB=true | ||
original_benchmark_topology=original_asis | ||
candidate_num=2 | ||
phase=1 | ||
step_until=99 | ||
while getopts b:c:dp:u:h option; do | ||
case $option in | ||
b) | ||
original_benchmark_topology="$OPTARG" | ||
;; | ||
c) | ||
candidate_num="$OPTARG" | ||
;; | ||
d) | ||
# data check, debug | ||
# -> without container lab; does not build emulated-env | ||
WITH_CLAB=false | ||
;; | ||
p) | ||
phase="$OPTARG" | ||
;; | ||
u) | ||
step_until="$OPTARG" | ||
;; | ||
h) | ||
print_usage | ||
exit 0 | ||
;; | ||
*) | ||
echo "Unknown option detected, -$OPTARG" >&2 | ||
print_usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
echo # newline | ||
echo "# check: phase = $phase" | ||
echo "# check: benchmark topology = $original_benchmark_topology" | ||
echo "# check: candidate number = $candidate_num" | ||
echo "# check: with_clab = $WITH_CLAB" | ||
echo "# check: step_until = $step_until" | ||
echo # newline | ||
|
||
# pre-clean (phase/session data) | ||
if [ "$phase" -eq 1 ]; then | ||
bash phase_pre_clean.sh | ||
fi | ||
|
||
# generate candidate topologies | ||
if [ "$step_until" -ge 1 ]; then | ||
bash 01_candidate_topology.sh -p "$phase" -c "$candidate_num" -b "$original_benchmark_topology" | ||
fi | ||
|
||
# Boot emulated env of benchmark topology (usually phase 1 and for original_asis only) | ||
if [ "$phase" -eq 1 ] && [ "$step_until" -ge 2 ]; then | ||
if [ "$WITH_CLAB" == true ]; then | ||
bash 02_benchmark_env.sh -p "$phase" -b "$original_benchmark_topology" | ||
else | ||
bash 02_benchmark_env.sh -p "$phase" -b "$original_benchmark_topology" -d # debug | ||
fi | ||
fi | ||
|
||
# Boot each emulated env for candidate topology | ||
if [ "$step_until" -ge 3 ]; then | ||
if [ "$WITH_CLAB" == true ]; then | ||
bash 03_candidate_env.sh -p "$phase" -b "$original_benchmark_topology" | ||
else | ||
bash 03_candidate_env.sh -p "$phase" -b "$original_benchmark_topology" -d # debug | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.