Martin Polednik has uploaded a new change for review.
Change subject: supervdsm: rename appropriateDevice to appropriateMultipathDevice
......................................................................
supervdsm: rename appropriateDevice to appropriateMultipathDevice
The appropriateDevice method inside supervdsm is inappropriately named
as it is only used for multipath devices. This patch specializes the
name so it is possible to write more of these specialized methods
with correct specific names.
Change-Id: I8014dbfa333bc637914080082c6c186ed39594af
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M vdsm/storage/hsm.py
M vdsm/supervdsmServer
2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/45420/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index cfee89f..2ab7b20 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3150,7 +3150,7 @@
Warning: Internal use only.
"""
- supervdsm.getProxy().appropriateDevice(guid, thiefId)
+ supervdsm.getProxy().appropriateMultipathDevice(guid, thiefId)
supervdsm.getProxy().udevTriggerMultipath(guid)
devPath = os.path.join(devicemapper.DMPATH_PREFIX, guid)
utils.retry(partial(fileUtils.validateQemuReadable, devPath),
@@ -3169,7 +3169,7 @@
"""
Warning: Internal use only.
"""
- fails = supervdsm.getProxy().rmAppropriateRules(thiefId)
+ fails = supervdsm.getProxy().rmAppropriateMultipathRules(thiefId)
if fails:
self.log.error("Failed to remove the following rules: %s", fails)
diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
index d431ac2..3d64843 100755
--- a/vdsm/supervdsmServer
+++ b/vdsm/supervdsmServer
@@ -290,7 +290,7 @@
'out %s\nerr %s' % (e.out, e.err))
@logDecorator
- def appropriateDevice(self, guid, thiefId):
+ def appropriateMultipathDevice(self, guid, thiefId):
ruleFile = _UDEV_RULE_FILE_NAME % (guid, thiefId)
# WARNING: we cannot use USER, GROUP and MODE since using any of them
# will change the selinux label to the default, causing vms to pause.
@@ -302,7 +302,7 @@
rf.write(rule)
@logDecorator
- def rmAppropriateRules(self, thiefId):
+ def rmAppropriateMultipathRules(self, thiefId):
re_apprDevRule = "^" + _UDEV_RULE_FILE_PREFIX + ".*?-" +
thiefId + \
_UDEV_RULE_FILE_EXT + "$"
rules = [os.path.join(_UDEV_RULE_FILE_DIR, r) for r in
--
To view, visit
https://gerrit.ovirt.org/45420
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8014dbfa333bc637914080082c6c186ed39594af
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>