blob: 9bbd4562b36e2e206b713e95bcb9c13287479749 [file] [log] [blame]
Boyuan Yan1c27bc72019-02-15 19:22:19 +00001#!/bin/bash
2
3# Get first IPv4 Address on local machine, even the machine has lots of NICs.
4localIP=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:" | head -n1`
5mkdir /tmp/odtn
6# Replace IP address in openconfig json files with real ones.
7cat ${ONOS_ROOT}/apps/odtn/api/src/test/resources/openconfig-devices.json | sed "s/127.0.0.1/${localIP}/g" > /tmp/odtn/openconfig-devices.json
8cat ${ONOS_ROOT}/apps/odtn/api/src/test/resources/openconfig-device-link.json | sed "s/127.0.0.1/${localIP}/g" > /tmp/odtn/openconfig-device-link.json
9sleep 30