Hello Nir Soffer, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/31156
to review the following change.
Change subject: sp: improve variables in _linkStorageDomain
......................................................................
sp: improve variables in _linkStorageDomain
In order to avoid future confusion on _linkStorageDomain variables,
they have been renamed with more meaningful names.
Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1116585
Change-Id: I696529865d270318662233f5c719f30d5b85d112
Signed-off-by: Federico Simoncelli <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/31090
Reviewed-by: Nir Soffer <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/storage/sp.py
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/31156/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 0ce00fc..5d28f15 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1116,25 +1116,25 @@
self.updateMonitoringThreads()
@unsecured
- def _linkStorageDomain(self, src, linkName):
- self.log.info("Linking %s to %s", src, linkName)
+ def _linkStorageDomain(self, linkTarget, linkName):
+ self.log.info("Linking %s to %s", linkTarget, linkName)
try:
- current = os.readlink(linkName)
+ currentLinkTarget = os.readlink(linkName)
except OSError as e:
if e.errno != errno.ENOENT:
- self.log.error("Can't link SD %s to %s", src, linkName,
+ self.log.error("Can't link SD %s to %s", linkTarget, linkName,
exc_info=True)
return
else:
- if current == src:
+ if currentLinkTarget == linkTarget:
self.log.debug('link already present skipping creation '
'for %s', linkName)
return # Nothing to do
# Rebuild the link
tmp_link_name = os.path.join(self.storage_repository,
str(uuid.uuid4()))
- os.symlink(src, tmp_link_name) # make tmp_link
- self.log.debug("Creating symlink from %s to %s", src, linkName)
+ os.symlink(linkTarget, tmp_link_name) # make tmp_link
+ self.log.debug("Creating symlink from %s to %s", linkTarget, linkName)
os.rename(tmp_link_name, linkName)
@unsecured
--
To view, visit http://gerrit.ovirt.org/31156
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I696529865d270318662233f5c719f30d5b85d112
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches