From nobody Thu May 2 06:06:46 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 15037525247537.350262326940083; Sat, 26 Aug 2017 06:02:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E42BD7E426; Sat, 26 Aug 2017 13:02:02 +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 C7BA47BAF3; Sat, 26 Aug 2017 13:02:02 +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 904B51806108; Sat, 26 Aug 2017 13:02:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7QD1qub021204 for ; Sat, 26 Aug 2017 09:01:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id E12F118EC7; Sat, 26 Aug 2017 13:01:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-89.phx2.redhat.com [10.3.116.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id A79FA779D1 for ; Sat, 26 Aug 2017 13:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E42BD7E426 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Sat, 26 Aug 2017 09:01:47 -0400 Message-Id: <20170826130148.14929-2-jferlan@redhat.com> In-Reply-To: <20170826130148.14929-1-jferlan@redhat.com> References: <20170826130148.14929-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-python PATCH 1/2] Introduce virDomainMigrateGetMaxDowntime API 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 26 Aug 2017 13:02:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce wrapper for virDomainMigrateGetMaxDowntime Signed-off-by: John Ferlan --- generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/generator.py b/generator.py index 93d1dc3..59e7531 100755 --- a/generator.py +++ b/generator.py @@ -465,6 +465,7 @@ skip_impl =3D ( 'virDomainGetBlockJobInfo', 'virDomainMigrateGetCompressionCache', 'virDomainMigrateGetMaxSpeed', + 'virDomainMigrateGetMaxDowntime', 'virDomainBlockStatsFlags', 'virDomainSetBlockIoTune', 'virDomainGetBlockIoTune', --=20 2.9.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 06:06:46 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 1503752518173984.6008042539228; Sat, 26 Aug 2017 06:01:58 -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 5C5E05F723; Sat, 26 Aug 2017 13:01:55 +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 14C06709E3; Sat, 26 Aug 2017 13:01:55 +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 006C31806105; Sat, 26 Aug 2017 13:01:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7QD1rgf021210 for ; Sat, 26 Aug 2017 09:01:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F04A6F976; Sat, 26 Aug 2017 13:01:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-89.phx2.redhat.com [10.3.116.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1593A18EC7 for ; Sat, 26 Aug 2017 13:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5C5E05F723 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Sat, 26 Aug 2017 09:01:48 -0400 Message-Id: <20170826130148.14929-3-jferlan@redhat.com> In-Reply-To: <20170826130148.14929-1-jferlan@redhat.com> References: <20170826130148.14929-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-python PATCH 2/2] Implement virDomainMigrateGetMaxDowntime 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.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.39]); Sat, 26 Aug 2017 13:01:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add override code for virDomainMigrateGetMaxDowntime Signed-off-by: John Ferlan --- libvirt-override-api.xml | 7 +++++++ libvirt-override.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index c96e83e..b63a403 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -582,6 +582,13 @@ + + Get the current value of the maximum downtime (in milliseconds) + allowed during a migration of a guest. + + + + Migrate the domain object from its current host to the destina= tion host given by dconn (a connection to the destination host). diff --git a/libvirt-override.c b/libvirt-override.c index 3bc05f1..c04ce2e 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -7663,6 +7663,35 @@ libvirt_virDomainMigrateGetMaxSpeed(PyObject *self A= TTRIBUTE_UNUSED, return libvirt_ulongWrap(bandwidth); } =20 +#if LIBVIR_CHECK_VERSION(3, 7, 0) +static PyObject * +libvirt_virDomainMigrateGetMaxDowntime(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + PyObject *pyobj_domain; + virDomainPtr domain; + unsigned int flags; + unsigned long long downtime; + int rc; + + if (!PyArg_ParseTuple(args, + (char *) "OI:virDomainMigrateGetMaxDowntime", + &pyobj_domain, &flags)) + return NULL; + + domain =3D (virDomainPtr) PyvirDomain_Get(pyobj_domain); + + LIBVIRT_BEGIN_ALLOW_THREADS; + rc =3D virDomainMigrateGetMaxDowntime(domain, &downtime, flags); + LIBVIRT_END_ALLOW_THREADS; + + if (rc < 0) + return VIR_PY_NONE; + + return libvirt_ulonglongWrap(downtime); +} +#endif /* LIBVIR_CHECK_VERSION(3, 7, 0) */ + #if LIBVIR_CHECK_VERSION(1, 1, 0) static PyObject * libvirt_virDomainMigrate3(PyObject *self ATTRIBUTE_UNUSED, @@ -9733,6 +9762,10 @@ static PyMethodDef libvirtMethods[] =3D { {(char *) "virDomainMigrateGetCompressionCache", libvirt_virDomainMigr= ateGetCompressionCache, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */ {(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMa= xSpeed, METH_VARARGS, NULL}, +#if LIBVIR_CHECK_VERSION(3, 7, 0) + {(char *) "virDomainMigrateGetMaxDowntime", libvirt_virDomainMigrateGe= tMaxDowntime, METH_VARARGS, NULL}, +#endif /* LIBVIR_CHECK_VERSION(3, 7, 0) */ + {(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMa= xSpeed, METH_VARARGS, NULL}, #if LIBVIR_CHECK_VERSION(1, 1, 0) {(char *) "virDomainMigrate3", libvirt_virDomainMigrate3, METH_VARARGS= , NULL}, {(char *) "virDomainMigrateToURI3", libvirt_virDomainMigrateToURI3, ME= TH_VARARGS, NULL}, --=20 2.9.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list