def _mount_image(self, image_path, directory):
     # mount the image
     from xbe.util import disk
     img = disk.mountImage(
         image_path,                          # path to the image file
         fs_type=disk.FS_EXT3,                # filesystem type
         dir=directory                        # where to mount the image
     )
     log.debug("mounted image to '%s'", img.mount_point())
     return img
 def _mount_image(self, image_path, image_fs_type, directory):
     log.info("mounting image %s:%s to %s" % (image_fs_type, image_path, directory))
     # mount the image
     from xbe.util import disk
     img = disk.mountImage(
         image_path,                          # path to the image file
         fs_type=(image_fs_type or disk.FS_EXT2),                # filesystem type
         dir=directory                        # where to mount the image
     )
     log.debug("mounted image to '%s'", img.mount_point())
     return img
        # mapping from logical name to mount-point
        known_filesystems = jsdl_doc.get_file_systems()

        # now we can handle the stage in definitions
        try:
            stagings = jsdl_doc.lookup_path("JobDefinition/JobDescription/"+
                                        "DataStaging")
        except KeyError, e:
            stagings = None

        # mount the image
        from xbe.util import disk
        img = disk.mountImage(
            os.path.join(self.__spool, "image"),  # path to the image file
            fs_type=disk.FS_EXT3,                 # filesystem type
            dir=self.__spool                      # where to create the tmp mount-point
        )
        log.debug("mounted image to '%s'" % img.mount_point())

        try:
            # staging operations
            if stagings is not None:
                self._prepare_stagings(stagings,
                                       img.mount_point(),
                                       known_filesystems)

            # setup scripts
            script_dir = os.path.join(self.__spool, "scripts")
            if os.path.isdir(script_dir):
                self._call_scripts(