Change in vdsm[master]: v2v: Add factory method for ImportVm class

fromani at redhat.com fromani at redhat.com
Thu Jun 11 14:10:00 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: v2v: Add factory method for ImportVm class
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/42065/1/vdsm/v2v.py
File vdsm/v2v.py:

Line 299:         self._aborted = False
Line 300:         self._prepared_volumes = []
Line 301: 
Line 302:     @classmethod
Line 303:     def from_libvirt(self, uri, username, password, vminfo, job_id, irs):
the idea is neat and I like it. The implementation looks wrong.
Should be:

  @classmethod
  def from_libvirt(cls, uri, username, password, vminfo, job_id, irs):
    obj = cls(vminfo, irs)
    obj._uri = uri
    obj._username = username
    obj._password = password
    obj._id = id
    obj._passwd_file = os.path.join(_V2V_DIR, "%s.tmp" % job_id)
    return obj
Line 304:         self._uri = uri
Line 305:         self._username = username
Line 306:         self._password = password
Line 307:         self._id = job_id


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5689bc80d66499e1884344d80df127b513507ab7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list