Nir Soffer has posted comments on this change.

Change subject: ceph: Initial support for network disk
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/38766/4/vdsm/virt/vmdevices/storage.py
File vdsm/virt/vmdevices/storage.py:

Line 170:         return self.blockDev and self.format == "cow"
Line 171: 
Line 172:     @property
Line 173:     def networkDev(self):
Line 174:         return getattr(self, 'diskType', None) == 'network'
> for a future patch: we may want to use constants here as well.
Constants were added here: https://gerrit.ovirt.org/40062
Line 175: 
Line 176:     @property
Line 177:     def blockDev(self):
Line 178:         if self._blockDev is None:


Line 307:             source.setAttrs(dev=self.path)
Line 308:         elif self.networkDev:
Line 309:             deviceType = 'network'
Line 310:             source.setAttrs(protocol=self.protocol, name=self.path)
Line 311:             for host in self.hosts:
> Please handle the case where hosts is not passed (None i suppose).
This will explode with AttributeError.

I will send another patch on top validating input.
Line 312:                 source.appendChildWithArgs('host', **host)
Line 313:         else:
Line 314:             deviceType = 'file'
Line 315:             sourceAttrs = {'file': self.path}


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c5792bb6206a227ee0c2df9490b771a69c0093c
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeya...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to