From e385c470ca3c58d5038d50a86380847bb6a5a56b Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Tue, 4 Apr 2017 15:04:47 +0200 Subject: Reworked helper scripts and fixed typos Added scripts for odl handling Change-Id: Idf715e1c8357a52ef1cd93f58b87c0b92211f85b Signed-off-by: juraj.linkes --- scripts/mount_vpp_into_odl.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'scripts/mount_vpp_into_odl.sh') diff --git a/scripts/mount_vpp_into_odl.sh b/scripts/mount_vpp_into_odl.sh index a5cf148..a0a6ccb 100755 --- a/scripts/mount_vpp_into_odl.sh +++ b/scripts/mount_vpp_into_odl.sh @@ -5,6 +5,8 @@ display_usage() { exit 85 } +. $(dirname $0)/variables.sh + if [ $# -lt 3 ] then display_usage @@ -15,13 +17,10 @@ odl_ip=$1 vpp_host=$2 vpp_ip=$3 -vpp_username=admin -vpp_password=admin - post_data='{"node" : [ {"node-id":"'$vpp_host'", "netconf-node-topology:host":"'$vpp_ip'", -"netconf-node-topology:port":"2831", +"netconf-node-topology:port":"'$vpp_port'", "netconf-node-topology:tcp-only":false, "netconf-node-topology:keepalive-delay":0, "netconf-node-topology:username":"'$vpp_username'", @@ -29,10 +28,9 @@ post_data='{"node" : [ "netconf-node-topology:connection-timeout-millis":10000, "netconf-node-topology:default-request-timeout-millis":10000, "netconf-node-topology:max-connection-attempts":10, -"netconf-node-topology:between-attempts-timeout-millis":10000, -"netconf-node-topology:schema-cache-directory":"hcmount"} +"netconf-node-topology:between-attempts-timeout-millis":10000} ] } ' -curl -u admin:admin -X POST -d "$post_data" -H 'Content-Type: application/json' http://$odl_ip:8081/restconf/config/network-topology:network-topology/network-topology:topology/topology-netconf/ +curl -u $odl_username:$odl_password -X POST -d "$post_data" -H 'Content-Type: application/json' http://$odl_ip:$odl_port/restconf/config/network-topology:network-topology/network-topology:topology/topology-netconf/ -- cgit 1.2.3-korg