Bug 1743062 - API names have ambiguity in NetworkPort.pm and DomainCheckpoint.pm
Summary: API names have ambiguity in NetworkPort.pm and DomainCheckpoint.pm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: perl-Sys-Virt
Version: 8.1
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Daniel Berrangé
QA Contact: Dan Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-19 02:29 UTC by Dan Zheng
Modified: 2020-11-14 08:52 UTC (History)
1 user (show)

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:
Clone Of:
Environment:
Last Closed: 2019-11-06 07:18:55 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:19:11 UTC

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


Note You need to log in before you can comment on or make changes to this bug.