[ovirt-devel] ovirt-sdk get_subject() problem

Juan Hernandez jhernand at redhat.com
Wed Oct 29 10:45:15 UTC 2014


On 10/29/2014 11:37 AM, Denis Kirjanov wrote:
> Thanks for the tip, but I've got "got an unexpected keyword argument all_content"
> 

You can solve that updating the version of the Python SDK, no need to
update the engine. Newer versions of the SDK should work correctly with
older versions of the engine, so if you use the 3.5 version of the SDK
this should work.

> ----- Исходное сообщение -----
> От: "Juan Hernandez" <jhernand at redhat.com>
> Кому: "Denis Kirjanov" <kda at itsirius.su>, devel at ovirt.org
> Отправленные: Среда, 29 Октябрь 2014 г 13:46:16
> Тема: Re: [ovirt-devel] ovirt-sdk get_subject() problem
> 
> On 10/29/2014 10:40 AM, Denis Kirjanov wrote:
>> Hi guys, 
>>
>> I'm having a problem getting the value from the manager using vm.get_display().get_certificate().get_subject():
>> It happens on VM restart and what I get is: 'NoneType' object has no attribute 'get_subject'.
>>
>> It happens only with get_subject() since I don't have a problem to get other values like vm address or display port.
>> Moreover, the second attempt to query the certificate subject always succeeds...
>>
>> Is there a way to overcome this?
>>
>> We're using ovirt 3.1 and I've found the same issue here: 
>> http://lists.ovirt.org/pipermail/devel/2013-July/005221.html
>>
>> Thank you.
>>
> 
> When you request the information of a VM not all the details are
> populated by default, including the certificate. Thus the
> "get_certificate" method returns None. If you want the certificate data
> populated you have to use the "all_content" parameter of the method used
> to retrieve the VM:
> 
>   vm = api.vms.get(name="myvm", all_content=True)
> 
> Then you should be able to get the certificate and the subject.
> 


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Devel mailing list