Change in vdsm[master]: v2v: adding os support version for v2v

shavivi at redhat.com shavivi at redhat.com
Thu Dec 25 08:57:08 UTC 2014


Shahar Havivi has posted comments on this change.

Change subject: v2v: adding os support version for v2v
......................................................................


Patch Set 2:

(5 comments)

http://gerrit.ovirt.org/#/c/36388/2/vdsm/v2v.py
File vdsm/v2v.py:

Line 29:     ''' Unexpected error while parsing libvirt domain xml '''
Line 30:     pass
Line 31: 
Line 32: 
Line 33: class NotSupported(ValueError):
> This is not value error. This should inherit from Exception.
Done
Line 34:     ''' v2v is not supported current os version '''
Line 35:     pass
Line 36: 
Line 37: 


Line 31: 
Line 32: 
Line 33: class NotSupported(ValueError):
Line 34:     ''' v2v is not supported current os version '''
Line 35:     pass
> You don't need this pass, the docstring makes this valid class as is.
Done
Line 36: 
Line 37: 
Line 38: def supported():
Line 39:     if not (caps.getos() in (caps.OSName.RHEVH, caps.OSName.RHEL)


Line 34:     ''' v2v is not supported current os version '''
Line 35:     pass
Line 36: 
Line 37: 
Line 38: def supported():
> Is this documented in the schema? If not please add a note there.
Done
Line 39:     if not (caps.getos() in (caps.OSName.RHEVH, caps.OSName.RHEL)
Line 40:             and caps.osversion()['version'].startswith('6')):
Line 41:         return False
Line 42:     return True


Line 36: 
Line 37: 
Line 38: def supported():
Line 39:     if not (caps.getos() in (caps.OSName.RHEVH, caps.OSName.RHEL)
Line 40:             and caps.osversion()['version'].startswith('6')):
> Better use:
Done
Line 41:         return False
Line 42:     return True
Line 43: 
Line 44: 


Line 43: 
Line 44: 
Line 45: def get_external_vms(uri, username, password):
Line 46:     if not supported():
Line 47:         raise NotSupported('')
> Empty line after raising make the flow clear.
Done
Line 48:     conn = libvirtconnection.open_connection(uri=uri,
Line 49:                                              username=username,
Line 50:                                              passwd=password)
Line 51:     with closing(conn):


-- 
To view, visit http://gerrit.ovirt.org/36388
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a343a9634a90502feff46caed2c05b6af93ad5
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken 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