Deepak C Shetty has uploaded a new change for review. Change subject: Introduce getLocalPathBase for MountConnection ......................................................................
Introduce getLocalPathBase for MountConnection Introduce getLocalPathBase in MountConnection so that class re-using it can override it to present their own path base. Change-Id: I9985cb00b8ae7dc4a0ac840d3eb3adadf902d61b Signed-off-by: Deepak C Shetty <[email protected]> --- M vdsm/storage/storageServer.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/12126/1 diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py index 80668bf..94b56a9 100644 --- a/vdsm/storage/storageServer.py +++ b/vdsm/storage/storageServer.py @@ -181,6 +181,10 @@ def setLocalPathBase(cls, path): cls.localPathBase = path + @classmethod + def getLocalPathBase(cls): + return cls.localPathBase + def __init__(self, spec, vfsType=None, options=""): self._vfsType = vfsType self._remotePath = spec @@ -188,7 +192,7 @@ self._mount = mount.Mount(spec, self._getLocalPath()) def _getLocalPath(self): - return os.path.join(self.localPathBase, + return os.path.join(self.getLocalPathBase(), self._remotePath.replace("_", "__").replace("/", "_")) -- To view, visit http://gerrit.ovirt.org/12126 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9985cb00b8ae7dc4a0ac840d3eb3adadf902d61b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Deepak C Shetty <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
