Antoni Segura Puimedon 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:
(1 comment)
Some suggestion to get the parsing for free.
.................................................... 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,... For consistency with other networking hooks (like vmfex one) I'd appreciate if the syntax would change to: {'xx:xx:xx:xx:xx:xx': {'bridge': brName, 'portType': port}, ...}
then for reading it, one would do: macbindDefs = ast.literal_eval(os.environ['macbind'])
port types could be probably constants as well. 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