Add WUKS to karaf console ssh connections
[integration/test.git] / csit / scripts / set_sg_mode.sh
1 #!/bin/bash
2
3
4 cat > ${WORKSPACE}/set_sg_mode.sh <<EOF
5
6     mkdir -p /tmp/${BUNDLEFOLDER}/etc/opendaylight/datastore/initial/config/
7     export CONFFILE=\`find /tmp/${BUNDLEFOLDER} -name "*aclservice*config.xml"\`
8     cp \$CONFFILE /tmp/${BUNDLEFOLDER}/etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml
9     sed -i s/stateful/${SECURITY_GROUP_MODE}/ /tmp/${BUNDLEFOLDER}/etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml
10     cat /tmp/${BUNDLEFOLDER}/etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml
11
12 EOF
13
14 echo "Copying config files to ODL Controller folder"
15 for i in `seq 1 ${NUM_ODL_SYSTEM}`
16 do
17         CONTROLLERIP=ODL_SYSTEM_${i}_IP
18
19         echo "Setting security group mode to ${SECURITY_GROUP_MODE} on ${!CONTROLLERIP}"
20         scp ${WORKSPACE}/set_sg_mode.sh ${!CONTROLLERIP}:/tmp/
21         ssh ${!CONTROLLERIP} 'bash /tmp/set_sg_mode.sh'
22
23 done