[node-patches] Change in ovirt-node[master]: Add Mount.umount
rbarry at redhat.com
rbarry at redhat.com
Thu Nov 13 21:54:06 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Add Mount.umount
......................................................................
Add Mount.umount
Now we'll have remount, mount, and umount
Change-Id: I60d470832e92a916d7f23f52627dae1557f73dbc
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/utils/system.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/49/35149/1
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 5955a8b..a98085b 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -894,6 +894,18 @@
except:
self.logger.exception("Can't mount %s on %s" % (self.device,
self.path))
+
+ def umount(self):
+ if not self.device:
+ self.logger.exception("Can't umount without a device specified")
+ raise RuntimeError("No device was specified when Mount() "
+ "was initialized")
+
+ try:
+ utils.process.check_call(["umount", self.device])
+
+ except:
+ self.logger.exception("Can't umount %s")
def _find_device(self):
try:
--
To view, visit http://gerrit.ovirt.org/35149
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I60d470832e92a916d7f23f52627dae1557f73dbc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list