Dan Kenigsberg has submitted this change and it was merged.
Change subject: netinfo: fix defaultdict regression ......................................................................
netinfo: fix defaultdict regression
netinfo.get is supposed to retun a map containing the keys: - bondings - bridges - networks - nics - vlans
The change http://gerrit.ovirt.org/#/c/21652/5/lib/vdsm/netinfo.py replaced the dictionary initialization to 'networks': {} (and assignment of the other keys to a dict that could be empty) with a defaultdict.
Unfortunately since not always are there gonna be elements for each of the keys that get() is supposed to return, get() could end up reporting only 'nics', creating all sorts of havoc in caps.py and any get() consumer. (It failed the unit tests on machines without vdsm networks defined).
Change-Id: I5c59eea34f7ad7f28428292f064698d1d04cbdb5 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com Reviewed-on: http://gerrit.ovirt.org/21850 Reviewed-by: Assaf Muller amuller@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/netinfo.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Antoni Segura Puimedon: Verified Assaf Muller: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved