[Engine-devel] Fwd: get certificate with SDK

Michael Pasternak mpastern at redhat.com
Sat Jul 27 08:42:37 UTC 2013


Hi,

By default not all data returned in the object as some may be retrieved
only via dedicated query that may consume a lot of resources, therefore
we've added new concept called All-Content, in the native api you can pass
All-Content:True http header to see entire object, ovirt-engine-sdk-python
lacks of this capability (for vm specifically) due to a bug in api, this will
be addressed in the one of upcoming releases.

thanks for reporting.

> 
> 
> Hi, all:
> 
>          I can got all the VM’s information in https://{ovirt-engine}/api/vms/{id} <https://%7bovirt-engine%7d/api/vms/%7bid%7d>, and I can
> 
> get mostly VM’s informations via ovirt-engine-sdk, but I can’t got <certificate> via SDK.
> 
>  
> 
>          This is a part of XML in https://{ovirt-engine}/api/vms/{id} <https://%7bovirt-engine%7d/api/vms/%7bid%7d>
> 
>          <display>
> 
> <type>spice</type>
> 
> <address>192.168.1.241</address>
> 
> <port>5914</port>
> 
> <secure_port>5915</secure_port>
> 
> <monitors>1</monitors>
> 
> <allow_override>false</allow_override>
> 
> *<certificate>*
> 
> *<subject>O=thtfc.com,CN=allinone241.thtfc.com</subject>*
> 
> *</certificate>*
> 
> <smartcard_enabled>false</smartcard_enabled>
> 
> </display>
> 
>  
> 
> For example, I can port like
> 
>          vm.get_display().get_port()
> 
>  
> 
> but when I want CN, I tyied use
> 
>          vm.get_display().get_certificate().get_subject()
> 
> it return
> 
>  
> 
>>>> vm.get_display().get_certificate().get_subject()
> 
> Traceback (most recent call last):
> 
>   File "<stdin>", line 1, in <module>
> 
> AttributeError: 'NoneType' object has no attribute 'get_subject'
> 
> 
> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Devel mailing list