Change in vdsm[master]: v2v: add try/except to get_external_vms

shavivi at redhat.com shavivi at redhat.com
Wed Dec 2 07:34:59 UTC 2015


Shahar Havivi has posted comments on this change.

Change subject: v2v: add try/except to get_external_vms
......................................................................


Patch Set 1:

(1 comment)

> (1 comment)
 > 
 > I'm  totally fine with the concept, not sure how this patch
 > achieves that.
_add_vm is a part of a loop that collect VMs from external provider,
if there is unexpected error in one of the VMs we still able to return the VMs that we can import to the user for review.

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

Line 172:                 for disk in params['disks']:
Line 173:                     _add_disk_info(conn, disk)
Line 174:                 vms.append(params)
Line 175:             except InvalidVMConfiguration as e:
Line 176:                 logging.error('error parsing domain: %s', e)
> which function/method can raise InvalidVMConfiguration?
XMLDec is one,
and we encounter in state (ie status).
We don't know if we will encounter more methods in the future and we don't want to fail the verb for one bad vm
Line 177:         return {'status': doneCode, 'vmList': vms}
Line 178: 
Line 179: 
Line 180: def convert_external_vm(uri, username, password, vminfo, job_id, irs):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iec63dea83ec1805cf08d35be7c078edfd2f70966
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list