undefined reference fixed while handling delete request for VM tunnel

parent d4aec6d7
......@@ -53,26 +53,26 @@ def computeOFlowInstall(dic, start_response):
print macadd
ovscmdlist = []
if cmd == "add":
TAPMAC=macadd[3:]
TAPNAME=''
cmd = "ifconfig -a | grep %s | cut -d\' \' -f1" % TAPMAC
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
TAPNAME=out.rstrip()
print "TAPNAME: %s" % TAPNAME
OVSPORTNAME='qvo%s' % TAPNAME[3:]
VMINPUTCHAINFALLBACK="neutron-openvswi-sg-fallback"
VMCHAININPUT="neutron-openvswi-i%s" %TAPNAME[3:-1]
cmd = "sudo ovs-ofctl show br-int | grep %s | cut -d\'(\' -f 1" % OVSPORTNAME
#print cmd
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
print out, err
OVSPORTNUMBER=out.rstrip().replace(' ','')
print "OVSBRIDGE: %s @ %s" % (OVSPORTNAME, OVSPORTNUMBER)
TAPMAC=macadd[3:]
TAPNAME=''
cmd = "ifconfig -a | grep %s | cut -d\' \' -f1" % TAPMAC
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
TAPNAME=out.rstrip()
print "TAPNAME: %s" % TAPNAME
OVSPORTNAME='qvo%s' % TAPNAME[3:]
VMINPUTCHAINFALLBACK="neutron-openvswi-sg-fallback"
VMCHAININPUT="neutron-openvswi-i%s" %TAPNAME[3:-1]
cmd = "sudo ovs-ofctl show br-int | grep %s | cut -d\'(\' -f 1" % OVSPORTNAME
#print cmd
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
print out, err
OVSPORTNUMBER=out.rstrip().replace(' ','')
print "OVSBRIDGE: %s @ %s" % (OVSPORTNAME, OVSPORTNUMBER)
if cmd == "add":
computetunflow = 'sudo ovs-ofctl add-flow br-tun priority=3,tun_id=%d,actions=mod_vlan_vid:%d,output:%d' \
% (int(tunid), int(vlanid), COMPUTE_OVS_PATCH_PORT)
print computetunflow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment