Change in vdsm[master]: libvirtconnection: add credentials other then defalut
nsoffer at redhat.com
nsoffer at redhat.com
Wed Oct 22 21:25:31 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: libvirtconnection: add credentials other then defalut
......................................................................
Patch Set 6: Code-Review-1
(2 comments)
The added docstring is not clear.
http://gerrit.ovirt.org/#/c/34293/6/lib/vdsm/libvirtconnection.py
File lib/vdsm/libvirtconnection.py:
Line 100: target must have a callable attribute named 'dispatchLibvirtEvents' which
Line 101: will be registered as a callback on libvirt events.
Line 102:
Line 103: When wanting to connect to a different libvirt connection use the username,
Line 104: passwd and uri parameters
Not clear - what is "connect to different libvirt connection" - do you mean "get different libvirt connection"?
Not clear - is this a comment for the user of this function, describing how to use it, or a comment about the implementation, describing what it does?
Line 105:
Line 106: Wrap methods of connection object so that they catch disconnection, and
Line 107: take the current process down.
Line 108: """
Line 150: conn = __connections.get(id(target))
Line 151: if not conn:
Line 152: log.debug('trying to connect libvirt')
Line 153: with open(constants.P_VDSM_LIBVIRT_PASSWD) as passwd_file:
Line 154: passwd = passwd_file.readline().rstrip("\n")
This would be little cleaner if you extract a _read_password function.
Line 155: conn = open_connection('qemu:///system', constants.SASL_USERNAME,
Line 156: passwd)
Line 157: __connections[id(target)] = conn
Line 158:
--
To view, visit http://gerrit.ovirt.org/34293
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3481d56ee19afec14b36b98b412278148b26379e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi 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