]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ovs_lib unable to parse return when port == -1
authorAaron Rosen <arosen@nicira.com>
Mon, 3 Sep 2012 22:00:48 +0000 (15:00 -0700)
committerAaron Rosen <arosen@nicira.com>
Mon, 3 Sep 2012 22:06:04 +0000 (15:06 -0700)
Fixes bug 1045536

Change-Id: I463dd31d67dff74caae1a0230df5d78c21beaf04

quantum/agent/linux/ovs_lib.py

index e982bac80469f24164633c9d94f10edfa15b75df..f760e66b3dc327d5886833ecd8e0bb9aa3e2bd77 100644 (file)
@@ -55,7 +55,7 @@ class OVSBridge:
         mac = 'attached-mac="(?P<vif_mac>([a-fA-F\d]{2}:){5}([a-fA-F\d]{2}))"'
         iface = 'iface-id="(?P<vif_id>[^"]+)"'
         name = 'name\s*:\s"(?P<port_name>[^"]*)"'
-        port = 'ofport\s*:\s(?P<ofport>\d+)'
+        port = 'ofport\s*:\s(?P<ofport>-?\d+)'
         _re = ('%(external)s:\s{ ( %(mac)s,? | %(iface)s,? | . )* }'
                ' \s+ %(name)s \s+ %(port)s' % locals())
         return re.compile(_re, re.M | re.X)