forked from open-traffic-generator/otg-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
job-otgen-bgp.yaml
27 lines (27 loc) · 1.12 KB
/
job-otgen-bgp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
apiVersion: batch/v1
kind: Job
metadata:
generateName: otgen-bgp-
labels:
testcase: otgen-bgp
spec:
backoffLimit: 1
template:
spec:
containers:
- command:
- /bin/sh
- "-c"
- |
export OTG_API="https://service-https-keng-controller.keng-ceos.svc.cluster.local:8443"
otgen create device -n otg1 -p p1 -l eth1 --ip 192.0.2.1 --prefix 30 --gw 192.0.2.2 | \
otgen add device -n otg2 -p p2 -l eth2 --ip 192.0.2.5 --prefix 30 --gw 192.0.2.6 | \
otgen add bgp -d otg1 --asn 1111 --route 198.51.100.0/24 | \
otgen add bgp -d otg2 --asn 2222 --route 203.0.113.0/24 | \
otgen add flow -n f-1-2 --tx otg1 --rx otg2 --src 198.51.100.1 --dst 203.0.113.1 --count 1000 --rate 100 --size 128 | \
otgen add flow -n f-2-1 --tx otg2 --rx otg1 --dst 198.51.100.1 --src 203.0.113.1 --count 2000 --rate 200 --size 256 | \
otgen --log info run -k -m flow | otgen transform -m flow | otgen display -m table
image: otgen:local
name: otgen
restartPolicy: Never