Hello community,

here is the log from the commit of package perl-Sys-Virt for openSUSE:Factory 
checked in at 2012-12-10 14:25:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Sys-Virt (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Sys-Virt", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Sys-Virt/perl-Sys-Virt.changes      
2012-10-19 22:56:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new/perl-Sys-Virt.changes 
2012-12-10 14:25:30.000000000 +0100
@@ -1,0 +2,16 @@
+Wed Nov 28 10:33:43 UTC 2012 - [email protected]
+
+- license update: GPL-2.0+ or ClArtistic
+
+-------------------------------------------------------------------
+Mon Nov 26 09:32:59 MST 2012 - [email protected]
+
+- Update to 1.0.0 [fate#312159]
+  - Add all new APIs in libvirt 1.0.0
+
+-------------------------------------------------------------------
+Wed Nov 14 15:36:34 CET 2012 - [email protected]
+
+- Update license to be GPL-2.0+
+
+-------------------------------------------------------------------
@@ -4 +20 @@
-- Update to 0.10.2
+- Update to 0.10.2 [fate#312159]

Old:
----
  Sys-Virt-0.10.2.tar.gz

New:
----
  Sys-Virt-1.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Sys-Virt.spec ++++++
--- /var/tmp/diff_new_pack.pjyPEW/_old  2012-12-10 14:25:31.000000000 +0100
+++ /var/tmp/diff_new_pack.pjyPEW/_new  2012-12-10 14:25:31.000000000 +0100
@@ -16,12 +16,13 @@
 #
 
 
+
 Name:           perl-Sys-Virt
-Version:        0.10.2
+Version:        1.0.0
 Release:        0
 %define cpan_name Sys-Virt
 Summary:        Represent and manage a libvirt hypervisor connection
-License:        GPL-1.0+
+License:        GPL-2.0+ or ClArtistic
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Sys-Virt/
 Source:         %{cpan_name}-%{version}.tar.gz

++++++ Sys-Virt-0.10.2.tar.gz -> Sys-Virt-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/Changes new/Sys-Virt-1.0.0/Changes
--- old/Sys-Virt-0.10.2/Changes 2012-09-26 13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/Changes  2012-11-16 15:22:53.000000000 +0100
@@ -1,5 +1,16 @@
 Revision history for perl module Sys::Virt
 
+1.0.0 2012-11-16
+
+ - Add all new APIs and constants in libvirt 1.0.0
+ - Fix inconsistent usage of 'uri' in Sys::Virt POD docs
+ - Fix typos in POD docs
+ - Don't explicitly set VIR_TYPED_PARAM_STRING_OKAY flag
+ - Fix hash key field lengths
+ - Add tests for object list APIs
+ - Fix default values for flags parameters
+ - Fix setting of node memory parameters
+
 0.10.2 2012-09-26
 
  - Add all new APIs and constants in libvirt 0.10.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/MANIFEST new/Sys-Virt-1.0.0/MANIFEST
--- old/Sys-Virt-0.10.2/MANIFEST        2012-09-26 13:30:39.000000000 +0200
+++ new/Sys-Virt-1.0.0/MANIFEST 2012-11-16 15:23:08.000000000 +0100
@@ -8,6 +8,7 @@
 examples/events.pl
 examples/hv-stat.pl
 examples/node-cpu.pl
+examples/node-ksm.pl
 examples/open-console.pl
 examples/save-restore.pl
 examples/send-key.pl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/META.yml new/Sys-Virt-1.0.0/META.yml
--- old/Sys-Virt-0.10.2/META.yml        2012-09-26 13:30:39.000000000 +0200
+++ new/Sys-Virt-1.0.0/META.yml 2012-11-16 15:23:08.000000000 +0100
@@ -1,7 +1,7 @@
 --- #YAML:1.0
 name:         Sys-Virt
 abstract:     Extension for the libvirt library
-version:      0.10.2
+version:      1.0.0
 author:
   - Daniel P. Berrange <[email protected]>
 license: perl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/MYMETA.json 
new/Sys-Virt-1.0.0/MYMETA.json
--- old/Sys-Virt-0.10.2/MYMETA.json     2012-09-26 13:30:28.000000000 +0200
+++ new/Sys-Virt-1.0.0/MYMETA.json      2012-11-16 15:22:57.000000000 +0100
@@ -42,5 +42,5 @@
       }
    },
    "release_status" : "stable",
-   "version" : "v0.10.2"
+   "version" : "v1.0.0"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/MYMETA.yml 
new/Sys-Virt-1.0.0/MYMETA.yml
--- old/Sys-Virt-0.10.2/MYMETA.yml      2012-09-26 13:30:28.000000000 +0200
+++ new/Sys-Virt-1.0.0/MYMETA.yml       2012-11-16 15:22:57.000000000 +0100
@@ -24,4 +24,4 @@
   Test::Pod::Coverage: 0
   Time::HiRes: 0
   XML::XPath: 0
-version: v0.10.2
+version: v1.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/Makefile.PL 
new/Sys-Virt-1.0.0/Makefile.PL
--- old/Sys-Virt-0.10.2/Makefile.PL     2012-09-26 13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/Makefile.PL      2012-11-16 15:22:53.000000000 +0100
@@ -3,7 +3,7 @@
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.
 
-my $libvirtver = "0.9.13";
+my $libvirtver = "1.0.0";
 my $stat = system "pkg-config --atleast-version=$libvirtver libvirt";
 die "cannot run pkg-config to check libvirt version" if $stat == -1;
 die "libvirt >= $libvirtver is required\n" unless $stat == 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/README new/Sys-Virt-1.0.0/README
--- old/Sys-Virt-0.10.2/README  2012-09-26 13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/README   2012-11-16 15:22:53.000000000 +0100
@@ -7,6 +7,6 @@
 The only pre-requisite for this module is libvirt itself. For
 installation instructions, consult the INSTALL file.
 
-The current minimum required version of libvirt is 0.9.13
+The current minimum required version of libvirt is 1.0.0
 
 -- End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/Virt.xs new/Sys-Virt-1.0.0/Virt.xs
--- old/Sys-Virt-0.10.2/Virt.xs 2012-09-26 13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/Virt.xs  2012-11-16 15:22:53.000000000 +0100
@@ -512,6 +512,44 @@
 
 
 static int
+_domain_event_pmsuspend_disk_callback(virConnectPtr con,
+                                      virDomainPtr dom,
+                                      int reason,
+                                      void *opaque)
+{
+    AV *data = opaque;
+    SV **self;
+    SV **cb;
+    SV *domref;
+    dSP;
+
+    self = av_fetch(data, 0, 0);
+    cb = av_fetch(data, 1, 0);
+
+    SvREFCNT_inc(*self);
+
+    ENTER;
+    SAVETMPS;
+
+    PUSHMARK(SP);
+    XPUSHs(*self);
+    domref = sv_newmortal();
+    sv_setref_pv(domref, "Sys::Virt::Domain", (void*)dom);
+    virDomainRef(dom);
+    XPUSHs(domref);
+    XPUSHs(sv_2mortal(newSViv(reason)));
+    PUTBACK;
+
+    call_sv(*cb, G_DISCARD);
+
+    FREETMPS;
+    LEAVE;
+
+    return 0;
+}
+
+
+static int
 _domain_event_io_error_reason_callback(virConnectPtr con,
                                        virDomainPtr dom,
                                        const char *srcPath,
@@ -1254,13 +1292,24 @@
     unsigned int i;
     char * ptr;
     STRLEN len;
-    int needString = 0;
+    int ret = 0;
 
+    /* We only want to set parameters which we're actually changing
+     * so here we figure out which elements of 'params' we need to
+     * update, and overwrite the others
+     */
     for (i = 0 ; i < nparams ; i++) {
-        SV **val;
-
-        if (!hv_exists(newparams, params[i].field, strlen(params[i].field)))
+        if (!hv_exists(newparams, params[i].field, strlen(params[i].field))) {
+            if ((nparams-i) > 1)
+                memmove(params+i, params+i+1, sizeof(*params)*(nparams-(i+1)));
             continue;
+        }
+
+        ret++;
+    }
+
+    for (i = 0 ; i < ret ; i++) {
+        SV **val;
 
         val = hv_fetch (newparams, params[i].field, strlen(params[i].field), 
0);
 
@@ -1290,13 +1339,13 @@
             break;
 
         case VIR_TYPED_PARAM_STRING:
-            needString = 1;
             ptr = SvPV(*val, len);
             params[i].value.s = (char *)ptr;
             break;
         }
     }
-    return needString;
+
+    return ret;
 }
 
 
@@ -1554,6 +1603,23 @@
    OUTPUT:
       RETVAL
 
+void
+get_node_cpu_map(con, flags=0)
+      virConnectPtr con;
+      unsigned int flags;
+ PREINIT:
+      unsigned char *cpumaps;
+      unsigned int online;
+      int ncpus;
+  PPCODE:
+      if ((ncpus = virNodeGetCPUMap(con, &cpumaps, &online, flags)) < 0)
+          _croak_error();
+
+      EXTEND(SP, 3);
+      PUSHs(sv_2mortal(newSViv(ncpus)));
+      PUSHs(sv_2mortal(newSVpvn((char*)cpumaps, VIR_CPU_MAPLEN(ncpus))));
+      PUSHs(sv_2mortal(newSViv(online)));
+      free(cpumaps);
 
 SV *
 get_node_free_memory(con)
@@ -1649,11 +1715,11 @@
       RETVAL = (HV *)sv_2mortal((SV*)newHV());
       for (i = 0 ; i < nparams ; i++) {
           if (strcmp(params[i].field, VIR_NODE_MEMORY_STATS_TOTAL) == 0) {
-              (void)hv_store (RETVAL, "total", 6, 
virt_newSVull(params[i].value), 0);
+              (void)hv_store (RETVAL, "total", 5, 
virt_newSVull(params[i].value), 0);
           } else if (strcmp(params[i].field, VIR_NODE_MEMORY_STATS_FREE) == 0) 
{
               (void)hv_store (RETVAL, "free", 4, 
virt_newSVull(params[i].value), 0);
           } else if (strcmp(params[i].field, VIR_NODE_MEMORY_STATS_BUFFERS) == 
0) {
-              (void)hv_store (RETVAL, "buffers", 4, 
virt_newSVull(params[i].value), 0);
+              (void)hv_store (RETVAL, "buffers", 7, 
virt_newSVull(params[i].value), 0);
           } else if (strcmp(params[i].field, VIR_NODE_MEMORY_STATS_CACHED) == 
0) {
               (void)hv_store (RETVAL, "cached", 6, 
virt_newSVull(params[i].value), 0);
           }
@@ -1708,7 +1774,7 @@
           _croak_error();
       }
 
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
       if (virNodeSetMemoryParameters(conn, params, nparams, flags) < 0)
           _croak_error();
@@ -1717,7 +1783,7 @@
 
 
 void
-node_suspend_for_duration(conn, target, duration, flags)
+node_suspend_for_duration(conn, target, duration, flags=0)
       virConnectPtr conn;
       unsigned int target;
       SV *duration;
@@ -2447,6 +2513,9 @@
       case VIR_DOMAIN_EVENT_ID_PMSUSPEND:
           callback = 
VIR_DOMAIN_EVENT_CALLBACK(_domain_event_pmsuspend_callback);
           break;
+      case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK:
+          callback = 
VIR_DOMAIN_EVENT_CALLBACK(_domain_event_pmsuspend_disk_callback);
+          break;
       case VIR_DOMAIN_EVENT_ID_PMWAKEUP:
           callback = 
VIR_DOMAIN_EVENT_CALLBACK(_domain_event_pmwakeup_callback);
           break;
@@ -2766,7 +2835,7 @@
 
 
 void
-pm_wakeup(dom, flags)
+pm_wakeup(dom, flags=0)
       virDomainPtr dom;
       unsigned int flags;
   PPCODE:
@@ -3140,7 +3209,7 @@
               _croak_error();
           }
       }
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
       if (flags) {
           if (virDomainSetSchedulerParametersFlags(dom, params, nparams, 
flags) < 0)
               _croak_error();
@@ -3196,7 +3265,7 @@
           _croak_error();
       }
 
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
       if (virDomainSetMemoryParameters(dom, params, nparams, flags) < 0)
           _croak_error();
@@ -3248,7 +3317,7 @@
           _croak_error();
       }
 
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
       if (virDomainSetNumaParameters(dom, params, nparams, flags) < 0)
           _croak_error();
@@ -3288,7 +3357,6 @@
   PREINIT:
       virTypedParameter *params;
       int nparams;
-      int needString;
     PPCODE:
       nparams = 0;
       if (virDomainGetBlkioParameters(dom, NULL, &nparams, flags) < 0)
@@ -3301,10 +3369,10 @@
           _croak_error();
       }
 
-      needString = vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
 
       if (virDomainSetBlkioParameters(dom, params, nparams,
-                                      needString ? flags | 
VIR_TYPED_PARAM_STRING_OKAY: flags) < 0)
+                                      flags) < 0)
           _croak_error();
       Safefree(params);
 
@@ -3468,7 +3536,7 @@
 
 
 void
-pm_suspend_for_duration(dom, target, duration, flags)
+pm_suspend_for_duration(dom, target, duration, flags=0)
       virDomainPtr dom;
       unsigned int target;
       SV *duration;
@@ -3742,7 +3810,7 @@
           _croak_error();
       }
 
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
       if (virDomainSetBlockIoTune(dom, disk, params, nparams, flags) < 0)
           _croak_error();
 
@@ -3793,7 +3861,7 @@
           _croak_error();
       }
 
-      vir_typed_param_from_hv(newparams, params, nparams);
+      nparams = vir_typed_param_from_hv(newparams, params, nparams);
       if (virDomainSetInterfaceParameters(dom, intf, params, nparams, flags) < 
0)
           _croak_error();
 
@@ -6222,6 +6290,8 @@
 
       REGISTER_CONSTANT(VIR_DOMAIN_PMSUSPENDED_UNKNOWN, 
STATE_PMSUSPENDED_UNKNOWN);
 
+      REGISTER_CONSTANT(VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWN, 
STATE_PMSUSPENDED_DISK_UNKNOWN);
+
       REGISTER_CONSTANT(VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH, 
OPEN_GRAPHICS_SKIPAUTH);
 
       REGISTER_CONSTANT(VIR_DOMAIN_CONSOLE_FORCE, OPEN_CONSOLE_FORCE);
@@ -6261,6 +6331,7 @@
       REGISTER_CONSTANT(VIR_DOMAIN_XML_SECURE, XML_SECURE);
       REGISTER_CONSTANT(VIR_DOMAIN_XML_INACTIVE, XML_INACTIVE);
       REGISTER_CONSTANT(VIR_DOMAIN_XML_UPDATE_CPU, XML_UPDATE_CPU);
+      REGISTER_CONSTANT(VIR_DOMAIN_XML_MIGRATABLE, XML_MIGRATABLE);
 
 
       REGISTER_CONSTANT(VIR_MEMORY_VIRTUAL, MEMORY_VIRTUAL);
@@ -6292,6 +6363,7 @@
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_STOPPED, EVENT_STOPPED);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_SHUTDOWN, EVENT_SHUTDOWN);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_PMSUSPENDED, EVENT_PMSUSPENDED);
+      REGISTER_CONSTANT(VIR_DOMAIN_EVENT_PMSUSPENDED_DISK, 
EVENT_PMSUSPENDED_DISK);
 
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_DEFINED_ADDED, EVENT_DEFINED_ADDED);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_DEFINED_UPDATED, 
EVENT_DEFINED_UPDATED);
@@ -6366,6 +6438,7 @@
       REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_COMPLETED, BLOCK_JOB_COMPLETED);
       REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_FAILED, BLOCK_JOB_FAILED);
       REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_CANCELED, BLOCK_JOB_CANCELED);
+      REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_READY, BLOCK_JOB_READY);
 
       REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_DELETE, BLOCK_COMMIT_DELETE);
       REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW, BLOCK_COMMIT_SHALLOW);
@@ -6381,6 +6454,7 @@
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_BLOCK_JOB, EVENT_ID_BLOCK_JOB);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_DISK_CHANGE, EVENT_ID_DISK_CHANGE);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_PMSUSPEND, EVENT_ID_PMSUSPEND);
+      REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, 
EVENT_ID_PMSUSPEND_DISK);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_PMWAKEUP, EVENT_ID_PMWAKEUP);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, EVENT_ID_TRAY_CHANGE);
       REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, 
EVENT_ID_BALLOON_CHANGE);
@@ -6741,6 +6815,7 @@
       REGISTER_CONSTANT(VIR_FROM_DEVICE, FROM_DEVICE);
       REGISTER_CONSTANT(VIR_FROM_PARALLELS, FROM_PARALLELS);
       REGISTER_CONSTANT(VIR_FROM_SSH, FROM_SSH);
+      REGISTER_CONSTANT(VIR_FROM_LOCKSPACE, FROM_LOCKSPACE);
 
 
       REGISTER_CONSTANT(VIR_ERR_OK, ERR_OK);
@@ -6830,4 +6905,5 @@
       REGISTER_CONSTANT(VIR_ERR_AGENT_UNRESPONSIVE, ERR_AGENT_UNRESPONSIVE);
       REGISTER_CONSTANT(VIR_ERR_OPERATION_UNSUPPORTED, 
ERR_OPERATION_UNSUPPORTED);
       REGISTER_CONSTANT(VIR_ERR_SSH, ERR_SSH);
+      REGISTER_CONSTANT(VIR_ERR_RESOURCE_BUSY, ERR_RESOURCE_BUSY);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/examples/node-cpu.pl 
new/Sys-Virt-1.0.0/examples/node-cpu.pl
--- old/Sys-Virt-0.10.2/examples/node-cpu.pl    2012-09-26 13:30:11.000000000 
+0200
+++ new/Sys-Virt-1.0.0/examples/node-cpu.pl     2012-11-16 15:22:53.000000000 
+0100
@@ -47,3 +47,12 @@
 
     $then = $now;
 }
+
+my ($totcpus, $onlinemask, $nonline) = $hv->get_node_cpu_map();
+
+printf "CPUs total %d, online %d\n", $totcpus, $nonline;
+
+my @bits = split(//, unpack("b*", $onlinemask));
+for (my $i = 0 ; $i < $totcpus ; $i++) {
+    printf "  %d: %d\n", $i, $bits[$i];
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/examples/node-ksm.pl 
new/Sys-Virt-1.0.0/examples/node-ksm.pl
--- old/Sys-Virt-0.10.2/examples/node-ksm.pl    1970-01-01 01:00:00.000000000 
+0100
+++ new/Sys-Virt-1.0.0/examples/node-ksm.pl     2012-11-16 15:22:53.000000000 
+0100
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Sys::Virt;
+
+my $pagetoscan = shift @ARGV || 200;
+my $sleepmillis = shift @ARGV || 100;
+
+my $uri = "qemu:///system";
+my $con = Sys::Virt->new(address => $uri);
+
+my $params = $con->get_node_memory_parameters();
+foreach my $key (keys %{$params}) {
+    printf "%s: %d\n", $key, $params->{$key};
+}
+
+my %param = (Sys::Virt::NODE_MEMORY_SHARED_PAGES_TO_SCAN => $pagetoscan,
+            Sys::Virt::NODE_MEMORY_SHARED_SLEEP_MILLISECS => $sleepmillis);
+$con->set_node_memory_parameters(\%param);
+
+$params = $con->get_node_memory_parameters();
+foreach my $key (keys %{$params}) {
+    printf "%s: %d\n", $key, $params->{$key};
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/lib/Sys/Virt/Domain.pm 
new/Sys-Virt-1.0.0/lib/Sys/Virt/Domain.pm
--- old/Sys-Virt-0.10.2/lib/Sys/Virt/Domain.pm  2012-09-26 13:30:11.000000000 
+0200
+++ new/Sys-Virt-1.0.0/lib/Sys/Virt/Domain.pm   2012-11-16 15:22:53.000000000 
+0100
@@ -384,7 +384,11 @@
 
 =item Sys::Virt::Domain::STATE_PMSUSPENDED_UNKNOWN
 
-It is not known why the domain was suspended
+It is not known why the domain was suspended to RAM
+
+=item Sys::Virt::Domain::STATE_PMSUSPENDED_DISK_UNKNOWN
+
+It is not known why the domain was suspended to disk
 
 =back
 
@@ -941,6 +945,60 @@
 Returns a hash reference summarising the execution state of the
 background job. The elements of the hash are as follows:
 
+=over 4
+
+=item type
+
+The type of job, one of the JOB TYPE constants listed later in
+this document.
+
+=item timeElapsed
+
+The elapsed time in milliseconds
+
+=item timeRemaining
+
+The expected remaining time in milliseconds. Only set if the
+C<type> is JOB_UNBOUNDED.
+
+=item dataTotal
+
+The total amount of data expected to be processed by the job, in bytes.
+
+=item dataProcessed
+
+The current amount of data processed by the job, in bytes.
+
+=item dataRemaining
+
+The expected amount of data remaining to be processed by the job, in bytes.
+
+=item memTotal
+
+The total amount of mem expected to be processed by the job, in bytes.
+
+=item memProcessed
+
+The current amount of mem processed by the job, in bytes.
+
+=item memRemaining
+
+The expected amount of mem remaining to be processed by the job, in bytes.
+
+=item fileTotal
+
+The total amount of file expected to be processed by the job, in bytes.
+
+=item fileProcessed
+
+The current amount of file processed by the job, in bytes.
+
+=item fileRemaining
+
+The expected amount of file remaining to be processed by the job, in bytes.
+
+=back
+
 =item $dom->abort_job()
 
 Aborts the currently executing job
@@ -1051,7 +1109,8 @@
 
 =item $snapshot = $dom->create_snapshot($xml[, $flags])
 
-Create a new snapshot from the C<$xml>.
+Create a new snapshot from the C<$xml>. The C<$flags> parameter accepts
+the B<SNAPSHOT CREATION> constants listed in C<Sys::Virt::DomainSnapshots>.
 
 =cut
 
@@ -1065,63 +1124,6 @@
     return $snapshot;
 }
 
-=over 4
-
-=item type
-
-The type of job, one of the JOB TYPE constants listed later in
-this document.
-
-=item timeElapsed
-
-The elapsed time in milliseconds
-
-=item timeRemaining
-
-The expected remaining time in milliseconds. Only set if the
-C<type> is JOB_UNBOUNDED.
-
-=item dataTotal
-
-The total amount of data expected to be processed by the job, in bytes.
-
-=item dataProcessed
-
-The current amount of data processed by the job, in bytes.
-
-=item dataRemaining
-
-The expected amount of data remaining to be processed by the job, in bytes.
-
-=item memTotal
-
-The total amount of mem expected to be processed by the job, in bytes.
-
-=item memProcessed
-
-The current amount of mem processed by the job, in bytes.
-
-=item memRemaining
-
-The expected amount of mem remaining to be processed by the job, in bytes.
-
-=item fileTotal
-
-The total amount of file expected to be processed by the job, in bytes.
-
-=item fileProcessed
-
-The current amount of file processed by the job, in bytes.
-
-=item fileRemaining
-
-The expected amount of file remaining to be processed by the job, in bytes.
-
-=back
-
-=cut
-
-
 1;
 
 =back
@@ -1371,6 +1373,10 @@
 Update the CPU model definition to match the current executing
 state.
 
+=item Sys::Virt::Domain::XML_MIGRATABLE
+
+Update the XML to allow migration to older versions of libvirt
+
 =back
 
 =head2 DEVICE HOTPLUG OPTIONS
@@ -1950,6 +1956,10 @@
 
 The domain has suspend to RAM.
 
+=item Sys::Virt::Domain::EVENT_PMSUSPENDED_DISK
+
+The domain has suspend to Disk.
+
 =back
 
 =back
@@ -2004,7 +2014,11 @@
 
 =item Sys::Virt::Domain::EVENT_ID_PMSUSPEND
 
-Power management initiated suspend
+Power management initiated suspend to RAM
+
+=item Sys::Virt::Domain::EVENT_ID_PMSUSPEND_DISK
+
+Power management initiated suspend to Disk
 
 =item Sys::Virt::Domain::EVENT_ID_PMWAKEUP
 
@@ -2182,6 +2196,10 @@
 
 A block job canceled byy the user
 
+=item Sys::Virt::Domain::BLOCK_JOB_READY
+
+A block job is running
+
 =back
 
 =head2 DOMAIN BLOCK REBASE CONSTANTS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/lib/Sys/Virt/DomainSnapshot.pm 
new/Sys-Virt-1.0.0/lib/Sys/Virt/DomainSnapshot.pm
--- old/Sys-Virt-0.10.2/lib/Sys/Virt/DomainSnapshot.pm  2012-09-26 
13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/lib/Sys/Virt/DomainSnapshot.pm   2012-11-16 
15:22:53.000000000 +0100
@@ -131,7 +131,7 @@
     return @snapshots;
 }
 
-=item my @snapshots = $dom->list_all_children($flags)
+=item my @snapshots = $domss->list_all_children($flags)
 
 Return a list of all domain snapshots that are children of this
 snapshot. The elements in the returned list are instances of the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/lib/Sys/Virt/Error.pm 
new/Sys-Virt-1.0.0/lib/Sys/Virt/Error.pm
--- old/Sys-Virt-0.10.2/lib/Sys/Virt/Error.pm   2012-09-26 13:30:11.000000000 
+0200
+++ new/Sys-Virt-1.0.0/lib/Sys/Virt/Error.pm    2012-11-16 15:22:53.000000000 
+0100
@@ -338,6 +338,10 @@
 
 The Parallels virtualization driver
 
+=item Sys::Virt::Error::FROM_LOCKSPACE
+
+The lockspace handling code
+
 =back
 
 =head2 ERROR CODE CONSTANTS
@@ -696,6 +700,10 @@
 
 The SSH operation failed
 
+=item Sys::Virt::Error::ERR_RESOURCE_BUSY
+
+The resource requested is already in use
+
 =back
 
 =head1 AUTHORS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/lib/Sys/Virt.pm 
new/Sys-Virt-1.0.0/lib/Sys/Virt.pm
--- old/Sys-Virt-0.10.2/lib/Sys/Virt.pm 2012-09-26 13:30:11.000000000 +0200
+++ new/Sys-Virt-1.0.0/lib/Sys/Virt.pm  2012-11-16 15:22:53.000000000 +0100
@@ -25,7 +25,7 @@
 
 =head1 SYNOPSIS
 
-  my $vmm = Sys::Virt->new(address => $addr);
+  my $vmm = Sys::Virt->new(uri => $uri);
 
   my @domains = $vmm->list_domains();
 
@@ -47,7 +47,7 @@
 thrown. To catch these errors, simply wrap the method in an eval
 block:
 
-  eval { my $vmm = Sys::Virt->new(address => $addr); };
+  eval { my $vmm = Sys::Virt->new(uri => $uri); };
   if ($@) {
     print STDERR "Unable to open connection to $addr" . $@->message . "\n";
   }
@@ -78,14 +78,14 @@
 use Sys::Virt::DomainSnapshot;
 use Sys::Virt::Stream;
 
-our $VERSION = '0.10.2';
+our $VERSION = '1.0.0';
 require XSLoader;
 XSLoader::load('Sys::Virt', $VERSION);
 
 =item my $vmm = Sys::Virt->new(uri => $uri, readonly => $ro, flags => $flags);
 
-Attach to the virtual machine monitor with the address of C<address>. The
-uri parameter may be omitted, in which case the default connection made
+Attach to the virtualization host identified by C<uri>. The
+C<uri> parameter may be omitted, in which case the default connection made
 will be to the local Xen hypervisor. Some example URIs include:
 
 =over 4
@@ -146,11 +146,11 @@
 
 As a simple example returning hardcoded credentials
 
-    my $address  = "qemu+tcp://192.168.122.1/system";
+    my $uri  = "qemu+tcp://192.168.122.1/system";
     my $username = "test";
     my $password = "123456";
 
-    my $con = Sys::Virt->new(address => $address,
+    my $con = Sys::Virt->new(uri => $uri,
                              auth => 1,
                              credlist => [
                                Sys::Virt::CRED_AUTHNAME,
@@ -171,6 +171,11 @@
                return 0;
          });
 
+
+For backwards compatibility with earlier releases, the C<address>
+parameter is accepted as a synonym for the C<uri> parameter. The
+use of C<uri> is recommended for all newly written code.
+
 =cut
 
 sub new {
@@ -1279,7 +1284,7 @@
 
 =item cpus
 
-The total number of logical CPUs
+The total number of logical CPUs.
 
 =item mhz
 
@@ -1303,6 +1308,22 @@
 
 =back
 
+NB, more accurate information about the total number of CPUs
+and those online can be obtained using the C<get_node_cpu_map>
+method.
+
+=item my ($totcpus, $onlinemap, $totonline) = $con->get_node_cpu_map();
+
+Returns an array containing information about the CPUs available
+on the host. The first element, C<totcpus>, specifies the total
+number of CPUs available to the host regardles of their online
+stat. The second element, C<onlinemap>, provides a bitmap detailing
+which CPUs are currently online. The third element, C<totonline>,
+specifies the total number of online CPUs. The values in the bitmap
+can be extracted using the C<unpack> method as follows:
+
+  my @onlinemap = split(//, unpack("b*", $onlinemap));
+
 =item my $info = $con->get_node_cpu_stats($cpuNum=-1, $flags=0)
 
 Returns a hash reference providing information about the host
@@ -1361,7 +1382,7 @@
 
 The memory consumed by buffers
 
-=item cache
+=item cached
 
 The memory consumed for cache
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/perl-Sys-Virt.spec 
new/Sys-Virt-1.0.0/perl-Sys-Virt.spec
--- old/Sys-Virt-0.10.2/perl-Sys-Virt.spec      2012-09-26 13:30:39.000000000 
+0200
+++ new/Sys-Virt-1.0.0/perl-Sys-Virt.spec       2012-11-16 15:23:08.000000000 
+0100
@@ -1,7 +1,7 @@
 # Automatically generated by perl-Sys-Virt.spec.PL
 
 Name:           perl-Sys-Virt
-Version:        0.10.2
+Version:        1.0.0
 Release:        1%{?dist}%{?extra_release}
 Summary:        Represent and manage a libvirt hypervisor connection
 License:        GPLv2+ or Artistic
@@ -15,7 +15,7 @@
 BuildRequires:  perl(Test::CPAN::Changes)
 BuildRequires:  perl(XML::XPath)
 BuildRequires:  perl(Time::HiRes)
-BuildRequires:  libvirt-devel >= 0.9.13
+BuildRequires:  libvirt-devel >= %{version}
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
 
 %description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/perl-Sys-Virt.spec.PL 
new/Sys-Virt-1.0.0/perl-Sys-Virt.spec.PL
--- old/Sys-Virt-0.10.2/perl-Sys-Virt.spec.PL   2012-09-26 13:30:11.000000000 
+0200
+++ new/Sys-Virt-1.0.0/perl-Sys-Virt.spec.PL    2012-11-16 15:22:53.000000000 
+0100
@@ -37,7 +37,7 @@
 BuildRequires:  perl(Test::CPAN::Changes)
 BuildRequires:  perl(XML::XPath)
 BuildRequires:  perl(Time::HiRes)
-BuildRequires:  libvirt-devel >= 0.9.13
+BuildRequires:  libvirt-devel >= %{version}
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
 
 %description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/t/030-api-coverage.t 
new/Sys-Virt-1.0.0/t/030-api-coverage.t
--- old/Sys-Virt-0.10.2/t/030-api-coverage.t    2012-09-26 13:30:11.000000000 
+0200
+++ new/Sys-Virt-1.0.0/t/030-api-coverage.t     2012-11-16 15:22:53.000000000 
+0100
@@ -82,6 +82,7 @@
 virConnectDomainEventRTCChangeCallback
 virConnectDomainEventWatchdogCallback
 virConnectDomainEventPMSuspendCallback
+virConnectDomainEventPMSuspendDiskCallback
 virConnectDomainEventPMWakeupCallback
 virConnectDomainEventTrayChangeCallback
 virConnectDomainEventBalloonChangeCallback
@@ -131,6 +132,7 @@
 VIR_COPY_CPUMAP
 VIR_CPU_MAPLEN
 VIR_CPU_USABLE
+VIR_CPU_USED
 VIR_DOMAIN_BLKIO_FIELD_LENGTH
 VIR_DOMAIN_BLOCK_STATS_FIELD_LENGTH
 VIR_DOMAIN_EVENT_CALLBACK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/t/300-networks.t 
new/Sys-Virt-1.0.0/t/300-networks.t
--- old/Sys-Virt-0.10.2/t/300-networks.t        2012-09-26 13:30:12.000000000 
+0200
+++ new/Sys-Virt-1.0.0/t/300-networks.t 2012-11-16 15:22:53.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 29;
+use Test::More tests => 31;
 
 BEGIN {
         use_ok('Sys::Virt');
@@ -21,6 +21,11 @@
 my @netnames = $conn->list_network_names($nid);
 is_deeply(\@netnames, ["default"], "network names");
 
+my @nets = $conn->list_all_networks();
+is(int(@nets), 1, "1 active network");
+is($nets[0]->get_name, "default", "network name matches");
+
+
 my $net = $conn->get_network_by_name($netnames[0]);
 isa_ok($net, "Sys::Virt::Network");
 
@@ -41,7 +46,7 @@
 isa_ok($net3, "Sys::Virt::Network");
 is($net3->get_name, "default", "name");
 
-my @nets = $conn->list_networks();
+@nets = $conn->list_networks();
 is($#nets, 0, "one network");
 isa_ok($nets[0], "Sys::Virt::Network");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/t/400-storage-pools.t 
new/Sys-Virt-1.0.0/t/400-storage-pools.t
--- old/Sys-Virt-0.10.2/t/400-storage-pools.t   2012-09-26 13:30:12.000000000 
+0200
+++ new/Sys-Virt-1.0.0/t/400-storage-pools.t    2012-11-16 15:22:53.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 29;
+use Test::More tests => 31;
 
 BEGIN {
         use_ok('Sys::Virt');
@@ -21,6 +21,10 @@
 my @poolnames = $conn->list_storage_pool_names($nid);
 is_deeply(\@poolnames, ["default-pool"], "storage_pool names");
 
+my @pools = $conn->list_all_storage_pools();
+is(int(@pools), 1, "1 active pools");
+is($pools[0]->get_name, "default-pool", "storage pool name matches");
+
 my $pool = $conn->get_storage_pool_by_name($poolnames[0]);
 isa_ok($pool, "Sys::Virt::StoragePool");
 
@@ -43,7 +47,7 @@
 is($pool3->get_name, "default-pool", "name");
 
 
-my @pools = $conn->list_storage_pools();
+@pools = $conn->list_storage_pools();
 is($#pools, 0, "one storage_pool");
 isa_ok($pools[0], "Sys::Virt::StoragePool");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/t/500-storage-vols.t 
new/Sys-Virt-1.0.0/t/500-storage-vols.t
--- old/Sys-Virt-0.10.2/t/500-storage-vols.t    2012-09-26 13:30:12.000000000 
+0200
+++ new/Sys-Virt-1.0.0/t/500-storage-vols.t     2012-11-16 15:22:53.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 10;
+use Test::More tests => 12;
 
 BEGIN {
         use_ok('Sys::Virt');
@@ -27,6 +27,10 @@
 my $newvol = $pool->create_volume($volxml);
 isa_ok($newvol, "Sys::Virt::StorageVol");
 
+my @vols = $pool->list_all_volumes();
+is(int(@vols), 1, "1 storage vol");
+is($vols[0]->get_name, "demo-vol", "storage vol name matches");
+
 
 my $key = $newvol->get_key();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sys-Virt-0.10.2/t/600-interfaces.t 
new/Sys-Virt-1.0.0/t/600-interfaces.t
--- old/Sys-Virt-0.10.2/t/600-interfaces.t      2012-09-26 13:30:12.000000000 
+0200
+++ new/Sys-Virt-1.0.0/t/600-interfaces.t       2012-11-16 15:22:53.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 23;
+use Test::More tests => 25;
 
 BEGIN {
         use_ok('Sys::Virt');
@@ -25,12 +25,17 @@
 isa_ok($iface, "Sys::Virt::Interface");
 
 is($iface->get_name, "eth1", "name");
-# Disable till 0.7.6 libvirt
+
+my @ifaces;
 SKIP: {
-    skip "libvirt < 0.7.6 is broken", 1;
+    skip "Impl missing in test driver in libvirt 0.10.2", 2;
+
+    @ifaces = $conn->list_all_interfaces();
+    is(int(@ifaces), 1, "1 active interface");
+    is($ifaces[0]->get_name, "2eth1", "interface name matches");
+}
 
-    ok($iface->is_active(), "interface is active");
-};
+ok($iface->is_active(), "interface is active");
 
 # Lookup again via MAC to verify we get the same
 my $mac = $iface->get_mac();
@@ -39,7 +44,7 @@
 isa_ok($iface2, "Sys::Virt::Interface");
 is($iface2->get_name, "eth1", "name");
 
-my @ifaces = $conn->list_interfaces();
+@ifaces = $conn->list_interfaces();
 is($#ifaces, 0, "one interface");
 isa_ok($ifaces[0], "Sys::Virt::Interface");
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to