Change in vdsm[master]: VDSM hook for random network allocation during VM power on

ibarkan at redhat.com ibarkan at redhat.com
Mon Oct 20 12:06:38 UTC 2014


Ido Barkan has posted comments on this change.

Change subject: VDSM hook for random network allocation during VM power on
......................................................................


Patch Set 3: Verified+1

(3 comments)

http://gerrit.ovirt.org/#/c/34114/3/vdsm_hooks/allocate_net/before_device_create.py
File vdsm_hooks/allocate_net/before_device_create.py:

Line 1: #!/usr/bin/python
> /usr/bin/env python
Done
Line 2: #
Line 3: # Copyright 2014 Red Hat, Inc.
Line 4: #
Line 5: # This program is free software; you can redistribute it and/or modify


Line 42: 
Line 43: 
Line 44: def _parse_available_nets():
Line 45:     return [net.strip()
Line 46:             for net in os.environ[AVAIL_NETS_KEY].split(',') if net]
> I would rather have the separator be whitespace instead of ',' since ',' is
well, IMO failing on broken configuration is the job of the lower layers.
agreed on the separator.
Line 47: 
Line 48: 
Line 49: def _get_random_network():
Line 50:     available_nets = _parse_available_nets()


Line 86:         interface.toxml(encoding='UTF-8')
Line 87: 
Line 88:     allocate_random_network(interface)
Line 89:     print "Interface after removing filter: %s" % \
Line 90:         interface.toxml(encoding='UTF-8')
> please, use print() rather than the print statement for forwards compatibil
Done
Line 91: 
Line 92: 
Line 93: def main():
Line 94:     device_xml = hooking.read_domxml()


-- 
To view, visit http://gerrit.ovirt.org/34114
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib14c76994918750e7eef460411acc337599b0186
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list