Change in vdsm[master]: virt: devices: move device creation in a submodule
fromani at redhat.com
fromani at redhat.com
Thu Feb 26 12:49:25 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: virt: devices: move device creation in a submodule
......................................................................
Patch Set 1:
(3 comments)
thanks for the comments!
https://gerrit.ovirt.org/#/c/38077/1/vdsm/virt/vmdevices/hwtree.py
File vdsm/virt/vmdevices/hwtree.py:
Line 1: #
Line 2: # Copyright 2014 Red Hat, Inc.
> Something I need to ask for my own patches: don't we want 2015 here?
Yes, the problem is just I keep forgetting to follow my own advice. Will fix.
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
Line 40: (hwclass.RNG, core.Rng),
Line 41: (hwclass.SMARTCARD, core.Smartcard),
Line 42: (hwclass.TPM, core.Tpm))
Line 43:
Line 44:
> I'm not sure about the name here, wouldn't something like init be nicer? hw
init is nicer and will change to use it. Thanks!
Line 45: def empty():
Line 46: return dict((dev, []) for dev, _ in _DEVICE_MAPPING)
Line 47:
Line 48:
Line 48:
Line 49: def build(dev_conf, vm_conf, log):
Line 50: devices = empty()
Line 51:
Line 52: for devType, devClass in _DEVICE_MAPPING:
> Since this is new module, I'd go with dev_type and dev_class (possibly futu
right, and no need to wait. Will fix (here and possibly everything else)
Line 53: for dev in dev_conf[devType]:
Line 54: devices[devType].append(devClass(vm_conf, log, **dev))
Line 55:
--
To view, visit https://gerrit.ovirt.org/38077
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If17cce15f653843848eea42b567a0e4454757cd1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima 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