Change in vdsm[master]: fc-connect-server: Add FcpConnection class

nsoffer at redhat.com nsoffer at redhat.com
Tue Aug 4 01:15:44 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: fc-connect-server: Add FcpConnection class
......................................................................


Patch Set 1:

(5 comments)

https://gerrit.ovirt.org/#/c/44010/1/vdsm/storage/storageServer.py
File vdsm/storage/storageServer.py:

Line 68: NfsConnectionParameters = namedtuple("NfsConnectionParameters",
Line 69:                                      "export, retrans, timeout, version, "
Line 70:                                      "extraOptions")
Line 71: 
Line 72: FcpConnectionParameters = namedtuple("FcpConnectionParameters", "type")
What is type?
Line 73: 
Line 74: ConnectionInfo = namedtuple("ConnectionInfo", "type, params")
Line 75: 
Line 76: 


Line 550:         return hsh
Line 551: 
Line 552: 
Line 553: class FcpConnection(object):
Line 554:     def __init__(self, type):
I think you don't need type, so __init__ is not needed. There is no need to implement __init__ if it does nothing.
Line 555:         pass
Line 556: 
Line 557:     def connect(self):
Line 558:         pass


Line 560:     def disconnect(self):
Line 561:         pass
Line 562: 
Line 563:     def isConnected(self):
Line 564:         pass
Should return always True
Line 565: 
Line 566:     def __eq__(self, other):
Line 567:         return self.__class__ == other.__class
Line 568: 


Line 563:     def isConnected(self):
Line 564:         pass
Line 565: 
Line 566:     def __eq__(self, other):
Line 567:         return self.__class__ == other.__class
Implement also __ne__
Line 568: 
Line 569:     def __hash__(self):
Line 570:         return hash(type(self))
Line 571: 


Line 566:     def __eq__(self, other):
Line 567:         return self.__class__ == other.__class
Line 568: 
Line 569:     def __hash__(self):
Line 570:         return hash(type(self))
Use self.__class__ for consistency with __eq__
Line 571: 
Line 572: 
Line 573: class LocalDirectoryConnection(object):
Line 574:     @property


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a2c937cb997244df7910fc7cfcae11b088d3cdb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list