]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix native OVSDB db_get handling for UUID columns
authorTerry Wilson <twilson@redhat.com>
Wed, 25 Mar 2015 03:16:38 +0000 (22:16 -0500)
committerTerry Wilson <twilson@redhat.com>
Mon, 13 Apr 2015 05:21:37 +0000 (05:21 +0000)
The OVS IDL python library returns Row objects for uuid-containing
columns. Ensure that db_get returns UUID strings in this case.

Closes-Bug: #1438751
Change-Id: Ia842a04fcad86329825d75db57680c7f23bed350

neutron/agent/ovsdb/native/commands.py

index a2ad6ca4de5d16517d2debb580a4de99fe20451d..b8bb1b117e2212aa6a159b63311d74b8b6a9449d 100644 (file)
@@ -193,7 +193,7 @@ class DbGetCommand(BaseCommand):
         # on set types without the list. The IDL is returning them as lists,
         # even if the set has the maximum number of items set to 1. Might be
         # able to inspect the Schema and just do this conversion for that case.
-        result = getattr(record, self.column)
+        result = idlutils.get_column_value(record, self.column)
         if isinstance(result, list) and len(result) == 1:
             self.result = result[0]
         else: