Bug 1124796 - creating template fails on py-sdk due to "TypeError: export()"
Summary: creating template fails on py-sdk due to "TypeError: export()"
Status: CLOSED DUPLICATE of bug 1122546
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-sdk
Version: 3.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
Whiteboard: virt
Depends On:
Blocks: 1073943
TreeView+ depends on / blocked
Reported: 2014-07-30 10:42 UTC by Ori Gofen
Modified: 2016-05-26 01:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-12 07:16:42 UTC
oVirt Team: Virt

Attachments (Terms of Use)

Description Ori Gofen 2014-07-30 10:42:44 UTC
Description of problem:
please view BZ #1124795 (probably the same bug but i have separated them to be sure)

creating template fails on py-sdk when commencing :

>>> api.templates.add(params.Template(name='wrong',vm=api.vms.list()[0]))
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py", line 17892, in add
  File "/usr/lib/python2.6/site-packages/ovirtsdk/utils/parsehelper.py", line 74, in toXml
    entity.export(output, 0, name_=ParseHelper.getXmlTypeInstance(type_name))
  File "/usr/lib/python2.6/site-packages/ovirtsdk/xml/params.py", line 16807, in export
    self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/xml/params.py", line 16825, in exportChildren
    self.vm.export(outfile, level, namespace_, name_='vm', pretty_print=pretty_print)
TypeError: export() takes at most 3 non-keyword arguments (4 given)

if trying instead:

>>> api.templates.add(params.Template(name='wrong',vm=params.VM(name='vm__0')))
<ovirtsdk.infrastructure.brokers.Template object at 0x28d7c50>

it passes

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

How reproducible:

Steps to Reproduce:
see description

Actual results:
operation of creating template fails thus breaking all of my scripts

Expected results:
operation should be successful 

Additional info:

Comment 1 Michal Skrivanek 2014-08-12 07:16:42 UTC
as identified by Ravi, this is the same cause

*** This bug has been marked as a duplicate of bug 1122546 ***

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