SEBA-728 Fix hardcoded UNI port for Ponsim
Change-Id: I5cb2d072c7c5e232c1c9813e3f7318e1346e0d41
diff --git a/tests/atests/build/Makefile b/tests/atests/build/Makefile
index 854c68e..f247d66 100644
--- a/tests/atests/build/Makefile
+++ b/tests/atests/build/Makefile
@@ -113,8 +113,6 @@
touch $@
$(M)/simtype-bbsim: | $(M)/voltha-running
- cd $(HOME)/cord/helm-charts; helm upgrade --install ponnet ponnet
- $(HOME)/cord/helm-charts/scripts/wait_for_pods.sh kube-system
cd $(HOME)/cord/helm-charts; helm upgrade --install bbsim bbsim -f configs/seba-ponsim.yaml --set images.bbsim.repository=voltha/voltha-bbsim,images.bbsim.tag=latest,images.bbsim.pullPolicy=Never
touch $@
@@ -122,19 +120,17 @@
cd $(HOME)/cord/helm-charts; helm upgrade --install ponnet ponnet
$(HOME)/cord/helm-charts/scripts/wait_for_pods.sh kube-system
cd $(HOME)/cord/helm-charts; helm upgrade --install ponsimv2 ponsimv2 -f configs/seba-ponsim.yaml --set images.olt.repository=voltha-ponsim,images.olt.tag=latest,images.olt.pullPolicy=Never,images.onu.repository=voltha-ponsim,images.onu.tag=latest,images.onu.pullPolicy=Never,images.rg.repository=voltha-tester,images.rg.tag=latest,images.rg.pullPolicy=Never
- touch $@
-
-$(M)/pon0-fwd: | $(M)/voltha-running
- echo 8 > /tmp/pon0_group_fwd_mask
- until sudo cp /tmp/pon0_group_fwd_mask /sys/class/net/pon0/bridge/group_fwd_mask; \
+ $(HOME)/cord/helm-charts/scripts/wait_for_pods.sh voltha
+ echo 8 > /tmp/group_fwd_mask
+ for bridge in /sys/class/net/pon*; \
do \
- echo "waiting for pon0..."; \
- sleep 5; \
+ echo Setting up forwarding on `basename $$bridge`; \
+ sudo cp /tmp/group_fwd_mask $$bridge/bridge/group_fwd_mask; \
done
- rm /tmp/pon0_group_fwd_mask
+ rm /tmp/group_fwd_mask
touch $@
-$(M)/voltha-simtype-running: | $(M)/pon0-fwd
+$(M)/voltha-simtype-running:
$(HOME)/cord/helm-charts/scripts/wait_for_pods.sh
until http -a karaf:karaf --ignore-stdin --check-status GET http://127.0.0.1:30120/onos/v1/configuration/org.opencord.olt.impl.Olt; \
do \
@@ -148,7 +144,7 @@
remove-chart-milestones:
cd $(M); sudo rm -f setup kafka kafka-running onos voltha etcd-operator-ready etcd-cluster \
- voltha-running simtype-ponsim simtype-bbsim pon0-fwd voltha-simtype-running
+ voltha-running simtype-ponsim simtype-bbsim voltha-simtype-running
remove-kube-milestones:
cd $(M); sudo rm -f kubeadm helm-init
@@ -161,3 +157,5 @@
sudo rm -f /var/lib/cni/networks/pon*/* || true
sudo rm -f /var/lib/cni/networks/nni*/* || true
sudo rm -f /var/lib/cni/networks/k8s-pod-network/* || true
+ for br in /sys/class/net/pon*; do sudo ip link delete `basename $$br` type bridge; done || true
+ for br in /sys/class/net/nni*; do sudo ip link delete `basename $$br` type bridge; done || true