~bgh/neutron/bugfixes

« back to all changes in this revision

Viewing changes to quantum/plugins/openvswitch/agent/set_external_ids.sh

  • Committer: Somik Behera
  • Date: 2011-06-07 06:07:05 UTC
  • mfrom: (11.1.1 quantum)
  • Revision ID: somik@nicira.com-20110607060705-3rydd5g191de2mss
 Merged Brad's ovsplugin code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
VIFLIST=`xe vif-list params=uuid --minimal | sed s/,/" "/g`
 
3
for VIF_UUID in $VIFLIST; do
 
4
DEVICE_NUM=`xe vif-list params=device uuid=$VIF_UUID --minimal`
 
5
  VM_NAME=`xe vif-list params=vm-name-label uuid=$VIF_UUID --minimal`
 
6
  NAME="$VM_NAME-eth$DEVICE_NUM"
 
7
  echo "Vif: $VIF_UUID is '$NAME'"
 
8
  xe vif-param-set uuid=$VIF_UUID other-config:nicira-iface-id="$NAME"
 
9
done
 
10
 
 
11
ps auxw | grep -v grep | grep ovs-xapi-sync > /dev/null 2>&1
 
12
if [ $? -eq 0 ]; then
 
13
        killall -HUP ovs-xapi-sync
 
14
fi
 
15