From nobody Sat Apr 27 18:42:08 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 150375165628351.43030612700352; Sat, 26 Aug 2017 05:47:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93FF3C04B94A; Sat, 26 Aug 2017 12:47:33 +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 B56C851891; Sat, 26 Aug 2017 12:47:31 +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 802E54E980; Sat, 26 Aug 2017 12:47:27 +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 v7QClOVq018548 for ; Sat, 26 Aug 2017 08:47:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6925C7B9E4; Sat, 26 Aug 2017 12:47:24 +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 23C1A1866B for ; Sat, 26 Aug 2017 12:47:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 93FF3C04B94A Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 08:47:20 -0400 Message-Id: <20170826124720.14412-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-perl PATCH] Add migrate_get_max_downtime 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 26 Aug 2017 12:47:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add new API for 3.7 pushed code for virDomainMigrateGetMaxDowntime Signed-off-by: John Ferlan --- Changes | 1 + Virt.xs | 15 +++++++++++++++ lib/Sys/Virt/Domain.pm | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/Changes b/Changes index e7f6cde..a3e507f 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for perl module Sys::Virt 3.7.0 2017-00-00 =20 - Add VIR_FROM_RESCTRL constant + - Add migrate_get_max_downtime =20 3.5.0 2017-07-06 =20 diff --git a/Virt.xs b/Virt.xs index d3019ee..11c3d8f 100644 --- a/Virt.xs +++ b/Virt.xs @@ -5325,6 +5325,21 @@ migrate_set_max_downtime(dom, downtime, flags=3D0) _croak_error(); =20 =20 +SV * +migrate_get_max_downtime(dom, flags=3D0) + virDomainPtr dom; + unsigned int flags; + PREINIT: + unsigned long long downtime; + CODE: + if (virDomainMigrateGetMaxDowntime(dom, &downtime, flags) < 0) + _croak_error(); + + RETVAL =3D virt_newSVull(downtime); + OUTPUT: + RETVAL + + void migrate_set_max_speed(dom, bandwidth, flags=3D0) virDomainPtr dom; diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm index 20ecf9f..030e1e3 100644 --- a/lib/Sys/Virt/Domain.pm +++ b/lib/Sys/Virt/Domain.pm @@ -1254,6 +1254,12 @@ at the cost of longer time blackout for the guest OS= at the switch over point. The C parameter is measured in milliseconds. The C<$flags> parameter is currently unused and defaults to zero. =20 +=3Ditem $downtime =3D $dom->migrate_get_max_downtime($flags=3D0) +Get the current value of the maximum downtime allowed during a +migration of a guest. The returned value is measured +in milliseconds. The C<$flags> parameter is currently unused and +defaults to zero. + =3Ditem $dom->migrate_set_max_speed($bandwidth, $flags=3D0) =20 Set the maximum allowed bandwidth during migration of the guest. --=20 2.9.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list