From nobody Sun Feb 8 19:39:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571920539; cv=none; d=zoho.com; s=zohoarc; b=KNRWVdNOGCs5MoMlT9t/2Z1VVsQsYVTOmQ07fNXEOGUkIO5OpQriMsW/eQt0Py8fYEQcYQZsaVVUH0e+QcLRVaXpEvsZGIrXFQT3B37PUN37xm3adJXdZkog4U9ewABo37bp8de8Ym2/tDKCjrIGwqXO2hFv0lYvXqfuP5Js/Vw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571920539; 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=bU8WnGDi9GHTIjg49i9PK+WmgV8NVpEn+0MHwSUtMZw=; b=mo10xMfiwxFNX/KepZfgAhy8GlOfsH4/22LXe/gGQXs9OHbL6zI/vh87UKfEVC6W+LywsWHHfYW7osry6zSYSL8ZEeZMf7sX45v/bjoOFXgIKM+cLM4CntRolwEaeIiHY+OratrdPHKoha7J8hfW7P/gizlrwDcnbX0QQNbYUY4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571920539333744.4034778488013; Thu, 24 Oct 2019 05:35:39 -0700 (PDT) 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-248-_X45MBguOgCQ79tup7Vegw-1; Thu, 24 Oct 2019 08:35:36 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B97FC1005530; Thu, 24 Oct 2019 12:35:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 845B6601AF; Thu, 24 Oct 2019 12:35:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 338684EE75; Thu, 24 Oct 2019 12:35:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9OCZ8FD004473 for ; Thu, 24 Oct 2019 08:35:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 415265D9CA; Thu, 24 Oct 2019 12:35:08 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.36.118.123]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD4A5413A; Thu, 24 Oct 2019 12:35:07 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2B2FB1130344; Thu, 24 Oct 2019 14:34:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571920538; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bU8WnGDi9GHTIjg49i9PK+WmgV8NVpEn+0MHwSUtMZw=; b=AazE6Hj9NWssgQFCde+ePtcZXpD8GstOc3bZak+tAaTYlyGthKThOeO0srKC2CjPk/+ePL FpU8sQZtZCKLbY4GdHdko1eY/ERa9xzE8bOIwXZhBN3nDxhvta32EG/gbX8NPhYPLPtilH IsCZ95PqwrtVvSad7o0h2uaVpiPUuSM= From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 24 Oct 2019 14:34:54 +0200 Message-Id: <20191024123458.13505-16-armbru@redhat.com> In-Reply-To: <20191024123458.13505-1-armbru@redhat.com> References: <20191024123458.13505-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 15/19] qapi: Mark deprecated QMP commands with feature 'deprecated' X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: _X45MBguOgCQ79tup7Vegw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add feature 'deprecated' to the deprecated QMP commands, so their deprecation becomes visible in output of query-qmp-schema. Looks like this: {"name": "query-cpus", "ret-type": "[164]", "meta-type": "command", "arg-type": "0", ---> "features": ["deprecated"]} The deprecated commands are change, cpu-add, migrate-set-cache-size, migrate_set_downtime, migrate_set_speed, query-cpus, query-events, query-migrate-cache-size. Management applications can use -compat deprecated-input=3D... to set policy for these commands. So far, the only available policy is "accept", which doesn't change behavior. The next few commits will provide more interesting policies. Command deprecation becomes visible in introspection. Management applications could conceivably use this for static checking. Signed-off-by: Markus Armbruster --- qapi/machine.json | 24 ++++++++++++++---------- qapi/migration.json | 36 ++++++++++++++++++++++++------------ qapi/misc.json | 25 +++++++++++++++---------- 3 files changed, 53 insertions(+), 32 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index ca26779f1a..3913ef2138 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -189,6 +189,11 @@ # It is recommended to use @query-cpus-fast instead of this command to # avoid the vCPU interruption. # +# Features: +# @deprecated: This interface is deprecated (since 2.12.0), and it is +# strongly recommended that you avoid using it. Use +# @query-cpus-fast to obtain information about virtual CPUs. +# # Returns: a list of @CpuInfo for each virtual CPU # # Since: 0.14.0 @@ -218,12 +223,9 @@ # ] # } # -# Notes: This interface is deprecated (since 2.12.0), and it is strongly -# recommended that you avoid using it. Use @query-cpus-fast to -# obtain information about virtual CPUs. -# ## -{ 'command': 'query-cpus', 'returns': ['CpuInfo'] } +{ 'command': 'query-cpus', 'returns': ['CpuInfo'], + 'features': [ 'deprecated' ] } =20 ## # @CpuInfoFast: @@ -309,21 +311,23 @@ # # @id: ID of CPU to be created, valid values [0..max_cpus) # +# Features: +# @deprecated: This command is deprecated. The `device_add` command +# should be used instead. See the `query-hotpluggable-cpus` +# command for details. +# # Returns: Nothing on success # # Since: 1.5 # -# Note: This command is deprecated. The `device_add` command should be -# used instead. See the `query-hotpluggable-cpus` command for -# details. -# # Example: # # -> { "execute": "cpu-add", "arguments": { "id": 2 } } # <- { "return": {} } # ## -{ 'command': 'cpu-add', 'data': {'id': 'int'} } +{ 'command': 'cpu-add', 'data': {'id': 'int'}, + 'features': [ 'deprecated' ] } =20 ## # @MachineInfo: diff --git a/qapi/migration.json b/qapi/migration.json index 82feb5bd39..a110948bfe 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1119,9 +1119,11 @@ # # @value: maximum downtime in seconds # -# Returns: nothing on success +# Features: +# @deprecated: This command is deprecated in favor of +# 'migrate-set-parameters'. # -# Notes: This command is deprecated in favor of 'migrate-set-parameters' +# Returns: nothing on success # # Since: 0.14.0 # @@ -1131,7 +1133,8 @@ # <- { "return": {} } # ## -{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } +{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'}, + 'features': [ 'deprecated' ] } =20 ## # @migrate_set_speed: @@ -1140,9 +1143,11 @@ # # @value: maximum speed in bytes per second. # -# Returns: nothing on success +# Features: +# @deprecated: This command is deprecated in favor of +# 'migrate-set-parameters'. # -# Notes: This command is deprecated in favor of 'migrate-set-parameters' +# Returns: nothing on success # # Since: 0.14.0 # @@ -1152,7 +1157,8 @@ # <- { "return": {} } # ## -{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} } +{ 'command': 'migrate_set_speed', 'data': {'value': 'int'}, + 'features': [ 'deprecated' ] } =20 ## # @migrate-set-cache-size: @@ -1161,13 +1167,15 @@ # # @value: cache size in bytes # +# Features: +# @deprecated: This command is deprecated in favor of +# 'migrate-set-parameters'. +# # The size will be rounded down to the nearest power of 2. # The cache size can be modified before and during ongoing migration # # Returns: nothing on success # -# Notes: This command is deprecated in favor of 'migrate-set-parameters' -# # Since: 1.2 # # Example: @@ -1177,17 +1185,20 @@ # <- { "return": {} } # ## -{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } +{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'}, + 'features': [ 'deprecated' ] } =20 ## # @query-migrate-cache-size: # # Query migration XBZRLE cache size # +# Features: +# @deprecated: This command is deprecated in favor of +# 'query-migrate-parameters'. +# # Returns: XBZRLE cache size in bytes # -# Notes: This command is deprecated in favor of 'query-migrate-parameters' -# # Since: 1.2 # # Example: @@ -1196,7 +1207,8 @@ # <- { "return": 67108864 } # ## -{ 'command': 'query-migrate-cache-size', 'returns': 'int' } +{ 'command': 'query-migrate-cache-size', 'returns': 'int', + 'features': [ 'deprecated' ] } =20 ## # @migrate: diff --git a/qapi/misc.json b/qapi/misc.json index 33b94e3589..abd2e5dc6e 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -316,13 +316,15 @@ # # Return information on QMP events. # +# Features: +# @deprecated: This command is deprecated, because its output doesn't +# reflect compile-time configuration. Use query-qmp-schema +# instead. +# # Returns: A list of @EventInfo. # # Since: 1.2.0 # -# Note: This command is deprecated, because its output doesn't reflect -# compile-time configuration. Use query-qmp-schema instead. -# # Example: # # -> { "execute": "query-events" } @@ -340,7 +342,8 @@ # Note: This example has been shortened as the real response is too long. # ## -{ 'command': 'query-events', 'returns': ['EventInfo'] } +{ 'command': 'query-events', 'returns': ['EventInfo'], + 'features': [ 'deprecated' ] } =20 ## # @IOThreadInfo: @@ -1074,14 +1077,15 @@ # If @device is 'vnc' and @target is 'password', this is the new = VNC # password to set. See change-vnc-password for additional notes. # +# Features: +# @deprecated: This command is deprecated, and it is strongly +# recommended that you avoid using it. For changing block +# devices, use blockdev-change-medium; for changing VNC +# parameters, use change-vnc-password. +# # Returns: Nothing on success. # If @device is not a valid block device, DeviceNotFound # -# Notes: This interface is deprecated, and it is strongly recommended tha= t you -# avoid using it. For changing block devices, use -# blockdev-change-medium; for changing VNC parameters, use -# change-vnc-password. -# # Since: 0.14.0 # # Example: @@ -1102,7 +1106,8 @@ # ## { 'command': 'change', - 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } + 'data': {'device': 'str', 'target': 'str', '*arg': 'str'}, + 'features': [ 'deprecated' ] } =20 ## # @xen-set-global-dirty-log: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list