I'm trying on FC24, using python-ovirt-engine-sdk4-4.1.0
-0.0.20161003git056315d.fc24.x86_64 to add a DC, and failing - against
master. The client is unhappy:
File
"/home/ykaul/ovirt-system-tests/basic-suite-master/test-scenarios/002_bootstrap.py",
line 98, in add_dc4
version=sdk4.types.Version(major=DC_VER_MAJ,minor=DC_VER_MIN),
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line
4347, in add
response = self._connection.send(request)
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py", line
276, in send
return self.__send(request)
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py", line
298, in __send
self._sso_token = self._get_access_token()
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py", line
460, in _get_access_token
sso_response = self._get_sso_response(self._sso_url, post_data)
File "/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py", line
498, in _get_sso_response
return json.loads(body_buf.getvalue().decode('utf-8'))
File "/usr/lib64/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Surprisingly, I now can't find that RPM of this SDK in
resources.ovirt.org
now.
I've tried with
http://resources.ovirt.org/pub/ovirt-master-snapshot/rp
m/fc24/x86_64/python-ovirt-engine-sdk4-4.0.0-0.1.20161004git
f94eeb5.fc24.x86_64.rpm
- same result.
Did not see anything obvious on server or engine logs.
The code:
def add_dc4(api):
nt.assert_true(api != None)
dcs_service = api.system_service().data_centers_service()
nt.assert_true(
dc = dcs_service.add(
sdk4.types.DataCenter(
name=DC_NAME4,
description='APIv4 DC',
local=False,
version=sdk4.types.Version(major=DC_VER_MAJ,minor=DC_VER_
MIN),
),
)
)
And the api object is from:
return sdk4.Connection(
url=url,
username=constants.ENGINE_USER,
password=str(self.metadata['ovirt-engine-password']),
insecure=True,
debug=True,
)