Marcin Mirecki has posted comments on this change.

Change subject: virt: Migration plugins to enable skipping of special OVS 
processing for nics
......................................................................


Patch Set 2:

(8 comments)

This was just a quick and dirty draft to show the concept :(
This version should be better.

https://gerrit.ovirt.org/#/c/64186/1/vdsm/virt/vm_migrate_hook.py
File vdsm/virt/vm_migrate_hook.py:

Line 27: from vdsm import jsonrpcvdscli
Line 28: from vdsm.config import config
Line 29: from vdsm.network import api as net_api
Line 30: 
Line 31: import vm_migrate_plugins
> I like this simplistic approach.
Done
Line 32: 
Line 33: 
Line 34: _DEBUG_MODE = False
Line 35: LOG_FILE = '/tmp/libvirthook_ovs_migrate.log'


PS1, Line 87: target_vm_conf_by_vni
> Can you add the 'vnic' part? ..by_vnic_mac
Done


PS1, Line 100: target_vm_ifac
> How about: 'target_vm_iface_conf' ?
Done


Line 98:     vnic_mac_addr = elem_macaddr.get('address')
Line 99: 
Line 100:     target_vm_iface_conf = target_vm_conf_by_vnic_mac[vnic_mac_addr]
Line 101:     target_vm_net = target_vm_iface_conf['network']
Line 102: 
> It's a bit nicer to go with the positive one and just bail out earlier with
Done
Line 103:     if vm_migrate_plugins.skip_processing(interface, 
target_vm_iface_conf):
Line 104:         return
Line 105: 
Line 106:     target_ovs_bridge = net_api.ovs_bridge(target_vm_net)


https://gerrit.ovirt.org/#/c/64186/1/vdsm/virt/vm_migrate_plugins/__init__.py
File vdsm/virt/vm_migrate_plugins/__init__.py:

Line 18
Line 19
Line 20
Line 21
Line 22
> please place new code under lib/vdsm
Done


PS1, Line 27: 
> _PLUGINS
Done


Line 26
Line 27
Line 28
Line 29
Line 30
> domxml_iface or something similar.
Done


Line 31
Line 32
Line 33
Line 34
Line 35
> You will need a decorator:
I'm dropping the class completely and invoking 'skip_processing' on the plugin 
itself.


-- 
To view, visit https://gerrit.ovirt.org/64186
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0fb056c4b4732505d567385546e78048c37d140
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmire...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Edward Haas <edwa...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmire...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to