ovs_lib unable to parse return when port == -1

Fixes bug 1045536

Change-Id: I463dd31d67dff74caae1a0230df5d78c21beaf04
This commit is contained in:
Aaron Rosen 2012-09-03 15:00:48 -07:00
parent 50dbbb779c
commit 6171b95700

View 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)