From nobody Thu May 9 00:27:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1561098979; cv=none; d=zoho.com; s=zohoarc; b=lFVS5GEZ9qPTLhgamWZo5pJ0aaX7fUMrYJJZzpiktXh5aLbPo4A6BGZx932lZXKzilKWmd7OJ/y5b0oPzeT8vppvC/VtMYI3u+BdPGnJeGlR0h/Rz3IwPbXeKDatbE6WORhR34C4kWPjHk/1TcI+zKHdxCW0x6s+1VLJsNoG3TE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561098979; 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:ARC-Authentication-Results; bh=1YuXF7A7NLQbbkTjviCAKwAHWPTp7LO4Q7mGXF0JavM=; b=GvqW7Qdi0U/5QT3BCZO4zcorOafj3OCICplP9Aa/TfHHcexUXGnGadGtEnd1qnp7V8uzFhazhATtyCam+8K7kHB9eygFEFjp8HsqiCRsG0nqy+HoA87ePlumKHCdDO185SxotGg6A3C/G17KJV9rgBPYIBIqGtUU1CJBhxDmHJ8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1561098979064841.1909919506801; Thu, 20 Jun 2019 23:36:19 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id D971F5D688; Fri, 21 Jun 2019 06:36:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CC0660156; Fri, 21 Jun 2019 06:36:09 +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 398931806B19; Fri, 21 Jun 2019 06:36:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5L6Y0w0000367 for ; Fri, 21 Jun 2019 02:34:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 63DF410190A8; Fri, 21 Jun 2019 06:34:00 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBFC610190A7; Fri, 21 Jun 2019 06:33:59 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 21 Jun 2019 08:33:52 +0200 Message-Id: <6699b7cc59565b5671f3e870d12a15f918c69c65.1561098810.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/3] error: Add VIR_ERR_DEPRECATED error code 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: , Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 21 Jun 2019 06:36:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Allow a simple programatic check that a given feature is no longer supported by introducing a separate error code for this scenario. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- include/libvirt/virterror.h | 1 + src/util/virerror.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 102a2573bf..22bc3c2d27 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -329,6 +329,7 @@ typedef enum { VIR_ERR_INVALID_NETWORK_PORT =3D 105, /* invalid network port object */ VIR_ERR_NETWORK_PORT_EXIST =3D 106, /* the network port already exis= t */ VIR_ERR_NO_NETWORK_PORT =3D 107, /* network port not found */ + VIR_ERR_DEPRECATED =3D 108, /* configuration or operation is= no longer supported */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_NUMBER_LAST diff --git a/src/util/virerror.c b/src/util/virerror.c index dfba8c5712..26f14ddd29 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1235,6 +1235,10 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NU= MBER_LAST] =3D { [VIR_ERR_NO_NETWORK_PORT] =3D { N_("network port not found"), N_("network port not found: %s") }, + [VIR_ERR_DEPRECATED] =3D { + N_("operation or configuration no longer supported"), + "%s", + }, }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 9 00:27:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1561098981; cv=none; d=zoho.com; s=zohoarc; b=do3xymLEX6TBcnkHZcHRj0SLZYRGJAYDY2Mj6HDs3gKJUH1gRzh3RXBnMOJg2OtAMOpAIPuwblwWgpWStZWYBTfeA6R7XCXRMBgiV2pq5gzSu/2+4LqwSeWsmIRqR84NmmcRc7xN7+4Lh2t47NlTWTZOk2zmptkhU8GIEiA04hU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561098981; 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:ARC-Authentication-Results; bh=JdWU8Eg8I0+cv8GKIFsrlP8XQohUFlNbghS2OOux0Po=; b=JJaDutDabOxj03OlCNCkkvzs66GctVs/7oWnGl4PU0Q7hNtNs/U79TQuxkIgf10GvF9LWnqkv+hKk6HHLQSY8rPvcUixwRuvBf6ubZKn/ExGjxEbSvmdBvGPzpofTf2/zova8naRxvEZCg5dNpMl8abx5/WOkysRdyZq4mgYFNA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1561098981043977.2295294574876; Thu, 20 Jun 2019 23:36:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1AD8D3091754; Fri, 21 Jun 2019 06:36:19 +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 DDD1919732; Fri, 21 Jun 2019 06:36:18 +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 86B6DC57E; Fri, 21 Jun 2019 06:36:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5L6Y1tO000374 for ; Fri, 21 Jun 2019 02:34:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5ACBF10190A8; Fri, 21 Jun 2019 06:34:01 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2BC210190A7; Fri, 21 Jun 2019 06:34:00 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 21 Jun 2019 08:33:53 +0200 Message-Id: <3d985e9396eecb6047567d092867cd577089eb23.1561098810.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/3] qemu: Use VIR_ERR_DEPRECATED in QemuAttach and DomainXMLFromNative stubs 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 21 Jun 2019 06:36:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We've deprecated qemuConnectDomainXMLFromNative qemuDomainQemuAttach. Switch the error code from VIR_ERR_OPERATION_UNSUPPORTED to the new VIR_ERR_DEPRECATED. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ec08dd939e..d6ab134196 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7327,7 +7327,7 @@ qemuConnectDomainXMLFromNative(virConnectPtr conn, if (virConnectDomainXMLFromNativeEnsureACL(conn) < 0) return NULL; - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + virReportError(VIR_ERR_DEPRECATED, "%s", _("converting arbitrary QEMU command lines to libvirt d= omain XML is no longer supported")); return NULL; } @@ -16779,7 +16779,7 @@ qemuDomainQemuAttach(virConnectPtr conn ATTRIBUTE_U= NUSED, { virCheckFlags(0, NULL); - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + virReportError(VIR_ERR_DEPRECATED, "%s", _("attaching to a QEMU process started outside of libvi= rt is no longer supported")); return NULL; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 9 00:27:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1561098875; cv=none; d=zoho.com; s=zohoarc; b=nPMMY7lbOACxBtfj5bBSDFG304xLKJda9X+bXkmrdE/8TBp1CNDOZVQ1DNqXlhTPaPhdXuzvzEvJ64mCi5f/xVmSgV5OJltAIq0L+ftD98t+uzQKcaeM53I9OkVa5nuE1tN226WLkl7xN0yHxchAP8moF+7Kik4MOZ+Ea1b1Fek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561098875; 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:ARC-Authentication-Results; bh=T2/Y2XFD+obZ2VwqPbJWQlNKIzzQyeTrobAHmkgW+0c=; b=IZf9Hyjf543wTQOCyltp5UPBD7TUiDbPA+L7ZYZWFCcrDj0JjGj/KfnnNfi2biTjI+Fc3OQOdnFMSsvvjiHguX+stSPey3L5SubIk3TkyJW/PzLMkLGbYq7Ar7z9FNKofkgawoZprAasXNl88rKXaV+iiOeDpAH56CLFBcM2xdA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1561098875184339.4531323776838; Thu, 20 Jun 2019 23:34:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20061C057F2B; Fri, 21 Jun 2019 06:34:28 +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 7F79C60BE0; Fri, 21 Jun 2019 06:34:21 +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 13A5DC57E; Fri, 21 Jun 2019 06:34:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5L6Y2HS000382 for ; Fri, 21 Jun 2019 02:34:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4D58710190A9; Fri, 21 Jun 2019 06:34:02 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id A68A510190A7; Fri, 21 Jun 2019 06:34:01 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 21 Jun 2019 08:33:54 +0200 Message-Id: <93a3e4d8d8004f4b728b3a1b7598e64d9ac4d3fa.1561098810.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/3] news: Mention VIR_ERR_DEPRECATED in improvements 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 21 Jun 2019 06:34:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- docs/news.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 681e9a60a3..68f8c704b4 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -64,6 +64,16 @@
+ + + Add error code for deprecated operations + + + The new error code VIR_ERR_DEPRECATED allows for more reliable c= hecks + of scenarios where libvirt deprecated a certain operation or + configuration. + +
--=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list