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 <[email protected]> --- 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 <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
