Dan Kenigsberg has posted comments on this change.
Change subject: hooks: macbind - Attach vm nics to specified bridge This hook support binding specified mac address to custom/other bridge than the currently defined bridge in ovirt. This hook is also capable of binding a mac address to openvswitch bridge. ......................................................................
Patch Set 3:
(2 comments)
.................................................... File vdsm_hooks/macbind/README Line 11: than the defined/default bridge for that NIC. Line 12: Line 13: Line 14: Syntax: Line 15: macbind=macaddress-brName-portType,... How about letting the script deduce the bridge type based on its name only? The script could call the equivalent of
ethtool -i brName |grep driver:
to extract that info, and make life easier to the users. Line 16: where: Line 17: Line 18: macaddress: specify a macaddress which need to be attached to the VM Line 19: brName : Bridge Name available in hypervisor
.................................................... File vdsm_hooks/macbind/before_vm_start.py Line 112: createVportElement(domxml, 'openvswitch')) Line 113: Line 114: hooking.write_domxml(domxml) Line 115: except: Line 116: sys.stderr.write('macbind: [unexpected error]: %s\n' % please use hooking.exit_hook(). And please use vdsm_hooks/macspoof/macspoof_vnic.py as a reference on how to write a hook script, as it is more readable, testable and pythonic than most other scripts that we have. Line 117: traceback.format_exc())