Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
An incorrect class name was used with the list_all_nwfilters method.
Consequence:
The objects return from the list_all_nwfilters method could not be used
Fix:
The object name was fixed
Result:
The list_all_nwfilters method can now be used.
Description of problem:
when test list_all_interface and list_all_nwfilters, found that list_all_interface with default flag can not list any host interfaces
and for list_all_nwfilters, seems return the wrong object
Sys::Virt::NWFilters, which should be Sys::Virt::NWFilter without 's'
Version-Release number of selected component (if applicable):
perl-Sys-Virt-0.10.2-4.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
run perl script
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;
my $uri = "qemu:///system";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my @ifaces = $con->list_all_interfaces();
foreach my $if (@ifaces){
print "$if\n";
}
my @nwlist = $con->list_all_nwfilters();
foreach my $nw (@nwlist){
print "$nw\n";
}
Actual results:
list_all_interfaces can not list any interfaces
list_all_nwfilters return Sys::Virt::NWFilters but not Sys::Virt::NWFilter
Expected results:
list_all_interfaces with default flag can list interfaces
list_all_nwfilters return Sys::Virt::NWFilter
Additional info:
The issue with list_all_nwfilters is a bug in the Perl binding. The issue with list_all_interfaces appears to be a libvirt bug - please file another BZ for that.
(In reply to comment #1)
> The issue with list_all_nwfilters is a bug in the Perl binding. The issue
> with list_all_interfaces appears to be a libvirt bug - please file another
> BZ for that.
ok, file a bug for it, bug #884382
And for list_all_nwfilters doc /usr/share/man/man3/Sys::Virt.3pm.gz
"The $flags parameter can be used to filter the list of returned secrets."
If there is no flag can be set now, please describe here with
"The $flags parameter is currently unused and defaults to zero."
Else, please list filter flag in
/usr/share/man/man3/Sys::Virt::NWFilter.3pm.gz
commit 4ab0cb16158b3ddcdb80418fd9ca423e04cb2f04
Author: Daniel P. Berrange <berrange>
Date: Tue Dec 11 10:58:39 2012 +0000
Fix docs for flags param in list_all_nwfilters
Verify pass on
perl-Sys-Virt-0.10.2-5.el6.x86_64
with script
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;
my $uri = "qemu:///system";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my @nwlist = $con->list_all_nwfilters();
foreach my $nw (@nwlist){
my $name = $nw->get_name();
print "$nw - $name\n";
}
it works well.
The doc change to
my @nwfilters = $vmm->list_all_nwfilters($flags)
Return a list of all nwfilters currently known to the VMM. The elements in the returned list are instances of the
Sys::Virt::NWFilter class. The $flags parameter is currently unused and defaults to zero.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-0377.html
Description of problem: when test list_all_interface and list_all_nwfilters, found that list_all_interface with default flag can not list any host interfaces and for list_all_nwfilters, seems return the wrong object Sys::Virt::NWFilters, which should be Sys::Virt::NWFilter without 's' Version-Release number of selected component (if applicable): perl-Sys-Virt-0.10.2-4.el6.x86_64 How reproducible: 100% Steps to Reproduce: run perl script #!/usr/bin/perl use warnings; use strict; use Sys::Virt; my $uri = "qemu:///system"; my $con = Sys::Virt->new(address => $uri, readonly => 0); my @ifaces = $con->list_all_interfaces(); foreach my $if (@ifaces){ print "$if\n"; } my @nwlist = $con->list_all_nwfilters(); foreach my $nw (@nwlist){ print "$nw\n"; } Actual results: list_all_interfaces can not list any interfaces list_all_nwfilters return Sys::Virt::NWFilters but not Sys::Virt::NWFilter Expected results: list_all_interfaces with default flag can list interfaces list_all_nwfilters return Sys::Virt::NWFilter Additional info: