def unmount_virtuals(self, state): logging.debug("unmounting virtuals: %r", state.virtuals) for mount_point in reversed(state.virtuals): try: vmdb.unmount(mount_point) except vmdb.NotMounted as e: logging.warning(str(e))
def unmount(self, state): mounts = getattr(state, 'grub_mounts', []) mounts.reverse() while mounts: mount_point = mounts.pop() try: vmdb.unmount(mount_point) except vmdb.NotMounted as e: logging.warning(str(e))
def unmount_rootfs(self, step, settings, state): tag = step['mount'] mount_point = state.tags.get_mount_point(tag) if mount_point is None: return try: vmdb.unmount(mount_point) except vmdb.NotMounted as e: logging.warning(str(e)) if not step.get('mount-on'): os.rmdir(mount_point)
def unmount_rootfs(self, values, settings, state): tag = values["mount"] mount_point = state.tags.get_builder_mount_point(tag) if mount_point is None: return try: vmdb.unmount(mount_point) except vmdb.NotMounted as e: logging.warning(str(e)) if not values["mount-on"]: os.rmdir(mount_point)
def unmount(self, what): vmdb.unmount( what, mounts=str(self.mounts), real_unmount=self.mounts.unmount)