From nobody Tue Feb 10 03:37:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622681276; cv=none; d=zohomail.com; s=zohoarc; b=hVapY725a6isDq4ehj2OjdRzAGUbDYEGBzA5kyI+nhyRQlRww62JQJnc8B0FPdmIqYgYK97cwaG/L15o9ObAThMIyaHSkwvn4qk/m/fkczqO9FOwCAkQsXbztL1Cl5nZUVRl/5px3vsKyM7P3BcVVolZMe+/xoEBKuyCsDGhZos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622681276; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rXF4ZXaMMbLySO5l6Dq9d86icbMOjB0pb0H/AUQB23I=; b=iqxWmLz7nmM3Dzd2ynRDRmqnRS3e4piCl/WsIpE/EmIJwPLeTiHuLsWmF3DLneRnbOxK9c+tJounR12IOKgq3N422AHL2fyMexmLI0FujM0fvkcTdRkIhqiCpdAUT9hMGhJc5ENxKIwVo7tydGYTxfgME+jPV+cFvDx1G7OFKzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162268127618052.47827355178458; Wed, 2 Jun 2021 17:47:56 -0700 (PDT) Received: from localhost ([::1]:56676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lobWd-0003Qd-3M for importer@patchew.org; Wed, 02 Jun 2021 20:47:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lobMr-0005PD-W9 for qemu-devel@nongnu.org; Wed, 02 Jun 2021 20:37:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lobMq-0004rQ-2v for qemu-devel@nongnu.org; Wed, 02 Jun 2021 20:37:49 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-dX0QTr6MN9qw7cFcDbJsRw-1; Wed, 02 Jun 2021 20:37:44 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 141388018A7; Thu, 3 Jun 2021 00:37:43 +0000 (UTC) Received: from scv.redhat.com (ovpn-116-137.rdu2.redhat.com [10.10.116.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15B4010013D6; Thu, 3 Jun 2021 00:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622680667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rXF4ZXaMMbLySO5l6Dq9d86icbMOjB0pb0H/AUQB23I=; b=efGIL7RKxSr176mV7MENpLOx4ZF4PRrDnN0MTFhS+1pzFu6wHrtOX+hEzLs6WBtrpHUI2L FSta8XIfPdiAZy/MTcCKUb3bXfc/lUd01jKmpTt6zLOK+tj52kudn3kd+amgSCzltLrrAO 2dTaYHUg/nbxowoRYDZEwFajHS2PSvg= X-MC-Unique: dX0QTr6MN9qw7cFcDbJsRw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 19/19] python/qmp: add fuse command to 'qom' tools Date: Wed, 2 Jun 2021 20:37:19 -0400 Message-Id: <20210603003719.1321369-20-jsnow@redhat.com> In-Reply-To: <20210603003719.1321369-1-jsnow@redhat.com> References: <20210603003719.1321369-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , John Snow , "Niteesh G . S ." , Eduardo Habkost , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The 'fuse' command will be unavailable if 'fusepy' is not installed. It will simply not load and subsequently be unavailable as a subcommand. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- python/qemu/qmp/qom.py | 14 ++++++++++++-- python/setup.cfg | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/python/qemu/qmp/qom.py b/python/qemu/qmp/qom.py index 7fe1448b5d9..7ec7843d57a 100644 --- a/python/qemu/qmp/qom.py +++ b/python/qemu/qmp/qom.py @@ -1,7 +1,7 @@ """ QEMU Object Model testing tools. =20 -usage: qom [-h] {set,get,list,tree} ... +usage: qom [-h] {set,get,list,tree,fuse} ... =20 Query and manipulate QOM data =20 @@ -9,11 +9,12 @@ -h, --help show this help message and exit =20 QOM commands: - {set,get,list,tree} + {set,get,list,tree,fuse} set Set a QOM property value get Get a QOM property value list List QOM properties at a given path tree Show QOM tree from a given path + fuse Mount a QOM tree as a FUSE filesystem """ ## # Copyright John Snow 2020, for Red Hat, Inc. @@ -35,6 +36,15 @@ from .qom_common import QOMCommand =20 =20 +try: + from .qom_fuse import QOMFuse +except ModuleNotFoundError as err: + if err.name !=3D 'fuse': + raise +else: + assert issubclass(QOMFuse, QOMCommand) + + class QOMSet(QOMCommand): """ QOM Command - Set a property to a given value. diff --git a/python/setup.cfg b/python/setup.cfg index aca6f311853..6b6be8b03c6 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -49,6 +49,7 @@ console_scripts =3D qom-get =3D qemu.qmp.qom:QOMGet.entry_point qom-list =3D qemu.qmp.qom:QOMList.entry_point qom-tree =3D qemu.qmp.qom:QOMTree.entry_point + qom-fuse =3D qemu.qmp.qom_fuse:QOMFuse.entry_point [fuse] =20 [flake8] extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's --=20 2.31.1