Add virtualbng_json
diff --git a/xos/configurations/cord-pod/Makefile b/xos/configurations/cord-pod/Makefile
index 9824a9e..e64216e 100644
--- a/xos/configurations/cord-pod/Makefile
+++ b/xos/configurations/cord-pod/Makefile
@@ -1,5 +1,5 @@
.PHONY: xos
-xos: nodes.yaml images.yaml vtn_network_cfg_json
+xos: nodes.yaml images.yaml vtn_network_cfg_json virtualbng_json
sudo docker-compose up -d
../common/wait_for_xos_port.sh 80
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/setup.yaml
@@ -15,6 +15,9 @@
images.yaml:
export SETUPDIR=.; bash ../common/make-images-yaml.sh
+virtualbng_json:
+ export SETUPDIR=.; bash ./make-virtualbng-json.sh
+
vtn_network_cfg_json:
export SETUPDIR=.; bash ./make-vtn-networkconfig-json.sh
diff --git a/xos/configurations/cord-pod/make-virtualbng-json.sh b/xos/configurations/cord-pod/make-virtualbng-json.sh
new file mode 100644
index 0000000..993643c
--- /dev/null
+++ b/xos/configurations/cord-pod/make-virtualbng-json.sh
@@ -0,0 +1,38 @@
+FN=$SETUPDIR/virtualbng.json
+
+rm -f $FN
+
+cat >> $FN <<EOF
+{
+ "localPublicIpPrefixes" : [
+ "10.254.0.128/25"
+ ],
+ "nextHopIpAddress" : "10.254.0.1",
+ "publicFacingMac" : "00:00:00:00:00:66",
+ "xosIpAddress" : "10.11.10.1",
+ "xosRestPort" : "9999",
+ "hosts" : {
+EOF
+
+NODES=$( sudo bash -c "source $SETUPDIR/admin-openrc.sh ; nova hypervisor-list" |grep -v ID|grep -v +|awk '{print $4}' )
+
+NODECOUNT=0
+for NODE in $NODES; do
+ ((NODECOUNT++))
+done
+
+I=0
+for NODE in $NODES; do
+ echo $NODE
+ ((I++))
+ if [[ "$I" -lt "$NODECOUNT" ]]; then
+ echo " \"$NODE\" : \"of:0000000000000001/1\"," >> $FN
+ else
+ echo " \"$NODE\" : \"of:0000000000000001/1\"" >> $FN
+ fi
+done
+
+cat >> $FN <<EOF
+ }
+}
+EOF