[ovirt-users] Python-SDK4: Listing template by ID throws exception

nicolas at devels.es nicolas at devels.es
Tue Apr 4 08:59:28 UTC 2017


Hi,

I'm using ovirt-engine-sdk-python 4.1.3 (ovirt ver is 4.1.0), and in a 
snippet I'm trying to get a template by its id. For that, I did this:

conn = ovirtsdk4.Connection(...)
sys_serv = conn.system_service()
tpl_serv = sys_serv.templates_service()

t = tpl_serv.list(search='id=fedff75f-635f-4790-9bbf-2ac389e14f93')

And it throws:

Error: Fault reason is "Operation Failed". Fault detail is 
"statementcallback; bad sql grammar [select * from (select * from vm 
templates view where ( vmt guid in (select distinct vm templates storage 
domain.vmt guid from  vm templates storage domain   where  (  vm 
templates storage domain.cluster name ilike 
'%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  vm templates storage 
domain.description ilike '%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  
vm templates storage domain.free text comment ilike 
'%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  vm templates storage 
domain.name ilike '%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  vm 
templates storage domain.quota name ilike 
'%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  vm templates storage 
domain.storage pool name ilike 
'%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' or  vm templates storage 
domain.template version name,template version number ilike 
'%id=fedff75f-635f-4790-9bbf-2ac389e14f93%' ) ))  order by name asc ) as 
t1 offset (1 -1) limit 2147483647]; nested exception is 
org.postgresql.util.psqlexception: error: argument of or must be type 
boolean, not type character varying
   position: 737". HTTP response code is 400.

I'm sure this template exists and it has this ID. If I search in the 
webadmin by this ID, the search seems to hang and never returns anything 
(I have to stop it by pressing the 'X' button).

Am I using this call improperly?

Thanks.


More information about the Users mailing list