Dan Kenigsberg has posted comments on this change.
Change subject: draft: migration plugin proposal - draft 102 ......................................................................
Patch Set 1:
(3 comments)
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.
but now the name vnic_migrate_plugins may better fit.
Also, each plugin should be shipped as part of its relevant hook. Line 32: Line 33: Line 34: _DEBUG_MODE = False Line 35: LOG_FILE = '/tmp/libvirthook_ovs_migrate.log'
https://gerrit.ovirt.org/#/c/64186/1/vdsm/virt/vm_migrate_plugins/__init__.p... File vdsm/virt/vm_migrate_plugins/__init__.py:
Line 18: # Line 19: Line 20: import abc Line 21: from importlib import import_module Line 22: from pkgutil import iter_modules please place new code under lib/vdsm Line 23: Line 24: import six Line 25: Line 26:
https://gerrit.ovirt.org/#/c/64186/1/vdsm/virt/vm_migrate_plugins/external_n... File vdsm/virt/vm_migrate_plugins/external_network_plugin.py:
Line 25: Line 26: EXTERNAL_NETWORK = 'EXTERNAL_NETWORK' Line 27: Line 28: def skip_processing(self, domxml, conf): Line 29: custom = conf.get('custom') custom = conf.get('custom', {})
is much safer Line 30: return custom.get('provider_type') == self.EXTERNAL_NETWORK \ Line 31: if custom else False Line 32: Line 33: