qemu.qmp.qom_fuse module¶
QEMU Object Model FUSE filesystem tool
This script offers a simple FUSE filesystem within which the QOM tree may be browsed, queried and edited using traditional shell tooling.
This script requires the ‘fusepy’ python package.
usage: qom-fuse [-h] [–socket SOCKET] <mount>
Mount a QOM tree as a FUSE filesystem
- positional arguments:
<mount> Mount point
- optional arguments:
- -h, --help
show this help message and exit
- --socket SOCKET, -s SOCKET
QMP socket path or address (addr:port). May also be set via QMP_SOCKET environment variable.
- class qemu.qmp.qom_fuse.QOMFuse(args: argparse.Namespace)[source]¶
Bases:
qemu.qmp.qom_common.QOMCommand
,fuse.Operations
QOMFuse implements both fuse.Operations and QOMCommand.
Operations implements the FS, and QOMCommand implements the CLI command.
- classmethod configure_parser(parser: argparse.ArgumentParser) → None[source]¶
Configure a parser with this command’s arguments.
- Parameters
parser – argparse parser or subparser object.
- fuse: fuse.FUSE¶
- getattr(path: str, fh: Optional[IO[bytes]] = None) → Mapping[str, object][source]¶
Returns a dictionary with keys identical to the stat C structure of stat(2).
st_atime, st_mtime and st_ctime should be floats.
NOTE: There is an incompatibility between Linux and Mac OS X concerning st_nlink of directories. Mac OS X counts all files inside the directory, while Linux counts only the subdirectories.
- read(path: str, size: int, offset: int, fh: IO[bytes]) → bytes[source]¶
Returns a string containing the data requested.