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}
vdsm-patches@lists.fedorahosted.org