Fix bug in commit 3249bb907a1dab9b0

Incorrectly assume that get_all_records_where() returned a list.
It infact returns a disctionary and the list iteratory needs to change
to account for this.
Thanks to Nicira for pointing this out.

NIC-454.

Reported-by: David Tsai <dt...@nciira.com>
From: Rob Hoes <rob.h...@citrix.com>
Acked-by: Dominic Curran <dominic.cur...@citrix.com>
---
 .../etc_xapi.d_plugins_openvswitch-cfg-update      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update 
b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
index a9a10e8..ef4d11a 100755
--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
@@ -100,7 +100,7 @@ def update(session, args):
     pool_mgmt_macs = {}
     if new_controller:
         recs = session.xenapi.PIF.get_all_records_where('field 
"management"="true"')
-        for rec in recs:
+        for rec in recs.itervalues():
             pool_mgmt_macs[rec.get('MAC')] = rec.get('device')
 
     dib_changed = False
-- 
1.7.5.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to