Add migration constraint parameters to libvirt perl bindings

References: fate#316614, bsc#859868

Index: Sys-Virt-1.2.5/Virt.xs
===================================================================
--- Sys-Virt-1.2.5.orig/Virt.xs
+++ Sys-Virt-1.2.5/Virt.xs
@@ -3961,7 +3961,7 @@ _migrate(dom, destcon, newparams, flags=
      virTypedParameter *params;
      int nparams;
     CODE:
-     nparams = 6;
+     nparams = 10;
      Newx(params, nparams, virTypedParameter);
 
      strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,
@@ -3988,6 +3988,21 @@ _migrate(dom, destcon, newparams, flags=
              VIR_TYPED_PARAM_FIELD_LENGTH);
      params[5].type = VIR_TYPED_PARAM_STRING;
 
+     strncpy(params[6].field, VIR_MIGRATE_PARAM_SUSE_MAX_ITERS,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[6].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[7].field, VIR_MIGRATE_PARAM_SUSE_MAX_FACTOR,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[7].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[8].field, VIR_MIGRATE_PARAM_SUSE_MIN_REMAINING,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[8].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[9].field, VIR_MIGRATE_PARAM_SUSE_ABORT_IF_BUSY,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[9].type = VIR_TYPED_PARAM_UINT;
 
      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
@@ -4014,7 +4029,7 @@ _migrate_to_uri(dom, desturi, newparams,
      virTypedParameter *params;
      int nparams;
   PPCODE:
-     nparams = 6;
+     nparams = 10;
      Newx(params, nparams, virTypedParameter);
 
      strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,
@@ -4041,6 +4056,22 @@ _migrate_to_uri(dom, desturi, newparams,
              VIR_TYPED_PARAM_FIELD_LENGTH);
      params[5].type = VIR_TYPED_PARAM_STRING;
 
+     strncpy(params[6].field, VIR_MIGRATE_PARAM_SUSE_MAX_ITERS,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[6].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[7].field, VIR_MIGRATE_PARAM_SUSE_MAX_FACTOR,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[7].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[8].field, VIR_MIGRATE_PARAM_SUSE_MIN_REMAINING,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[8].type = VIR_TYPED_PARAM_UINT;
+
+     strncpy(params[9].field, VIR_MIGRATE_PARAM_SUSE_ABORT_IF_BUSY,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[9].type = VIR_TYPED_PARAM_UINT;
+
      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
      /* No need to support virDomainMigrateToURI/virDomainMigrateToURI2, since
@@ -6872,6 +6903,10 @@ BOOT:
       REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_GRAPHICS_URI, MIGRATE_PARAM_GRAPHICS_URI);
       REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_URI, MIGRATE_PARAM_URI);
       REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_LISTEN_ADDRESS, MIGRATE_PARAM_LISTEN_ADDRESS);
+      REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_SUSE_MAX_ITERS, MIGRATE_PARAM_SUSE_MAX_ITERS);
+      REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_SUSE_MAX_FACTOR, MIGRATE_PARAM_SUSE_MAX_FACTOR);
+      REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_SUSE_MIN_REMAINING, MIGRATE_PARAM_SUSE_MIN_REMAINING);
+      REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_SUSE_ABORT_IF_BUSY, MIGRATE_PARAM_SUSE_ABORT_IF_BUSY);
 
       REGISTER_CONSTANT(VIR_DOMAIN_XML_SECURE, XML_SECURE);
       REGISTER_CONSTANT(VIR_DOMAIN_XML_INACTIVE, XML_INACTIVE);
Index: Sys-Virt-1.2.5/lib/Sys/Virt/Domain.pm
===================================================================
--- Sys-Virt-1.2.5.orig/lib/Sys/Virt/Domain.pm
+++ Sys-Virt-1.2.5/lib/Sys/Virt/Domain.pm
@@ -953,6 +953,22 @@ or ::). This default may be a security r
 untrusted users have the ability to connect to the virtualization
 host, thus use of an explicit restricted listen address is recommended.
 
+=item C<Sys::Virt::Domain::MIGRATE_PARAM_SUSE_MAX_ITERS>
+
+The the maximum number of iterations before final suspend
+
+=item C<Sys::Virt::Domain::MIGRATE_PARAM_SUSE_MAX_FACTOR>
+
+The maximum amount of memory to transfer before final suspend
+
+=item C<Sys::Virt::Domain::MIGRATE_PARAM_SUSE_MIN_REMAINING>
+
+The number of dirty pages before final suspend
+
+=item C<Sys::Virt::Domain::MIGRATE_PARAM_SUSE_ABORT_IF_BUSY>
+
+Abort the migration instead of doing the final suspend for VMs with busy workloads
+
 =back
 
 =item $ddom = $dom->migrate(destcon, flags=0, dname=undef, uri=undef, bandwidth=0)
