From nobody Wed Nov 27 20:30:00 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153753696168075.12940707845303; Fri, 21 Sep 2018 06:36:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA8199B45A; Fri, 21 Sep 2018 13:35:58 +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 88874309137F; Fri, 21 Sep 2018 13:35:58 +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 3921F181A8C4; Fri, 21 Sep 2018 13:35:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8LDZYvX022154 for ; Fri, 21 Sep 2018 09:35:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B9B317119; Fri, 21 Sep 2018 13:35:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03B437EE2F for ; Fri, 21 Sep 2018 13:35:30 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC3AA30832C5 for ; Fri, 21 Sep 2018 13:35:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id 73D3632A7C8B for ; Fri, 21 Sep 2018 15:35:28 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zMtzhg4mjeFX; Fri, 21 Sep 2018 15:35:27 +0200 (CEST) Received: from fixa.knut.univention.de (mail.univention.de [82.198.197.8]) by solig.knut.univention.de (Postfix) with ESMTPSA id 812AC32A7BC3; Fri, 21 Sep 2018 15:35:18 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id B105A160F2E; Fri, 21 Sep 2018 15:35:17 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Philipp Hahn To: libvir-list@redhat.com Date: Fri, 21 Sep 2018 15:35:07 +0200 Message-Id: <6854fba9919a643e4ad765f4e899b48464559e67.1537536402.git.hahn@univention.de> In-Reply-To: References: In-Reply-To: References: <1ce5060e-4249-0246-89d0-b7e01f8dd30a@redhat.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 21 Sep 2018 13:35:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 21 Sep 2018 13:35:29 +0000 (UTC) for IP:'82.198.197.8' DOMAIN:'mail.univention.de' HELO:'mail.univention.de' FROM:'hahn@univention.de' RCPT:'' X-RedHat-Spam-Score: -0.011 (RCVD_IN_DNSWL_NONE, SPF_PASS) 82.198.197.8 mail.univention.de 82.198.197.8 mail.univention.de X-Scanned-By: MIMEDefang 2.84 on 10.5.110.44 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH libvirt-python v2 12/22] event-test.py: Convert ERROR events 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: , MIME-Version: 1.0 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.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 21 Sep 2018 13:36:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 004a263..4a801b7 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -495,6 +495,7 @@ DOM_EVENTS =3D Description( BLOCK_JOB_TYPES =3D Description("unknown", "Pull", "Copy", "Commit", "Acti= veCommit") BLOCK_JOB_STATUS =3D Description("Completed", "Failed", "Canceled", "Ready= ") WATCHDOG_ACTIONS =3D Description("none", "Pause", "Reset", "Poweroff", "Sh= utdown", "Debug", "Inject NMI") +ERROR_EVENTS =3D Description("None", "Pause", "Report") =20 def agentLifecycleStateToString(state): agentStates =3D ( "unknown", "connected", "disconnected", ) @@ -524,8 +525,13 @@ def myDomainEventWatchdogCallback(conn, dom, action, o= paque): =20 def myDomainEventIOErrorCallback(conn, dom, srcpath, devalias, action, opa= que): print("myDomainEventIOErrorCallback: Domain %s(%s) %s %s %d" % (dom.na= me(), dom.ID(), srcpath, devalias, action)) + + def myDomainEventIOErrorReasonCallback(conn, dom, srcpath, devalias, actio= n, reason, opaque): - print("myDomainEventIOErrorReasonCallback: Domain %s(%s) %s %s %d %s" = % (dom.name(), dom.ID(), srcpath, devalias, action, reason)) + print("myDomainEventIOErrorReasonCallback: Domain %s(%s) %s %s %d %s" = % ( + dom.name(), dom.ID(), srcpath, devalias, action, ERROR_EVENTS[reas= on])) + + def myDomainEventGraphicsCallback(conn, dom, phase, localAddr, remoteAddr,= authScheme, subject, opaque): print("myDomainEventGraphicsCallback: Domain %s(%s) %d %s" % (dom.name= (), dom.ID(), phase, authScheme)) def myDomainEventControlErrorCallback(conn, dom, opaque): --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list