Hello community, here is the log from the commit of package perl-Sys-Virt for openSUSE:Factory checked in at 2014-10-11 19:26:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Sys-Virt (Old) and /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Sys-Virt" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Sys-Virt/perl-Sys-Virt.changes 2014-09-18 08:02:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Sys-Virt.new/perl-Sys-Virt.changes 2014-10-11 19:27:17.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Oct 2 09:08:59 MDT 2014 - [email protected] + +- Update to 1.2.9 + - Add all new APIs and constants in libvirt 1.2.9 + +------------------------------------------------------------------- Old: ---- Sys-Virt-1.2.8.tar.gz New: ---- Sys-Virt-1.2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Sys-Virt.spec ++++++ --- /var/tmp/diff_new_pack.YVgI4l/_old 2014-10-11 19:27:17.000000000 +0200 +++ /var/tmp/diff_new_pack.YVgI4l/_new 2014-10-11 19:27:17.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Sys-Virt -Version: 1.2.8 +Version: 1.2.9 Release: 0 %define cpan_name Sys-Virt Summary: Represent and manage a libvirt hypervisor connection ++++++ Sys-Virt-1.2.8.tar.gz -> Sys-Virt-1.2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/Changes new/Sys-Virt-1.2.9/Changes --- old/Sys-Virt-1.2.8/Changes 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/Changes 2014-10-02 12:30:10.000000000 +0200 @@ -1,5 +1,18 @@ Revision history for perl module Sys::Virt +1.2.9 2014-10-02 + + - Add VIR_DOMAIN_*_BANDWIDTH_BYTES constants + - Add VIR_DOMAIN_BLOCK_REBASE_COPY_DEV constant + - Add VIR_DOMAIN_JOB_STATS_COMPLETED constant + - Add VIR_DOMAIN_UNDEFINE_NVRAM constant + - Add VIR_FROM_POLKIT constant + - Add more VIR_DOMAIN_STATS_* constants + - Add more VIR_DOMAIN_JOB_* constants + - Add virConnectDomainEventTunable event callback & constants + - Add virNodeAllocPages API & constants + - Add VIR_MIGRATE_RDMA_PIN_ALL constant + 1.2.8 2014-09-05 - Add virConnectGetDomainCapabilities API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/MANIFEST new/Sys-Virt-1.2.9/MANIFEST --- old/Sys-Virt-1.2.8/MANIFEST 2014-09-05 17:24:39.000000000 +0200 +++ new/Sys-Virt-1.2.9/MANIFEST 2014-10-02 12:30:22.000000000 +0200 @@ -3,12 +3,14 @@ examples/auth.pl examples/devices.pl examples/dhcp-leases.pl +examples/dom-stats.pl examples/dump-info.pl examples/dump-xml.pl examples/emulator-pin.pl examples/events.pl examples/fs-freeze.pl examples/hv-stat.pl +examples/node-alloc.pl examples/node-cpu.pl examples/node-devlist.pl examples/node-info.pl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/META.yml new/Sys-Virt-1.2.9/META.yml --- old/Sys-Virt-1.2.8/META.yml 2014-09-05 17:24:39.000000000 +0200 +++ new/Sys-Virt-1.2.9/META.yml 2014-10-02 12:30:22.000000000 +0200 @@ -1,7 +1,7 @@ --- #YAML:1.0 name: Sys-Virt abstract: Extension for the libvirt library -version: 1.2.8 +version: 1.2.9 author: - Daniel P. Berrange <[email protected]> license: perl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/MYMETA.json new/Sys-Virt-1.2.9/MYMETA.json --- old/Sys-Virt-1.2.8/MYMETA.json 2014-09-05 17:24:32.000000000 +0200 +++ new/Sys-Virt-1.2.9/MYMETA.json 2014-10-02 12:30:14.000000000 +0200 @@ -42,5 +42,5 @@ } }, "release_status" : "stable", - "version" : "v1.2.8" + "version" : "v1.2.9" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/MYMETA.yml new/Sys-Virt-1.2.9/MYMETA.yml --- old/Sys-Virt-1.2.8/MYMETA.yml 2014-09-05 17:24:32.000000000 +0200 +++ new/Sys-Virt-1.2.9/MYMETA.yml 2014-10-02 12:30:14.000000000 +0200 @@ -24,4 +24,4 @@ Test::Pod::Coverage: 0 Time::HiRes: 0 XML::XPath: 0 -version: v1.2.8 +version: v1.2.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/Makefile.PL new/Sys-Virt-1.2.9/Makefile.PL --- old/Sys-Virt-1.2.8/Makefile.PL 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/Makefile.PL 2014-10-02 12:30:10.000000000 +0200 @@ -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 = "1.2.7"; +my $libvirtver = "1.2.9"; 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-1.2.8/README new/Sys-Virt-1.2.9/README --- old/Sys-Virt-1.2.8/README 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/README 2014-10-02 12:30:10.000000000 +0200 @@ -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 1.2.7 +The current minimum required version of libvirt is 1.2.9 -- End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/Virt.xs new/Sys-Virt-1.2.9/Virt.xs --- old/Sys-Virt-1.2.8/Virt.xs 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/Virt.xs 2014-10-02 12:30:10.000000000 +0200 @@ -158,6 +158,120 @@ #define REGISTER_CONSTANT_STR(name, key) _populate_constant_str(stash, #key, name) #define REGISTER_CONSTANT_ULL(name, key) _populate_constant_ull(stash, #key, name) +static HV * +vir_typed_param_to_hv(virTypedParameter *params, int nparams) +{ + HV *ret = (HV *)sv_2mortal((SV*)newHV()); + unsigned int i; + const char *field; + STRLEN val_length; + + for (i = 0 ; i < nparams ; i++) { + SV *val = NULL; + + switch (params[i].type) { + case VIR_TYPED_PARAM_INT: + val = newSViv(params[i].value.i); + break; + + case VIR_TYPED_PARAM_UINT: + val = newSViv((int)params[i].value.ui); + break; + + case VIR_TYPED_PARAM_LLONG: + val = virt_newSVll(params[i].value.l); + break; + + case VIR_TYPED_PARAM_ULLONG: + val = virt_newSVull(params[i].value.ul); + break; + + case VIR_TYPED_PARAM_DOUBLE: + val = newSVnv(params[i].value.d); + break; + + case VIR_TYPED_PARAM_BOOLEAN: + val = newSViv(params[i].value.b); + break; + + case VIR_TYPED_PARAM_STRING: + val_length = strlen(params[i].value.s); + val = newSVpv(params[i].value.s, val_length); + break; + + } + + field = params[i].field; + (void)hv_store(ret, field, strlen(params[i].field), val, 0); + } + + return ret; +} + + +static int +vir_typed_param_from_hv(HV *newparams, virTypedParameter *params, int nparams) +{ + unsigned int i; + char * ptr; + STRLEN len; + + /* 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 ;) { + 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))); + nparams--; + continue; + } + + i++; + } + + for (i = 0 ; i < nparams ; i++) { + SV **val; + + val = hv_fetch (newparams, params[i].field, strlen(params[i].field), 0); + + switch (params[i].type) { + case VIR_TYPED_PARAM_INT: + params[i].value.i = SvIV(*val); + break; + + case VIR_TYPED_PARAM_UINT: + params[i].value.ui = SvIV(*val); + break; + + case VIR_TYPED_PARAM_LLONG: + params[i].value.l = virt_SvIVll(*val); + break; + + case VIR_TYPED_PARAM_ULLONG: + params[i].value.ul = virt_SvIVull(*val); + break; + + case VIR_TYPED_PARAM_DOUBLE: + params[i].value.d = SvNV(*val); + break; + + case VIR_TYPED_PARAM_BOOLEAN: + params[i].value.b = SvIV(*val); + break; + + case VIR_TYPED_PARAM_STRING: + ptr = SvPV(*val, len); + params[i].value.s = (char *)ptr; + break; + } + } + + return nparams; +} + + static int _domain_event_lifecycle_callback(virConnectPtr con, virDomainPtr dom, @@ -782,6 +896,49 @@ static int +_domain_event_tunable_callback(virConnectPtr con, + virDomainPtr dom, + virTypedParameterPtr params, + size_t nparams, + void *opaque) +{ + AV *data = opaque; + SV **self; + SV **cb; + HV *params_hv; + 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); + + params_hv = vir_typed_param_to_hv(params, nparams); + + XPUSHs(domref); + XPUSHs(newRV(( SV*)params_hv)); + PUTBACK; + + call_sv(*cb, G_DISCARD); + + FREETMPS; + LEAVE; + + return 0; +} + + +static int _network_event_lifecycle_callback(virConnectPtr con, virNetworkPtr net, int event, @@ -1358,120 +1515,6 @@ } -static HV * -vir_typed_param_to_hv(virTypedParameter *params, int nparams) -{ - HV *ret = (HV *)sv_2mortal((SV*)newHV()); - unsigned int i; - const char *field; - STRLEN val_length; - - for (i = 0 ; i < nparams ; i++) { - SV *val = NULL; - - switch (params[i].type) { - case VIR_TYPED_PARAM_INT: - val = newSViv(params[i].value.i); - break; - - case VIR_TYPED_PARAM_UINT: - val = newSViv((int)params[i].value.ui); - break; - - case VIR_TYPED_PARAM_LLONG: - val = virt_newSVll(params[i].value.l); - break; - - case VIR_TYPED_PARAM_ULLONG: - val = virt_newSVull(params[i].value.ul); - break; - - case VIR_TYPED_PARAM_DOUBLE: - val = newSVnv(params[i].value.d); - break; - - case VIR_TYPED_PARAM_BOOLEAN: - val = newSViv(params[i].value.b); - break; - - case VIR_TYPED_PARAM_STRING: - val_length = strlen(params[i].value.s); - val = newSVpv(params[i].value.s, val_length); - break; - - } - - field = params[i].field; - (void)hv_store(ret, field, strlen(params[i].field), val, 0); - } - - return ret; -} - - -static int -vir_typed_param_from_hv(HV *newparams, virTypedParameter *params, int nparams) -{ - unsigned int i; - char * ptr; - STRLEN len; - - /* 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 ;) { - 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))); - nparams--; - continue; - } - - i++; - } - - for (i = 0 ; i < nparams ; i++) { - SV **val; - - val = hv_fetch (newparams, params[i].field, strlen(params[i].field), 0); - - switch (params[i].type) { - case VIR_TYPED_PARAM_INT: - params[i].value.i = SvIV(*val); - break; - - case VIR_TYPED_PARAM_UINT: - params[i].value.ui = SvIV(*val); - break; - - case VIR_TYPED_PARAM_LLONG: - params[i].value.l = virt_SvIVll(*val); - break; - - case VIR_TYPED_PARAM_ULLONG: - params[i].value.ul = virt_SvIVull(*val); - break; - - case VIR_TYPED_PARAM_DOUBLE: - params[i].value.d = SvNV(*val); - break; - - case VIR_TYPED_PARAM_BOOLEAN: - params[i].value.b = SvIV(*val); - break; - - case VIR_TYPED_PARAM_STRING: - ptr = SvPV(*val, len); - params[i].value.s = (char *)ptr; - break; - } - } - - return nparams; -} - - MODULE = Sys::Virt PACKAGE = Sys::Virt PROTOTYPES: ENABLE @@ -1831,6 +1874,47 @@ Safefree(counts); Safefree(pages); +void +node_alloc_pages(con, pages, start, end, flags=0) + virConnectPtr con; + SV *pages; + int start; + int end; + unsigned int flags; +PREINIT: + AV *pageslist; + unsigned int npages; + unsigned int *pagesizes; + unsigned long long *pagecounts; + unsigned int ncells; + unsigned int i; + PPCODE: + ncells = (end - start) + 1; + pageslist = (AV *)SvRV(pages); + npages = av_len(pageslist) + 1; + + Newx(pagesizes, npages, unsigned int); + Newx(pagecounts, npages, unsigned long long); + for (i = 0; i < npages; i++) { + SV **pageinforv = av_fetch(pageslist, i, 0); + AV *pageinfo = (AV*)SvRV(*pageinforv); + SV **pagesize = av_fetch(pageinfo, 0, 0); + SV **pagecount = av_fetch(pageinfo, 1, 0); + + pagesizes[i] = SvIV(*pagesize); + pagecounts[i] = virt_SvIVull(*pagecount); + } + + if (virNodeAllocPages(con, npages, pagesizes, pagecounts, + start, ncells, flags) < 0) { + Safefree(pagesizes); + Safefree(pagecounts); + _croak_error(); + } + + Safefree(pagesizes); + Safefree(pagecounts); + HV * get_node_cpu_stats(con, cpuNum=VIR_NODE_CPU_STATS_ALL_CPUS, flags=0) @@ -2821,6 +2905,9 @@ case VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED: callback = VIR_DOMAIN_EVENT_CALLBACK(_domain_event_device_removed_callback); break; + case VIR_DOMAIN_EVENT_ID_TUNABLE: + callback = VIR_DOMAIN_EVENT_CALLBACK(_domain_event_tunable_callback); + break; default: callback = VIR_DOMAIN_EVENT_CALLBACK(_domain_event_generic_callback); break; @@ -6984,6 +7071,9 @@ REGISTER_CONSTANT(VIR_IP_ADDR_TYPE_IPV4, IP_ADDR_TYPE_IPV4); REGISTER_CONSTANT(VIR_IP_ADDR_TYPE_IPV6, IP_ADDR_TYPE_IPV6); + REGISTER_CONSTANT(VIR_NODE_ALLOC_PAGES_ADD, NODE_ALLOC_PAGES_ADD); + REGISTER_CONSTANT(VIR_NODE_ALLOC_PAGES_SET, NODE_ALLOC_PAGES_SET); + stash = gv_stashpv( "Sys::Virt::Event", TRUE ); REGISTER_CONSTANT(VIR_EVENT_HANDLE_READABLE, HANDLE_READABLE); @@ -7014,6 +7104,7 @@ REGISTER_CONSTANT(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE, UNDEFINE_MANAGED_SAVE); REGISTER_CONSTANT(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, UNDEFINE_SNAPSHOTS_METADATA); + REGISTER_CONSTANT(VIR_DOMAIN_UNDEFINE_NVRAM, UNDEFINE_NVRAM); REGISTER_CONSTANT(VIR_DOMAIN_START_PAUSED, START_PAUSED); REGISTER_CONSTANT(VIR_DOMAIN_START_AUTODESTROY, START_AUTODESTROY); @@ -7106,6 +7197,7 @@ REGISTER_CONSTANT(VIR_MIGRATE_COMPRESSED, MIGRATE_COMPRESSED); REGISTER_CONSTANT(VIR_MIGRATE_ABORT_ON_ERROR, MIGRATE_ABORT_ON_ERROR); REGISTER_CONSTANT(VIR_MIGRATE_AUTO_CONVERGE, MIGRATE_AUTO_CONVERGE); + REGISTER_CONSTANT(VIR_MIGRATE_RDMA_PIN_ALL, MIGRATE_RDMA_PIN_ALL); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_BANDWIDTH, MIGRATE_PARAM_BANDWIDTH); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_DEST_NAME, MIGRATE_PARAM_DEST_NAME); @@ -7140,7 +7232,12 @@ REGISTER_CONSTANT(VIR_KEYCODE_SET_WIN32, KEYCODE_SET_WIN32); REGISTER_CONSTANT(VIR_KEYCODE_SET_RFB, KEYCODE_SET_RFB); + REGISTER_CONSTANT(VIR_DOMAIN_STATS_BALLOON, STATS_BALLOON); + REGISTER_CONSTANT(VIR_DOMAIN_STATS_BLOCK, STATS_BLOCK); + REGISTER_CONSTANT(VIR_DOMAIN_STATS_CPU_TOTAL, STATS_CPU_TOTAL); + REGISTER_CONSTANT(VIR_DOMAIN_STATS_INTERFACE, STATS_INTERFACE); REGISTER_CONSTANT(VIR_DOMAIN_STATS_STATE, STATS_STATE); + REGISTER_CONSTANT(VIR_DOMAIN_STATS_VCPU, STATS_VCPU); REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE, GET_ALL_STATS_ACTIVE); REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE, GET_ALL_STATS_INACTIVE); @@ -7231,6 +7328,8 @@ REGISTER_CONSTANT(VIR_DOMAIN_JOB_FAILED, JOB_FAILED); REGISTER_CONSTANT(VIR_DOMAIN_JOB_CANCELLED, JOB_CANCELLED); + REGISTER_CONSTANT(VIR_DOMAIN_JOB_STATS_COMPLETED, JOB_STATS_COMPLETED); + REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_COMPRESSION_BYTES, JOB_COMPRESSION_BYTES); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_COMPRESSION_CACHE, JOB_COMPRESSION_CACHE); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_COMPRESSION_CACHE_MISSES, JOB_COMPRESSION_CACHE_MISSES); @@ -7242,6 +7341,7 @@ REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_DISK_PROCESSED, JOB_DISK_PROCESSED); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_DISK_REMAINING, JOB_DISK_REMAINING); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_DISK_TOTAL, JOB_DISK_TOTAL); + REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_DISK_BPS, JOB_DISK_BPS); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_DOWNTIME, JOB_DOWNTIME); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_CONSTANT, JOB_MEMORY_CONSTANT); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_NORMAL, JOB_MEMORY_NORMAL); @@ -7249,6 +7349,8 @@ REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_PROCESSED, JOB_MEMORY_PROCESSED); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_REMAINING, JOB_MEMORY_REMAINING); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_TOTAL, JOB_MEMORY_TOTAL); + REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_MEMORY_BPS, JOB_MEMORY_BPS); + REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_SETUP_TIME, JOB_SETUP_TIME); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_TIME_ELAPSED, JOB_TIME_ELAPSED); REGISTER_CONSTANT_STR(VIR_DOMAIN_JOB_TIME_REMAINING, JOB_TIME_REMAINING); @@ -7267,6 +7369,7 @@ REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW, BLOCK_COMMIT_SHALLOW); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_ACTIVE, BLOCK_COMMIT_ACTIVE); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_RELATIVE, BLOCK_COMMIT_RELATIVE); + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES, BLOCK_COMMIT_BANDWIDTH_BYTES); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_LIFECYCLE, EVENT_ID_LIFECYCLE); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_REBOOT, EVENT_ID_REBOOT); @@ -7285,6 +7388,7 @@ REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, EVENT_ID_TRAY_CHANGE); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, EVENT_ID_BALLOON_CHANGE); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, EVENT_ID_DEVICE_REMOVED); + REGISTER_CONSTANT(VIR_DOMAIN_EVENT_ID_TUNABLE, EVENT_ID_TUNABLE); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_WATCHDOG_NONE, EVENT_WATCHDOG_NONE); REGISTER_CONSTANT(VIR_DOMAIN_EVENT_WATCHDOG_PAUSE, EVENT_WATCHDOG_PAUSE); @@ -7485,7 +7589,9 @@ REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT, BLOCK_REBASE_REUSE_EXT); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_COPY_RAW, BLOCK_REBASE_COPY_RAW); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_COPY, BLOCK_REBASE_COPY); + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_COPY_DEV, BLOCK_REBASE_COPY_DEV); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_RELATIVE, BLOCK_REBASE_RELATIVE); + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES, BLOCK_REBASE_BANDWIDTH_BYTES); REGISTER_CONSTANT_STR(VIR_DOMAIN_BLOCK_COPY_BANDWIDTH, BLOCK_COPY_BANDWIDTH); REGISTER_CONSTANT_STR(VIR_DOMAIN_BLOCK_COPY_GRANULARITY, BLOCK_COPY_GRANULARITY); @@ -7494,6 +7600,11 @@ REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COPY_REUSE_EXT, BLOCK_COPY_REUSE_EXT); REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_COPY_SHALLOW, BLOCK_COPY_SHALLOW); + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES, BLOCK_JOB_SPEED_BANDWIDTH_BYTES); + + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES, BLOCK_PULL_BANDWIDTH_BYTES); + + REGISTER_CONSTANT(VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES, BLOCK_JOB_INFO_BANDWIDTH_BYTES); REGISTER_CONSTANT(VIR_CONNECT_LIST_DOMAINS_ACTIVE, LIST_ACTIVE); REGISTER_CONSTANT(VIR_CONNECT_LIST_DOMAINS_AUTOSTART, LIST_AUTOSTART); @@ -7519,6 +7630,21 @@ REGISTER_CONSTANT(VIR_DOMAIN_TIME_SYNC, TIME_SYNC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_CPU_SHARES, TUNABLE_CPU_CPU_SHARES); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_EMULATORPIN, TUNABLE_CPU_EMULATORPIN); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_EMULATOR_PERIOD, TUNABLE_CPU_EMULATOR_PERIOD); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA, TUNABLE_CPU_EMULATOR_QUOTA); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_VCPUPIN, TUNABLE_CPU_VCPUPIN); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_VCPU_PERIOD, TUNABLE_CPU_VCPU_PERIOD); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_CPU_VCPU_QUOTA, TUNABLE_CPU_VCPU_QUOTA); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_DISK, TUNABLE_BLKDEV_DISK); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC, TUNABLE_BLKDEV_READ_BYTES_SEC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC, TUNABLE_BLKDEV_READ_IOPS_SEC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC, TUNABLE_BLKDEV_TOTAL_BYTES_SEC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC, TUNABLE_BLKDEV_TOTAL_IOPS_SEC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC, TUNABLE_BLKDEV_WRITE_BYTES_SEC); + REGISTER_CONSTANT_STR(VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC, TUNABLE_BLKDEV_WRITE_IOPS_SEC); + stash = gv_stashpv( "Sys::Virt::DomainSnapshot", TRUE ); REGISTER_CONSTANT(VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN, DELETE_CHILDREN); REGISTER_CONSTANT(VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY, DELETE_METADATA_ONLY); @@ -7772,6 +7898,7 @@ REGISTER_CONSTANT(VIR_FROM_BHYVE, FROM_BHYVE); REGISTER_CONSTANT(VIR_FROM_CRYPTO, FROM_CRYPTO); REGISTER_CONSTANT(VIR_FROM_FIREWALL, FROM_FIREWALL); + REGISTER_CONSTANT(VIR_FROM_POLKIT, FROM_POLKIT); REGISTER_CONSTANT(VIR_ERR_OK, ERR_OK); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/examples/dom-stats.pl new/Sys-Virt-1.2.9/examples/dom-stats.pl --- old/Sys-Virt-1.2.8/examples/dom-stats.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/Sys-Virt-1.2.9/examples/dom-stats.pl 2014-10-02 12:30:10.000000000 +0200 @@ -0,0 +1,29 @@ +#!/usr/bin/perl + + +use strict; +use warnings; + +use Sys::Virt; +use Sys::Virt::Domain; + +my $uri = @ARGV ? shift @ARGV : undef; + +my $c = Sys::Virt->new(uri => $uri); + +my @doms; +foreach my $name (@ARGV) { + push @doms, $c->get_domain_by_name($name); +} + +my @stats = $c->get_all_domain_stats(Sys::Virt::Domain::STATS_STATE, + \@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"; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/examples/node-alloc.pl new/Sys-Virt-1.2.9/examples/node-alloc.pl --- old/Sys-Virt-1.2.8/examples/node-alloc.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/Sys-Virt-1.2.9/examples/node-alloc.pl 2014-10-02 12:30:10.000000000 +0200 @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use Sys::Virt; + +if (int(@ARGV) < 2) { + die "syntax: $0 URI PAGESIZE=1COUNT1 PAGESIZE2=COUNT2..."; +} + +my $uri = shift @ARGV; + +my $c = Sys::Virt->new(uri => $uri); + +my @pages; +foreach (@ARGV) { + my @bits = split /=/; + + push @pages, \@bits; +} + + +$c->node_alloc_pages(\@pages, -1, -1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/lib/Sys/Virt/Domain.pm new/Sys-Virt-1.2.9/lib/Sys/Virt/Domain.pm --- old/Sys-Virt-1.2.8/lib/Sys/Virt/Domain.pm 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/lib/Sys/Virt/Domain.pm 2014-10-02 12:30:10.000000000 +0200 @@ -1281,7 +1281,7 @@ =back -=item my ($type, $stats) = $dom->get_job_stats() +=item my ($type, $stats) = $dom->get_job_stats($flags=0) Returns an array summarising the execution state of the background job. The C<$type> value is one of the JOB TYPE @@ -1296,6 +1296,17 @@ The type of job, one of the JOB TYPE constants listed later in this document. +The C<$flags> parameter defaults to zero and can take one of +the following constants. + +=over 4 + +=item Sys::Virt::Domain::JOB_STATS_COMPLETED + +Return the stats of the most recently completed job. + +=back + =item Sys::Virt::Domain::JOB_TIME_ELAPSED The elapsed time in milliseconds @@ -1342,6 +1353,10 @@ The number of bytes transferred without any compression +=item Sys::Virt::Domain::JOB_MEMORY_BPS + +The bytes per second transferred + =item Sys::Virt::Domain::JOB_DISK_TOTAL The total amount of file expected to be processed by the job, in bytes. @@ -1354,6 +1369,10 @@ The expected amount of file remaining to be processed by the job, in bytes. +=item Sys::Virt::Domain::JOB_DISK_BPS + +The bytes per second transferred + =item Sys::Virt::Domain::JOB_COMPRESSION_CACHE The size of the compression cache in bytes @@ -1381,6 +1400,10 @@ The number of milliseconds of downtime expected during migration switchover. +=item Sys::Virt::Domain::JOB_SETUP_TIME + +The number of milliseconds of time doing setup of the job + =back =item $dom->abort_job() @@ -1391,13 +1414,32 @@ Returns a hash reference summarising the execution state of the block job. The C<$path> parameter should be the fully -qualified path of the block device being changed. +qualified path of the block device being changed. Valid +C<$flags> include: + +=over 4 + +=item Sys::Virt::Domain::BLOCK_JOB_INFO_BANDWIDTH_BYTES + +Treat bandwidth value as bytes instead of MiB. + +=back =item $dom->set_block_job_speed($path, $bandwidth, $flags=0) Change the maximum I/O bandwidth used by the block job that is currently executing for C<$path>. The C<$bandwidth> argument -is specified in MB/s +is specified in MB/s. The C<$flags> parameter +can take the bitwise union of the values: + +=over 4 + +=item Sys::Virt::Domain::BLOCK_JOB_SPEED_BANDWIDTH_BYTES + +The C<$bandwidth> parameter value is measured in bytes/s +instead of MB/s. + +=back =item $dom->abort_block_job($path, $flags=0) @@ -1408,13 +1450,33 @@ Merge the backing files associated with C<$path> into the top level file. The C<$bandwidth> parameter specifies the -maximum I/O rate to allow in MB/s. +maximum I/O rate to allow in MB/s. The C<$flags> parameter +can take the bitwise union of the values: + +=over 4 + +=item Sys::Virt::Domain::BLOCK_PULL_BANDWIDTH_BYTES + +The C<$bandwidth> parameter value is measured in bytes/s +instead of MB/s. + +=back =item $dom->block_rebase($path, $base, $bandwith, $flags=0) Switch the backing path associated with C<$path> to instead use C<$base>. The C<$bandwidth> parameter specifies the -maximum I/O rate to allow in MB/s. +maximum I/O rate to allow in MB/s. The C<$flags> parameter +can take the bitwise union of the values: + +=over 4 + +=item Sys::Virt::Domain::BLOCK_REBASE_BANDWIDTH_BYTES + +The C<$bandwidth> parameter value is measured in bytes/s +instead of MB/s. + +=back =item $dom->block_copy($path, $destxml, $params, $flags=0) @@ -1444,7 +1506,17 @@ 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 into C<$base>. The C<$bandwidth> parameter specifies the -maximum I/O rate to allow in MB/s. +maximum I/O rate to allow in MB/s. The C<$flags> parameter +can take the bitwise union of the values: + +=over 4 + +=item Sys::Virt::Domain::BLOCK_COMMIT_BANDWIDTH_BYTES + +The C<$bandwidth> parameter value is measured in bytes +instead of MB/s. + +=back =item $count = $dom->num_of_snapshots() @@ -1974,6 +2046,10 @@ Force convergance of the migration operation by throttling guest runtime +=item Sys::Virt::Domain::MIGRATE_RDMA_PIN_ALL + +Pin memory for RDMA transfer + =back =head2 UNDEFINE CONSTANTS @@ -1993,6 +2069,11 @@ Also remove any snapshot metadata when undefining the virtual domain. +=item Sys::Virt::Domain::UNDEFINE_NVRAM + +Also remove any NVRAM state file when undefining the virtual +domain. + =back =head2 JOB TYPES @@ -2540,6 +2621,13 @@ Asynchronous guest device removal +=item Sys::Virt::Domain::EVENT_ID_TUNABLE + +Changes of any domain tuning parameters. The callback +will be provided with a hash listing all changed parameters. +The later DOMAIN TUNABLE constants can be useful when accessing +the hash keys + =back =head2 IO ERROR EVENT CONSTANTS @@ -2744,6 +2832,10 @@ Start a copy job +=item Sys::Virt::Domain::BLOCK_REBASE_COPY_DEV + +Treat destination as a block device instead of file + =item Sys::Virt::Domain::BLOCK_REBASE_RELATIVE Keep backing chain referenced using relative names @@ -3240,10 +3332,30 @@ =over +=item Sys::Virt::Domain::STATS_BALLOON + +Balloon statistics + +=item Sys::Virt::Domain::STATS_BLOCK + +Block device info + +=item Sys::Virt::Domain::STATS_CPU_TOTAL + +CPU usage info + +=item Sys::Virt::Domain::STATS_INTERFACE + +Network interface info + =item Sys::Virt::Domain::STATS_STATE General lifecycle state +=item Sys::Virt::Domain::STATS_VCPU + +Virtual CPU info + =back =head2 PROCESS SIGNALS @@ -3516,6 +3628,71 @@ =back +=head2 DOMAIN TUNABLE CONSTANTS + +The following constants are useful when accessing domain +tuning parameters in APIs and events + +=over 4 + +=item Sys::Virt::Domain::TUNABLE_CPU_CPU_SHARES + +Proportional CPU weight + +=item Sys::Virt::Domain::TUNABLE_CPU_EMULATORPIN + +Emulator thread CPU pinning mask + +=item Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_PERIOD + +Emulator thread CPU period + +=item Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_QUOTA + +Emulator thread CPU quota + +=item Sys::Virt::Domain::TUNABLE_CPU_VCPUPIN + +VCPU thread pinning mask + +=item Sys::Virt::Domain::TUNABLE_CPU_VCPU_PERIOD + +VCPU thread period + +=item Sys::Virt::Domain::TUNABLE_CPU_VCPU_QUOTA + +VCPU thread quota + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_DISK + +The name of guest disks + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC + +Read throughput in bytes per sec + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC + +Read throughput in I/O operations per sec + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC + +Total throughput in bytes per sec + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC + +Total throughput in I/O operations per sec + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC + +Write throughput in bytes per sec + +=item Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC + +Write throughput in I/O operations per sec + +=back + =head1 AUTHORS Daniel P. Berrange <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/lib/Sys/Virt/Error.pm new/Sys-Virt-1.2.9/lib/Sys/Virt/Error.pm --- old/Sys-Virt-1.2.8/lib/Sys/Virt/Error.pm 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/lib/Sys/Virt/Error.pm 2014-10-02 12:30:10.000000000 +0200 @@ -374,6 +374,10 @@ The firewall helper APIs. +=item Sys::Virt::Error::FROM_POLKIT + +The polkit authentication / authorization APIs + =back =head2 ERROR CODE CONSTANTS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/lib/Sys/Virt.pm new/Sys-Virt-1.2.9/lib/Sys/Virt.pm --- old/Sys-Virt-1.2.8/lib/Sys/Virt.pm 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/lib/Sys/Virt.pm 2014-10-02 12:30:10.000000000 +0200 @@ -78,7 +78,7 @@ use Sys::Virt::DomainSnapshot; use Sys::Virt::Stream; -our $VERSION = '1.2.8'; +our $VERSION = '1.2.9'; require XSLoader; XSLoader::load('Sys::Virt', $VERSION); @@ -1674,6 +1674,30 @@ hash reference where the keys are the page sizes and the values are the free count for that size. +=item $con->node_alloc_pages(\@pages, $start, $end, $flags=0) + +Allocate further huge pages for the reserved pool. The <\@pages> +parameter is an array reference with one entry per page size to +allocate for. Each entry is a further array reference where the +first element is the page size and the second element is the +page count. The same number of pages will be allocated on each +NUMA node in the range C<$start> to C<$end> inclusive. The +C<$flags> parameter accepts two contants + +=over 4 + +=item Sys::Virt::NODE_ALLOC_PAGES_ADD + +The requested number of pages will be added to the existing huge +page reservation. + +=item Sys::Virt::NODE_ALLOC_PAGES_SET + +The huge page reservation will be set to exactly the requested +number + +=back + =back =head1 CONSTANTS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/perl-Sys-Virt.spec new/Sys-Virt-1.2.9/perl-Sys-Virt.spec --- old/Sys-Virt-1.2.8/perl-Sys-Virt.spec 2014-09-05 17:24:39.000000000 +0200 +++ new/Sys-Virt-1.2.9/perl-Sys-Virt.spec 2014-10-02 12:30:22.000000000 +0200 @@ -1,7 +1,7 @@ # Automatically generated by perl-Sys-Virt.spec.PL Name: perl-Sys-Virt -Version: 1.2.8 +Version: 1.2.9 Release: 1%{?dist}%{?extra_release} Summary: Represent and manage a libvirt hypervisor connection License: GPLv2+ or Artistic diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-Virt-1.2.8/t/030-api-coverage.t new/Sys-Virt-1.2.9/t/030-api-coverage.t --- old/Sys-Virt-1.2.8/t/030-api-coverage.t 2014-09-05 17:24:27.000000000 +0200 +++ new/Sys-Virt-1.2.9/t/030-api-coverage.t 2014-10-02 12:30:10.000000000 +0200 @@ -88,6 +88,7 @@ virConnectDomainEventTrayChangeCallback virConnectDomainEventBalloonChangeCallback virConnectDomainEventDeviceRemovedCallback +virConnectDomainEventTunableCallback virConnectNetworkEventLifecycleCallback -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
