Bug 601464 - duplicate function name createXML() in the libvirt.py
duplicate function name createXML() in the libvirt.py
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
12
All Linux
low Severity high
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-07 23:02 EDT by Nan Zhang
Modified: 2010-11-17 14:00 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-17 14:00:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nan Zhang 2010-06-07 23:02:55 EDT
Description of problem:
In module /usr/lib64/python2.6/site-packages/libvirt.py, there are two methods having the same name createXML() in the virConnect Class. It makes confused to invoke the related function.


Version-Release number of selected component (if applicable):
libvirt-0.8.1-7.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
    def createXML(self, xmlDesc, flags):
        """Create a new device on the VM host machine, for example,
           virtual HBAs created using vport_create. """
        ret = libvirtmod.virNodeDeviceCreateXML(self._o, xmlDesc, flags)
        if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self)
        __tmp = virNodeDevice(self, _obj=ret)
        return __tmp

    def createXML(self, xmlDesc, flags):
        """Launch a new guest domain, based on an XML description
          similar to the one returned by virDomainGetXMLDesc() This
          function may requires privileged access to the hypervisor.
          The domain is not persistent, so its definition will
          disappear when it is destroyed, or if the host is restarted
           (see virDomainDefineXML() to define persistent domains). """
        ret = libvirtmod.virDomainCreateXML(self._o, xmlDesc, flags)
        if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
        __tmp = virDomain(self,_obj=ret)
        return __tmp
  
Actual results:
Failed to invoke virNodeDeviceCreateXML().

Expected results:
Different function name.

Additional info:
Comment 2 Nan Zhang 2010-06-07 23:17:33 EDT
Sorry, actually this code is come from fedora package. Move to Fedora product.
libvirt-0.7.1-16.fc12.i686
Comment 3 Nan Zhang 2010-06-07 23:18:41 EDT
/usr/lib/python2.6/site-packages/libvirt.py
Comment 4 Bug Zapper 2010-11-03 09:27:45 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Nan Zhang 2010-11-03 23:18:33 EDT
One of the function name is renamed with nodeDeviceCreateXML(). So this bug was already fixed with libvirt-0.8.2-1.fc12.i686. Move it to VERIFIED.
Comment 6 Cole Robinson 2010-11-17 14:00:10 EST
Closing as per comment #5

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