Hello community, here is the log from the commit of package perl-Sys-Virt for openSUSE:Factory checked in at 2018-03-09 10:43:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Sys-Virt (Old) and /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Sys-Virt" Fri Mar 9 10:43:44 2018 rev:60 rq:583118 version:4.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Sys-Virt/perl-Sys-Virt.changes 2017-12-19 10:59:46.805606376 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new/perl-Sys-Virt.changes 2018-03-09 10:43:44.860833626 +0100 @@ -1,0 +2,7 @@ +Mon Mar 5 18:50:27 UTC 2018 - [email protected] + +- Update to 4.1.0 + - Add all new APIs and constants in libvirt 4.1.0 + - Dropped patches: c069787e-virstream-fix.patch + +------------------------------------------------------------------- Old: ---- Sys-Virt-3.9.1.tar.gz c069787e-virstream-fix.patch New: ---- Sys-Virt-4.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Sys-Virt.spec ++++++ --- /var/tmp/diff_new_pack.l0wtJm/_old 2018-03-09 10:43:45.720802653 +0100 +++ /var/tmp/diff_new_pack.l0wtJm/_new 2018-03-09 10:43:45.724802509 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Sys-Virt # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-Sys-Virt -Version: 3.9.1 +Version: 4.1.0 Release: 0 %define cpan_name Sys-Virt Summary: Represent and manage a libvirt hypervisor connection @@ -25,8 +25,7 @@ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Sys-Virt/ Source: %{cpan_name}-%{version}.tar.gz -Patch0: c069787e-virstream-fix.patch -Patch1: suse-set-migration-constraints.patch +Patch0: suse-set-migration-constraints.patch BuildRequires: libvirt-devel >= %{version} %if 0%{?suse_version} < 1140 BuildRequires: perl-macros @@ -48,7 +47,6 @@ %prep %setup -q -n %{cpan_name}-%{version} %patch0 -p1 -%patch1 -p1 sed -i -e '/Sys-Virt\.spec/d' Makefile.PL sed -i -e '/\.spec\.PL$/d' MANIFEST ++++++ Sys-Virt-3.9.1.tar.gz -> Sys-Virt-4.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/Changes new/Sys-Virt-4.1.0/Changes --- old/Sys-Virt-3.9.1/Changes 2017-12-05 12:41:58.000000000 +0100 +++ new/Sys-Virt-4.1.0/Changes 2018-03-05 15:44:06.000000000 +0100 @@ -1,5 +1,19 @@ Revision history for perl module Sys::Virt +4.1.0 2018-03-05 + + - Add VIR_ERR_DEVICE_MISSING constants + - Remove use of Data::Dumper from example programs + - Remove accidental debug message in get_all_domain_stats + - Add virStoragePoolLookupByTargetPath API mapping + +4.0.0 2018-01-23 + + - Fix check of return value from virStreamRecv* + - Fix rd_req / wr_req hash keys for block stats + - Fix misc spelling mistakes + - Fix docs for storage pool destroy/undefine + 3.9.1 2017-12-05 - Fix package location of lifecycle constants @@ -468,7 +482,7 @@ 0.2.6 2011-02-16 - Fix build with 0.8.7 libvirt by removing reference to - non-existant constant only introduced in libvirt > 0.8.7 + non-existent constant only introduced in libvirt > 0.8.7 - Fix test script when hostname is undefined 0.2.5 2011-02-04 @@ -529,7 +543,7 @@ - Added networking APIs - Added APIs for host capabilities - Added APIs for inactive domains - - Switch licensse to GPLv2+ or Artistic for CPAN compatability + - Switch licensse to GPLv2+ or Artistic for CPAN compatibility - Fix return values for reboot/shutdown/undefine/create APIs - Expanded documentation coverage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/HACKING new/Sys-Virt-4.1.0/HACKING --- old/Sys-Virt-3.9.1/HACKING 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/HACKING 2018-01-15 18:38:18.000000000 +0100 @@ -15,7 +15,7 @@ of two parts of the Sys::Virt codebase. - Virt.xs - this provides the C glue code to access the libvirt C - library APIs and constants from the Perl interpretor. As a general + library APIs and constants from the Perl interpreter. As a general rule, every new function and header file constant/enum requires an addition to this file. The exceptions are functions that are only provided for the benefit of language bindings and not intended for @@ -93,7 +93,7 @@ - For each missing item reported in the test suite... - Edit Virt.xs to add the C binding - - Edit lib/*.pm to add the POD documentation (and occassionally Perl glue code) + - Edit lib/*.pm to add the POD documentation (and occasionally Perl glue code) - Edit Changes to document the addition - Run the test suite (without maintainer mode) to verify POD docs # ../libvirt/run make test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/META.yml new/Sys-Virt-4.1.0/META.yml --- old/Sys-Virt-3.9.1/META.yml 2017-12-05 12:43:24.000000000 +0100 +++ new/Sys-Virt-4.1.0/META.yml 2018-03-05 15:44:57.000000000 +0100 @@ -1,7 +1,7 @@ --- #YAML:1.0 name: Sys-Virt abstract: Extension for the libvirt library -version: 3.9.1 +version: 4.1.0 author: - Daniel P. Berrange <[email protected]> license: perl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/MYMETA.json new/Sys-Virt-4.1.0/MYMETA.json --- old/Sys-Virt-3.9.1/MYMETA.json 2017-12-05 12:43:16.000000000 +0100 +++ new/Sys-Virt-4.1.0/MYMETA.json 2018-03-05 15:44:49.000000000 +0100 @@ -42,6 +42,6 @@ } }, "release_status" : "stable", - "version" : "v3.9.1", + "version" : "v4.1.0", "x_serialization_backend" : "JSON::PP version 2.94" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/MYMETA.yml new/Sys-Virt-4.1.0/MYMETA.yml --- old/Sys-Virt-3.9.1/MYMETA.yml 2017-12-05 12:43:16.000000000 +0100 +++ new/Sys-Virt-4.1.0/MYMETA.yml 2018-03-05 15:44:49.000000000 +0100 @@ -24,5 +24,5 @@ Test::Pod::Coverage: '0' Time::HiRes: '0' XML::XPath: '0' -version: v3.9.1 +version: v4.1.0 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/Makefile.PL new/Sys-Virt-4.1.0/Makefile.PL --- old/Sys-Virt-3.9.1/Makefile.PL 2017-12-05 12:41:33.000000000 +0100 +++ new/Sys-Virt-4.1.0/Makefile.PL 2018-01-23 16:04:35.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 = "3.9.0"; +my $libvirtver = "4.1.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-3.9.1/README new/Sys-Virt-4.1.0/README --- old/Sys-Virt-3.9.1/README 2017-12-05 12:41:33.000000000 +0100 +++ new/Sys-Virt-4.1.0/README 2018-01-23 16:04:30.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 3.9.0 +The current minimum required version of libvirt is 4.1.0 -- End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/Virt.xs new/Sys-Virt-4.1.0/Virt.xs --- old/Sys-Virt-3.9.1/Virt.xs 2017-11-30 15:18:13.000000000 +0100 +++ new/Sys-Virt-4.1.0/Virt.xs 2018-02-09 14:56:27.000000000 +0100 @@ -3358,7 +3358,6 @@ if (SvOK(doms_sv)) { doms_av = (AV*)SvRV(doms_sv); ndoms = av_len(doms_av) + 1; - fprintf(stderr, "Len %d\n", ndoms); } else { ndoms = 0; } @@ -5611,9 +5610,9 @@ field = NULL; /* For back compat with previous hash above */ if (strcmp(params[i].field, "rd_operations") == 0) - field = "rd_reqs"; + field = "rd_req"; else if (strcmp(params[i].field, "wr_operations") == 0) - field = "wr_reqs"; + field = "wr_req"; else if (strcmp(params[i].field, "flush_operations") == 0) field = "flush_reqs"; if (field) { @@ -6679,6 +6678,17 @@ RETVAL +virStoragePoolPtr +_lookup_by_target_path(con, path) + virConnectPtr con; + const char *path; + CODE: + if (!(RETVAL = virStoragePoolLookupByTargetPath(con, path))) + _croak_error(); + OUTPUT: + RETVAL + + SV * get_uuid(pool) virStoragePoolPtr pool; @@ -8074,7 +8084,7 @@ else RETVAL = virStreamRecv(st, rawdata, nbytes); - if (RETVAL != -2 && RETVAL != -3) { + if (RETVAL < 0 && RETVAL != -2 && RETVAL != -3) { Safefree(rawdata); _croak_error(); } @@ -9488,4 +9498,5 @@ REGISTER_CONSTANT(VIR_ERR_NO_CLIENT, ERR_NO_CLIENT); REGISTER_CONSTANT(VIR_ERR_AGENT_UNSYNCED, ERR_AGENT_UNSYNCED); REGISTER_CONSTANT(VIR_ERR_LIBSSH, ERR_LIBSSH); + REGISTER_CONSTANT(VIR_ERR_DEVICE_MISSING, ERR_DEVICE_MISSING); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/examples/dhcp-leases.pl new/Sys-Virt-4.1.0/examples/dhcp-leases.pl --- old/Sys-Virt-3.9.1/examples/dhcp-leases.pl 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/examples/dhcp-leases.pl 2018-02-07 18:44:46.000000000 +0100 @@ -1,7 +1,6 @@ #!/usr/bin/perl use Sys::Virt; -use Data::Dumper; my $c = Sys::Virt->new(uri => "qemu:///system", readonly => 1); @@ -9,5 +8,9 @@ $n = $c->get_network_by_name("default"); foreach my $lease ($n->get_dhcp_leases()) { - print Dumper($lease); + print "Interface ", $lease->{iface}, "\n"; + print " MAC: ", $lease->{mac}, "\n"; + print " IP: ", $lease->{ipaddr}, "\n"; + print " Host: ", $lease->{hostname}, "\n" if $lease->{hostname}; + print "\n"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/examples/dom-fsinfo.pl new/Sys-Virt-4.1.0/examples/dom-fsinfo.pl --- old/Sys-Virt-3.9.1/examples/dom-fsinfo.pl 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/examples/dom-fsinfo.pl 2018-02-07 18:44:46.000000000 +0100 @@ -1,6 +1,5 @@ #!/usr/bin/perl - use strict; use warnings; @@ -15,7 +14,6 @@ my @fs = $dom->get_fs_info(); -use Data::Dumper; - -print Dumper($fs[0]); -print Dumper($fs[1]); +foreach my $fs (@fs) { + printf "%s (%s) at %s\n", $fs->{name}, $fs->{fstype}, $fs->{mountpoint}; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/examples/dom-ifinfo.pl new/Sys-Virt-4.1.0/examples/dom-ifinfo.pl --- old/Sys-Virt-3.9.1/examples/dom-ifinfo.pl 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/examples/dom-ifinfo.pl 2018-02-07 18:44:46.000000000 +0100 @@ -1,6 +1,5 @@ #!/usr/bin/perl - use strict; use warnings; @@ -13,9 +12,14 @@ my $dom = $c->get_domain_by_name(shift @ARGV); -my @fs = $dom->get_interface_addresses( +my @nics = $dom->get_interface_addresses( Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_LEASE); -use Data::Dumper; - -print Dumper(@fs); +foreach my $nic (@nics) { + print "Interface ", $nic->{name}, "\n"; + print " MAC: ", $nic->{hwaddr}, "\n"; + foreach my $addr (@{$nic->{addrs}}) { + print " IP: ", $addr->{addr}, "\n"; + } + print "\n"; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/examples/dom-stats.pl new/Sys-Virt-4.1.0/examples/dom-stats.pl --- old/Sys-Virt-3.9.1/examples/dom-stats.pl 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/examples/dom-stats.pl 2018-02-07 18:44:46.000000000 +0100 @@ -20,10 +20,7 @@ \@doms, Sys::Virt::Domain::GET_ALL_STATS_ENFORCE_STATS); -use Data::Dumper; - -print Dumper(\@stats); - -for (my $i = 0 ; $i <= $#stats ; $i++) { - print $stats[$i]->{'dom'}->get_name(), ": ", $stats[$i]->{'data'}->{'state.state'}, "\n"; +foreach my $stats (@stats) { + print "Guest ", $stats->{'dom'}->get_name(), "\n"; + print " State: ", $stats->{'data'}->{'state.state'}, "\n"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/examples/node-info.pl new/Sys-Virt-4.1.0/examples/node-info.pl --- old/Sys-Virt-3.9.1/examples/node-info.pl 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/examples/node-info.pl 2018-02-07 18:44:46.000000000 +0100 @@ -13,13 +13,25 @@ my @models = $hv->get_cpu_model_names($info->{model}); -print join ("\n", sort{ lc $a cmp lc $b } @models), "\n"; - -my @info = $hv->get_node_free_pages([2048], 0, 0); - -use Data::Dumper; -print Dumper(\@info); +print "Available CPU model names:\n"; +print join ("\n", map { " " . $_ } sort{ lc $a cmp lc $b } @models), "\n"; +my @pagesizes = ( + 4, 2048, 1048576 + ); + +my @info = $hv->get_node_free_pages(\@pagesizes, 0, 0); + +print "Free pages per NUMA node:\n"; +foreach my $info (@info) { + print " Node: ", $info->{cell}, "\n"; + print " Free: "; + for (my $i = 0; $i <= $#pagesizes; $i++) { + my $pagesize = $pagesizes[$i]; + printf "%d @ %d KB, ", $info->{pages}->{$pagesize}, $pagesize; + } + print "\n"; +} my $xml = $hv->get_domain_capabilities(undef, "x86_64", undef, "kvm"); print $xml; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Domain.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Domain.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Domain.pm 2017-11-03 18:08:39.000000000 +0100 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Domain.pm 2018-02-06 16:55:25.000000000 +0100 @@ -45,7 +45,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::Domain::_lookup_by_name($con, $params{name}); @@ -490,7 +490,7 @@ =item C<details> -Currently unsed, always 0. +Currently unused, always 0. =item C<stateTime> @@ -658,7 +658,7 @@ =item $dom->detach_device($xml[, $flags]) -Hotunplug a existing device whose configuration is given by C<$xml>, +Hotunplug an existing device whose configuration is given by C<$xml>, from the running guest. The optional <$flags> parameter defaults to 0, but can accept one of the device hotplug flags described later. @@ -1719,7 +1719,7 @@ Abort the current job that is executing for the block device associated with C<$path> -=item $dom->block_pull($path, $bandwith, $flags=0) +=item $dom->block_pull($path, $bandwidth, $flags=0) Merge the backing files associated with C<$path> into the top level file. The C<$bandwidth> parameter specifies the @@ -1735,7 +1735,7 @@ =back -=item $dom->block_rebase($path, $base, $bandwith, $flags=0) +=item $dom->block_rebase($path, $base, $bandwidth, $flags=0) Switch the backing path associated with C<$path> to instead use C<$base>. The C<$bandwidth> parameter specifies the @@ -1774,7 +1774,7 @@ =back -=item $dom->block_commit($path, $base, $top, $bandwith, $flags=0) +=item $dom->block_commit($path, $base, $top, $bandwidth, $flags=0) Commit changes there were made to the temporary top level file C<$top>. Takes all the differences between C<$top> and C<$base> and merge them @@ -3827,7 +3827,7 @@ =item Sys::Virt::Domain::DISK_ERROR_UNSPEC -An unspecified error has ocurred. +An unspecified error has occurred. =back diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Error.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Error.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Error.pm 2017-08-14 12:28:10.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Error.pm 2018-02-07 18:44:46.000000000 +0100 @@ -812,6 +812,10 @@ The libSSH operation failed +=item Sys::Virt::Error::ERR_DEVICE_MISSING + +Libvirt fail to find the desired device. + =back =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Interface.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Interface.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Interface.pm 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Interface.pm 2018-01-15 18:38:18.000000000 +0100 @@ -45,7 +45,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::Interface::_lookup_by_name($con, $params{name}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/NWFilter.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/NWFilter.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/NWFilter.pm 2016-10-26 12:35:34.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/NWFilter.pm 2018-01-15 18:38:18.000000000 +0100 @@ -45,7 +45,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::NWFilter::_lookup_by_name($con, $params{name}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Network.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Network.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Network.pm 2017-01-09 18:11:21.000000000 +0100 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Network.pm 2018-01-15 18:38:18.000000000 +0100 @@ -45,7 +45,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::Network::_lookup_by_name($con, $params{name}); @@ -363,7 +363,7 @@ The following constants allow network lifecycle change events to be interpreted. The events contain both a state change, and a -reason though the reason is currently unsed. +reason though the reason is currently unused. =over 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/NodeDevice.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/NodeDevice.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/NodeDevice.pm 2017-05-30 13:17:12.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/NodeDevice.pm 2018-01-15 18:38:18.000000000 +0100 @@ -47,7 +47,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::NodeDevice::_lookup_by_name($con, $params{name}); @@ -201,7 +201,7 @@ The following constants allow node device lifecycle change events to be interpreted. The events contain both a state change, and a -reason though the reason is currently unsed. +reason though the reason is currently unused. =over 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Secret.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Secret.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Secret.pm 2017-01-09 18:11:56.000000000 +0100 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Secret.pm 2018-01-15 18:38:18.000000000 +0100 @@ -45,7 +45,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{usageID} || exists $params{usageType}) { @@ -200,7 +200,7 @@ The following constants allow secret lifecycle change events to be interpreted. The events contain both a state change, and a -reason though the reason is currently unsed. +reason though the reason is currently unused. =over 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/StoragePool.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/StoragePool.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/StoragePool.pm 2017-09-20 17:01:51.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/StoragePool.pm 2018-02-09 14:56:58.000000000 +0100 @@ -47,7 +47,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self; if (exists $params{name}) { $self = Sys::Virt::StoragePool::_lookup_by_name($con, $params{name}); @@ -62,6 +62,8 @@ } } elsif (exists $params{volume}) { $self = Sys::Virt::StoragePool::_lookup_by_volume($params{volume}); + } elsif (exists $params{target_path}) { + $self = Sys::Virt::StoragePool::_lookup_by_target_path($con, $params{target_path}); } elsif (exists $params{xml}) { if ($params{nocreate}) { $self = Sys::Virt::StoragePool::_define_xml($con, $params{xml}); @@ -115,14 +117,11 @@ Remove the configuration associated with a storage pool previously defined with the C<define_storage pool> method in L<Sys::Virt>. If the storage pool is -running, you probably want to use the C<shutdown> or C<destroy> -methods instead. +running, you probably want to use the C<destroy> method instead. =item $pool->destroy() -Immediately terminate the machine, and remove it from the virtual -machine monitor. The C<$pool> handle is invalid after this call -completes and should not be used again. +Immediately stop the storage pool. =item $flag = $pool->get_autostart(); @@ -499,7 +498,7 @@ The following constants allow storage pool lifecycle change events to be interpreted. The events contain both a state change, and a -reason though the reason is currently unsed. +reason though the reason is currently unused. =over 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/StorageVol.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/StorageVol.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/StorageVol.pm 2017-05-30 13:14:29.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/StorageVol.pm 2018-01-15 18:38:18.000000000 +0100 @@ -48,16 +48,16 @@ my $self; if (exists $params{name}) { - my $pool = exists $params{pool} ? $params{pool} : die "pool parameter is requried"; + my $pool = exists $params{pool} ? $params{pool} : die "pool parameter is required"; $self = Sys::Virt::StorageVol::_lookup_by_name($pool, $params{name}); } elsif (exists $params{key}) { - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; $self = Sys::Virt::StorageVol::_lookup_by_key($con, $params{key}); } elsif (exists $params{path}) { - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; $self = Sys::Virt::StorageVol::_lookup_by_path($con, $params{path}); } elsif (exists $params{xml}) { - my $pool = exists $params{pool} ? $params{pool} : die "pool parameter is requried"; + my $pool = exists $params{pool} ? $params{pool} : die "pool parameter is required"; if ($params{clone}) { $self = Sys::Virt::StorageVol::_create_xml_from($pool, $params{xml}, $params{clone}, 0); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt/Stream.pm new/Sys-Virt-4.1.0/lib/Sys/Virt/Stream.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt/Stream.pm 2017-05-30 13:14:29.000000000 +0200 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt/Stream.pm 2018-01-15 18:38:18.000000000 +0100 @@ -44,7 +44,7 @@ my $class = ref($proto) || $proto; my %params = @_; - my $con = exists $params{connection} ? $params{connection} : die "connection parameter is requried"; + my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required"; my $self = Sys::Virt::Stream::_new_obj($con, $params{flags}); bless $self, $class; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/lib/Sys/Virt.pm new/Sys-Virt-4.1.0/lib/Sys/Virt.pm --- old/Sys-Virt-3.9.1/lib/Sys/Virt.pm 2017-12-05 12:42:04.000000000 +0100 +++ new/Sys-Virt-4.1.0/lib/Sys/Virt.pm 2018-02-09 14:57:48.000000000 +0100 @@ -78,7 +78,7 @@ use Sys::Virt::DomainSnapshot; use Sys::Virt::Stream; -our $VERSION = '3.9.1'; +our $VERSION = '4.1.0'; require XSLoader; XSLoader::load('Sys::Virt', $VERSION); @@ -135,7 +135,7 @@ this module can be used as values in this list. The C<callback> parameter should be a subroutine reference containing the code necessary to gather the credentials. When invoked it -will be supplied with a single parameter, a array reference +will be supplied with a single parameter, an array reference of requested credentials. The elements of the array are hash references, with keys C<type> giving the type of credential, C<prompt> giving a user descriptive user @@ -999,6 +999,21 @@ } +=item my $pool = $vmm->get_storage_pool_by_target_path($path) + +Return the storage pool with a target path of C<$path>. The returned object is +an instance of the L<Sys::Virt::StoragePool> class. + +=cut + +sub get_storage_pool_by_target_path { + my $self = shift; + my $path = shift; + + return Sys::Virt::StoragePool->_new(connection => $self, target_path => $path); +} + + =item my $vol = $vmm->get_storage_volume_by_path($path) Return the storage volume with a location of C<$path>. The returned object is @@ -1164,7 +1179,7 @@ =item my @stats = $vmm->get_all_domain_stats($stats, \@doms=undef, $flags=0); -Get an list of all statistics for domains known to the hypervisor. +Get a list of all statistics for domains known to the hypervisor. The C<$stats> parameter controls which data fields to return and should be a combination of the DOMAIN STATS FIELD CONSTANTS. @@ -1469,7 +1484,7 @@ =item $conn->domain_event_register($callback) -Register a callback to received notificaitons of domain state change +Register a callback to received notifications of domain state change events. Only a single callback can be registered with each connection instance. The callback will be invoked with four parameters, an instance of C<Sys::Virt> for the connection, an instance of C<Sys::Virt::Domain> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-3.9.1/perl-Sys-Virt.spec new/Sys-Virt-4.1.0/perl-Sys-Virt.spec --- old/Sys-Virt-3.9.1/perl-Sys-Virt.spec 2017-12-05 12:43:24.000000000 +0100 +++ new/Sys-Virt-4.1.0/perl-Sys-Virt.spec 2018-03-05 15:44:57.000000000 +0100 @@ -1,7 +1,7 @@ # Automatically generated by perl-Sys-Virt.spec.PL Name: perl-Sys-Virt -Version: 3.9.1 +Version: 4.1.0 Release: 1%{?dist}%{?extra_release} Summary: Represent and manage a libvirt hypervisor connection License: GPLv2+ or Artistic ++++++ suse-set-migration-constraints.patch ++++++ --- /var/tmp/diff_new_pack.l0wtJm/_old 2018-03-09 10:43:45.840798332 +0100 +++ /var/tmp/diff_new_pack.l0wtJm/_new 2018-03-09 10:43:45.840798332 +0100 @@ -2,11 +2,11 @@ References: fate#316614, bsc#859868 -Index: Sys-Virt-3.9.1/Virt.xs +Index: Sys-Virt-4.1.0/Virt.xs =================================================================== ---- Sys-Virt-3.9.1.orig/Virt.xs -+++ Sys-Virt-3.9.1/Virt.xs -@@ -5167,7 +5167,7 @@ _migrate(dom, destcon, newparams, flags= +--- Sys-Virt-4.1.0.orig/Virt.xs ++++ Sys-Virt-4.1.0/Virt.xs +@@ -5166,7 +5166,7 @@ _migrate(dom, destcon, newparams, flags= virTypedParameterPtr params; int nparams; CODE: @@ -15,7 +15,7 @@ Newx(params, nparams, virTypedParameter); strncpy(params[0].field, VIR_MIGRATE_PARAM_URI, -@@ -5230,6 +5230,22 @@ _migrate(dom, destcon, newparams, flags= +@@ -5229,6 +5229,22 @@ _migrate(dom, destcon, newparams, flags= VIR_TYPED_PARAM_FIELD_LENGTH); params[14].type = VIR_TYPED_PARAM_INT; @@ -38,7 +38,7 @@ nparams = vir_typed_param_from_hv(newparams, params, nparams); vir_typed_param_add_string_list_from_hv(newparams, ¶ms, &nparams, -@@ -5258,7 +5274,7 @@ _migrate_to_uri(dom, desturi, newparams, +@@ -5257,7 +5273,7 @@ _migrate_to_uri(dom, desturi, newparams, virTypedParameterPtr params; int nparams; PPCODE: @@ -47,7 +47,7 @@ Newx(params, nparams, virTypedParameter); strncpy(params[0].field, VIR_MIGRATE_PARAM_URI, -@@ -5321,6 +5337,22 @@ _migrate_to_uri(dom, desturi, newparams, +@@ -5320,6 +5336,22 @@ _migrate_to_uri(dom, desturi, newparams, VIR_TYPED_PARAM_FIELD_LENGTH); params[14].type = VIR_TYPED_PARAM_INT; @@ -70,7 +70,7 @@ nparams = vir_typed_param_from_hv(newparams, params, nparams); vir_typed_param_add_string_list_from_hv(newparams, ¶ms, &nparams, -@@ -8514,6 +8546,10 @@ BOOT: +@@ -8524,6 +8556,10 @@ BOOT: REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_PERSIST_XML, MIGRATE_PARAM_PERSIST_XML); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL, MIGRATE_PARAM_AUTO_CONVERGE_INITIAL); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT); @@ -81,10 +81,10 @@ REGISTER_CONSTANT(VIR_DOMAIN_XML_SECURE, XML_SECURE); REGISTER_CONSTANT(VIR_DOMAIN_XML_INACTIVE, XML_INACTIVE); -Index: Sys-Virt-3.9.1/lib/Sys/Virt/Domain.pm +Index: Sys-Virt-4.1.0/lib/Sys/Virt/Domain.pm =================================================================== ---- Sys-Virt-3.9.1.orig/lib/Sys/Virt/Domain.pm -+++ Sys-Virt-3.9.1/lib/Sys/Virt/Domain.pm +--- Sys-Virt-4.1.0.orig/lib/Sys/Virt/Domain.pm ++++ Sys-Virt-4.1.0/lib/Sys/Virt/Domain.pm @@ -1111,6 +1111,22 @@ The initial percentage to throttle guest The additional percentage step size to throttle guest vCPUs if progress is not made
