ovirt-engine-sdk-python

This is a multi-part message in MIME format. ------=_001_NextPart784536325675_=---- Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 SGkgYWxsLA0KICAgICAgICBJIGhhdmUgYW4gb3ZpcnQgNC4wIGVudmlyb25tZW50LiBJIGdvdCBh biBlcnJvciB3aGVuIEkgZXhjdXRlZCBhbiBweXRob24gc2NyaXB0IHdoaWNoIGNvdWxkIGJlIG5v cm1hbGx5IGV4Y3V0ZWQgaW4gMy42LiBJIGhhdmUgZmlndXJlZCBvdXQgdGhhdCBpbiBvdmlydCA0 LjAgdGhlIHZlcnNpb24gb2YgcHl0aG9uIHNkayBpcyBzdGlsbCAzLjYuNy4wLiBJdCBzZWVtZWQg dGhhdCB0aGUgc2VydmVyIHRob3VnaHQgaXQgd2FzIGFuIHVuc2VjdXJlZCBjb25uZWN0aW9uLCBi dXQgSFRUUFMgcHJvdG9jb2wgYW5kIHRoZSByaWdodCBjYSBmaWxlIHdhcyB1c2VkLg0KQW55b25l IGNhbiBoZWxwPyBUaGFua3MhDQoNCltyb290QHRlc3Qgfl0jIC4vdGVzdC5weQ0KVHJhY2ViYWNr IChtb3N0IHJlY2VudCBjYWxsIGxhc3QpOg0KICBGaWxlICIuL3Rlc3QucHkiLCBsaW5lIDMwLCBp biA8bW9kdWxlPg0KICAgIHZtcyA9IFZpcnR1YWxNYWNoaW5lcygpDQogIEZpbGUgIi9yb290L3Zt LnB5IiwgbGluZSAzMSwgaW4gX19pbml0X18NCiAgICBzZWxmLmFwaSA9IEFQSSh1cmw9QkFTRVVS TCx1c2VybmFtZT1VU0VSTkFNRSxwYXNzd29yZD1QQVNTV09SRCxjYV9maWxlPUNBRklMRSkNCiAg RmlsZSAiL3Vzci9saWIvcHl0aG9uMi43L3NpdGUtcGFja2FnZXMvb3ZpcnRzZGsvYXBpLnB5Iiwg bGluZSAxOTcsIGluIF9faW5pdF9fDQogICAgcmFpc2UgVW5zZWN1cmVkQ29ubmVjdGlvbkF0dGVt cHRFcnJvcg0Kb3ZpcnRzZGsuaW5mcmFzdHJ1Y3R1cmUuZXJyb3JzLlVuc2VjdXJlZENvbm5lY3Rp b25BdHRlbXB0RXJyb3I6IFtFUlJPUl06Ok5vIHJlc3BvbnNlIHJldHVybmVkIGZyb20gc2VydmVy LiBJZiB5b3UncmUgdXNpbmcgSFRUUCBwcm90b2NvbA0KYWdhaW5zdCBhIFNTTCBzZWN1cmVkIHNl cnZlciwgdGhlbiB0cnkgdXNpbmcgSFRUUFMgaW5zdGVhZC4NCg0KKEJBU0VVUkw6IGh0dHBzOi8v dGVzdC5leGFtcGxlLmNvbS9vdmlydC1lbmdpbmUpDQo= ------=_001_NextPart784536325675_=---- Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charse= t=3DUTF-8"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font= -family: =E5=BE=AE=E8=BD=AF=E9=9B=85=E9=BB=91; color: rgb(0, 0, 0); line-h= eight: 1.5; }body { font-family: =E5=BE=AE=E8=BD=AF=E9=9B=85=E9=BB=91; fon= t-size: 10.5pt; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><bo= dy>Hi all,<div> <span style=3D"font-size: 10.5pt; line-h= eight: 1.5; background-color: window;"> I have an ovirt 4.0&n= bsp;</span><span style=3D"font-size: 10.5pt; line-height: 1.5; background-= color: window;">environment. I got an error when I excuted an python = </span><span style=3D"font-size: 10.5pt; line-height: 1.5; background-colo= r: window;">script which could be </span><span style=3D"font-size: 10= .5pt; line-height: 1.5; background-color: window;">normally excuted in 3.6= . I have figured out that in ovirt 4.0 the version of python sdk is still&= nbsp;</span><span style=3D"font-size: 10.5pt; line-height: 1.5; background= -color: window;">3.6.7.0. It seemed that the </span><span style=3D"fo= nt-size: 10.5pt; line-height: 1.5; background-color: window;">server thoug= ht it was an u</span><span style=3D"font-size: 10.5pt; line-height: 1.5; b= ackground-color: window;">nsecured connection, but </span><span style= =3D"font-size: 10.5pt; line-height: 1.5; background-color: window;">HTTPS = protocol and the right ca file was used.</span></div><div>Anyone can help?= Thanks!</div><div><br></div><div>[root@test ~]# ./test.py<br>Tr= aceback (most recent call last):<br> File&n= bsp;"./test.py", line 30, in <module><br> &= nbsp; vms =3D VirtualMachines()<br> File&n= bsp;"/root/vm.py", line 31, in __init__<br>  = ; self.api =3D API(url=3DBASEURL,username=3DUSERNAME,= password=3DPASSWORD,ca_file=3DCAFILE)<br> File "/usr/lib/p= ython2.7/site-packages/ovirtsdk/api.py", line 197, in = __init__<br> raise UnsecuredConnectionAttemptE= rror<br>ovirtsdk.infrastructure.errors.UnsecuredConnectionAttemptError:&nb= sp;[ERROR]::No response returned from server. If&= nbsp;you're using HTTP protocol<br>against a SSL&= nbsp;secured server, then try using HTTPS in= stead.</div><div><br></div><div>(BASEURL<span style=3D"font-size: 10.5pt; = line-height: 1.5; background-color: window;">: https://test.example.c= om/ovirt-engine</span><span style=3D"font-size: 10.5pt; line-height: 1.5; = background-color: window;">)</span></div></body></html> ------=_001_NextPart784536325675_=------

On 07/19/2016 08:20 AM, qinglong.dong@horebdata.cn wrote:
Hi all, I have an ovirt 4.0 environment. I got an error when I excuted an python script which could be normally excuted in 3.6. I have figured out that in ovirt 4.0 the version of python sdk is still 3.6.7.0. It seemed that the server thought it was an unsecured connection, but HTTPS protocol and the right ca file was used. Anyone can help? Thanks!
[root@test ~]# ./test.py Traceback (most recent call last): File "./test.py", line 30, in <module> vms = VirtualMachines() File "/root/vm.py", line 31, in __init__ self.api = API(url=BASEURL,username=USERNAME,password=PASSWORD,ca_file=CAFILE) File "/usr/lib/python2.7/site-packages/ovirtsdk/api.py", line 197, in __init__ raise UnsecuredConnectionAttemptError ovirtsdk.infrastructure.errors.UnsecuredConnectionAttemptError: [ERROR]::No response returned from server. If you're using HTTP protocol against a SSL secured server, then try using HTTPS instead.
(BASEURL: https://test.example.com/ovirt-engine)
The base URL should be https://test.example.com/ovirt-engine/api. -- 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.
participants (2)
-
Juan Hernández
-
qinglong.dong@horebdata.cn