summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Curran <dominic.curran@citrix.com>2012-02-15 17:17:25 +0000
committerBen Pfaff <blp@nicira.com>2012-02-15 09:56:08 -0800
commit54418a0f1722e5b8a464907895b29c736ded9f0f (patch)
tree20c9427358d28dd26e2763b3123be81437b14c44
parentf97d4429112f20043f8406d65839d540e6e28b33 (diff)
downloadopenvswitch-54418a0f1722e5b8a464907895b29c736ded9f0f.tar.gz
xenserver: Fix iteration of dictionary.
Fix bug in commit 3249bb907a1dab9b0, which incorrectly assumed that get_all_records_where() returned a list. It in fact returns a dictionary and the list iteratory needs to change to account for this. Thanks to Nicira for pointing this out. NIC-454. Reported-by: David Tsai <dtsai@nicira.com> Acked-by: Rob Hoes <rob.hoes@citrix.com> Signed-off-by: Dominic Curran <dominic.curran@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--AUTHORS1
-rwxr-xr-xxenserver/etc_xapi.d_plugins_openvswitch-cfg-update2
2 files changed, 2 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 47c764847..7b2774bf5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@ Chuck Short zulcss@ubuntu.com
Dan Wendlandt dan@nicira.com
Daniel Roman droman@nicira.com
David Erickson derickso@stanford.edu
+Dominic Curran dominic.curran@citrix.com
Ethan Jackson ethan@nicira.com
Gaetano Catalli gaetano.catalli@gmail.com
Glen Gibb grg@stanford.edu
diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
index a9a10e83f..ef4d11a8e 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