Hello there,
I am trying to add a VmPool to oVirt using the python ovirtSDK4 with
following lines:
I am omitting the import packages lines and connection lines.
system_service = connection.system_service()
vm_pools_service = system_service.vm_pools_service()
templates_service = system_service.templates_service()
clusters_service = system_service.clusters_service()
tplist = templates_service.list(search='name=prueba')
tpl=None
biggest=-1
for t in tplist:
ver = t.version
if ver.version_number > biggest:
biggest = ver.version_number
tid = t.id
tpl = t
c = None
for cluster in clusters_service.list():
if cluster.name == 'Pruebacluster':
c = cluster
pool = ovirtsdk4.types.VmPool(name='PRUEBA',size=1,type
=ovirtsdk4.types.VmPoolType('manual'),template=tpl,cluster=c)
vm_pools_service.add(pool=pool)
I am getting the following error:
Fault reason is "Request syntactically incorrect.". Fault detail is
"For
correct usage, see:
https://ovirt.example.com/ovirt-engine/api/v4/model#services/vm-pools/met...;.
HTTP response code is 400.
I am a newbie in using this version of the API, suppose this is quite easy
problem.
Thanks for all the answers to come,
Manuel