Re: [libvirt-perl PATCH] Add migrate_get_max_downtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/26/2017 08:47 AM, John Ferlan wrote:
> Add new API for 3.7 pushed code for virDomainMigrateGetMaxDowntime
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  Changes                |  1 +
>  Virt.xs                | 15 +++++++++++++++
>  lib/Sys/Virt/Domain.pm |  6 ++++++
>  3 files changed, 22 insertions(+)
> 

I pushed this under the rule of well the CI build is broken and since DV
is making a release in his morning - 'tis better to push and have to fix
some minor issue in something than have the build failure be a blocking
point.

John

> 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
>  
>   - Add VIR_FROM_RESCTRL constant
> + - Add migrate_get_max_downtime
>  
>  3.5.0 2017-07-06
>  
> 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=0)
>           _croak_error();
>  
>  
> +SV *
> +migrate_get_max_downtime(dom, flags=0)
> +      virDomainPtr dom;
> +      unsigned int flags;
> +  PREINIT:
> +      unsigned long long downtime;
> +    CODE:
> +      if (virDomainMigrateGetMaxDowntime(dom, &downtime, flags) < 0)
> +          _croak_error();
> +
> +      RETVAL = virt_newSVull(downtime);
> +  OUTPUT:
> +      RETVAL
> +
> +
>  void
>  migrate_set_max_speed(dom, bandwidth, flags=0)
>       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<downtime> parameter is measured in milliseconds.
>  The C<$flags> parameter is currently unused and defaults to zero.
>  
> +=item $downtime = $dom->migrate_get_max_downtime($flags=0)
> +Get the current value of the maximum downtime allowed during a
> +migration of a guest. The returned <downtime> value is measured
> +in milliseconds. The C<$flags> parameter is currently unused and
> +defaults to zero.
> +
>  =item $dom->migrate_set_max_speed($bandwidth, $flags=0)
>  
>  Set the maximum allowed bandwidth during migration of the guest.
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux