Bug 1743062

Summary: API names have ambiguity in NetworkPort.pm and DomainCheckpoint.pm
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Dan Zheng <dzheng>
Component: perl-Sys-VirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Dan Zheng <dzheng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: jdenemar
Target Milestone: rcKeywords: Automation
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: perl-Sys-Virt-5.6.0-2.module+el8.1.0+4140+e3893fe6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-06 07:18:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Zheng 2019-08-19 02:29:13 UTC
Description of problem:

APIs in the two pm modules have ambiguity for users. This may make users confused.

Version-Release number of selected component (if applicable):

perl-Sys-Virt-5.6.0-1.module+el8.1.0+3908+8a8c5ed4

How reproducible:
100%

Steps to Reproduce:
1.  Below '$net' will be misunderstood with lib/Sys/Virt/Network.pm, but it actually refers to a networkport instead of network. So I strongly recommend we should use another meaningful name, like $netport.


# cat lib/Sys/Virt/NetworkPort.pm
...

=item my $uuid = $net->get_uuid()

=item my $uuid = $net->get_uuid_string()

=item my $xml = $net->get_xml_description()

=item $net->delete()

=item my $params = $net->get_parameters($flags=0);

=item $net->set_parameters($params, $flags=0);

2.  Below '$domss' will be misunderstood with lib/Sys/Virt/DomainSnapshot.pm, but it actually refers to a DomainCheckpoint instead of DomainSnapshot. So I strongly recommend we should use another meaningful name, like $domcp. And "domain's configuration" should be changed "domain checkpoint's configuration"

#cat lib/Sys/Virt/DomainCheckpoint.pm

=item my $xml = $domss->get_xml_description($flags)

Returns an XML document containing a complete description of
the domain's configuration. The C<$flags> parameter accepts the following constants


=item $domss->delete($flags)

=item $parentss = $domss->get_parent();

=item $res = $domss->has_metadata()

=item my @checkpoints = $domss->list_all_children($flags)



Actual results:
See above

Expected results:


Additional info:

Comment 1 Daniel Berrangé 2019-08-22 10:20:27 UTC
Fixed upstream in

commit dbb008af8c53b26f5b94e835469ee2ee4033e914
Author: Daniel P. Berrangé <berrange>
Date:   Thu Aug 22 11:19:46 2019 +0100

    Fix misc copy+paste naming mistakes in POD docs
    
    Signed-off-by: Daniel P. Berrangé <berrange>

Comment 3 Dan Zheng 2019-09-19 07:49:14 UTC
Package:
perl-Sys-Virt-5.6.0-2.module+el8.1.0+4140+e3893fe6.x86_64

Check source code and patch files. Verified

Comment 5 errata-xmlrpc 2019-11-06 07:18:55 UTC
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.

https://access.redhat.com/errata/RHBA-2019:3723