diff options
author | 2016-02-08 05:53:01 -0500 | |
---|---|---|
committer | 2016-02-09 14:03:35 +0000 | |
commit | 13173800bc96ae9db7ee034f7628b2d5de8dc061 (patch) | |
tree | 3766435596e4e1181c165b3631947b5ee6e03a05 /vagrant-demo/ncmount.sh | |
parent | d1e8024f091a1cc59f2a64c3a44f5cba21179ee7 (diff) |
Vagrant configuration to create VMs and connections for demo.
Change-Id: I4648f5cd738183193b3b342a96ececccdea0bad6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'vagrant-demo/ncmount.sh')
-rwxr-xr-x | vagrant-demo/ncmount.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vagrant-demo/ncmount.sh b/vagrant-demo/ncmount.sh new file mode 100755 index 000000000..684c38a31 --- /dev/null +++ b/vagrant-demo/ncmount.sh @@ -0,0 +1,35 @@ +#!/bin/bash + + +add_vpp() { + odl_ip=$1 + vpp_host=$2 + vpp_ip=$3 + vpp_port=$4 + + vpp_username=admin + vpp_password=admin + + put_data='<node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> + <node-id>'$vpp_host'</node-id> + <host xmlns="urn:opendaylight:netconf-node-topology">'$vpp_ip'</host> + <port xmlns="urn:opendaylight:netconf-node-topology">'$vpp_port'</port> + <username xmlns="urn:opendaylight:netconf-node-topology">admin</username> + <password xmlns="urn:opendaylight:netconf-node-topology">admin</password> + <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> + <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay> + </node> + ' +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 <controllerIP_for_mount> <vpp_instance_name> <vpp_IP> <NETCONF_port> + ie ./ncmount.sh 127.0.0.1 vpp1 192.168.10.12 2830" + exit 1 +fi + +add_vpp $1 $2 $3 $4 |