#!/bin/bash add_vpp() { odl_ip=$1 vpp_host=$2 vpp_ip=$3 vpp_port=$4 vpp_username=admin vpp_password=admin put_data=' '$vpp_host' '$vpp_ip' '$vpp_port' admin admin false 0 ' curl -u admin:admin -X PUT -d "$put_data" -H 'Content-Type: application/xml' http://$odl_ip:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/$vpp_host } if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then echo "usage: ./ncmount.sh ie ./ncmount.sh 127.0.0.1 vpp1 192.168.10.12 2830" exit 1 fi add_vpp $1 $2 $3 $4