[libvirt-perl][PATCH] Add VIR_MIGRATE_PARAM_DISKS_PORT constant

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

 



Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 Changes                |  1 +
 Virt.xs                | 13 +++++++++++--
 lib/Sys/Virt/Domain.pm |  6 ++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Changes b/Changes
index 8f2cba6..9ca0a76 100644
--- a/Changes
+++ b/Changes
@@ -9,6 +9,7 @@ Revision history for perl module Sys::Virt
  - Add VIR_DOMAIN_EVENT_ID_JOB_COMPLETED constant and callback
  - Add VIR_ERR_NO_SERVER constant
  - Add VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT constant
+ - Add VIR_MIGRATE_PARAM_DISKS_PORT constant
 
 1.3.2 2016-03-01
 
diff --git a/Virt.xs b/Virt.xs
index 2148eaf..358a396 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -4479,7 +4479,7 @@ _migrate(dom, destcon, newparams, flags=0)
      virTypedParameter *params;
      int nparams;
     CODE:
-     nparams = 6;
+     nparams = 7;
      Newx(params, nparams, virTypedParameter);
 
      strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,
@@ -4506,6 +4506,10 @@ _migrate(dom, destcon, newparams, flags=0)
              VIR_TYPED_PARAM_FIELD_LENGTH);
      params[5].type = VIR_TYPED_PARAM_STRING;
 
+     strncpy(params[6].field, VIR_MIGRATE_PARAM_DISKS_PORT,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[6].type = VIR_TYPED_PARAM_INT;
+
      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
      vir_typed_param_add_string_list_from_hv(newparams, &params, &nparams,
@@ -4534,7 +4538,7 @@ _migrate_to_uri(dom, desturi, newparams, flags=0)
      virTypedParameter *params;
      int nparams;
   PPCODE:
-     nparams = 6;
+     nparams = 7;
      Newx(params, nparams, virTypedParameter);
 
      strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,
@@ -4561,6 +4565,10 @@ _migrate_to_uri(dom, desturi, newparams, flags=0)
              VIR_TYPED_PARAM_FIELD_LENGTH);
      params[5].type = VIR_TYPED_PARAM_STRING;
 
+     strncpy(params[6].field, VIR_MIGRATE_PARAM_DISKS_PORT,
+             VIR_TYPED_PARAM_FIELD_LENGTH);
+     params[6].type = VIR_TYPED_PARAM_INT;
+
      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
      vir_typed_param_add_string_list_from_hv(newparams, &params, &nparams,
@@ -7586,6 +7594,7 @@ BOOT:
       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_MIGRATE_DISKS, MIGRATE_PARAM_MIGRATE_DISKS);
+      REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_DISKS_PORT, MIGRATE_PARAM_DISK_PORT);
 
       REGISTER_CONSTANT(VIR_DOMAIN_XML_SECURE, XML_SECURE);
       REGISTER_CONSTANT(VIR_DOMAIN_XML_INACTIVE, XML_INACTIVE);
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 3e9e7ba..45b8ed1 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -981,6 +981,12 @@ or ::). This default may be a security risk if guests, or other
 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_DISK_PORT>
+
+Port that destination server should use for incoming disks migration. Type is
+VIR_TYPED_PARAM_INT. If set to 0 or omitted, libvirt will choose a suitable
+default. At the moment this is only supported by the QEMU driver.
+
 =back
 
 =item C<Sys::Virt::Domain::MIGRATE_PARAM_MIGRATE_DISKS>
-- 
2.4.10

--
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]