Hello community,
here is the log from the commit of package python-ravello-sdk for
openSUSE:Leap:15.2 checked in at 2020-03-02 13:22:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-ravello-sdk (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-ravello-sdk.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ravello-sdk"
Mon Mar 2 13:22:01 2020 rev:15 rq:777078 version:2.17
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-ravello-sdk/python-ravello-sdk.changes
2020-01-15 15:52:34.539568063 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-ravello-sdk.new.26092/python-ravello-sdk.changes
2020-03-02 13:22:01.730239874 +0100
@@ -1,0 +2,11 @@
+Tue May 14 18:18:56 UTC 2019 - John Jolly <[email protected]>
+
+- Update to v2.17
+ + No upstream changelog
+
+-------------------------------------------------------------------
+Tue Dec 4 12:53:32 UTC 2018 - Matej Cepl <[email protected]>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------
Old:
----
ravello-sdk-2.7.tar.gz
New:
----
ravello-sdk-2.17.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ravello-sdk.spec ++++++
--- /var/tmp/diff_new_pack.QcFByl/_old 2020-03-02 13:22:02.030240470 +0100
+++ /var/tmp/diff_new_pack.QcFByl/_new 2020-03-02 13:22:02.030240470 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-ravello-sdk
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,20 +12,19 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ravello-sdk
-Version: 2.7
+Version: 2.17
Release: 0
Summary: Python SDK for the Ravello API
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://github.com/ravello/python-sdk
+URL: https://github.com/ravello/python-sdk
Source:
https://files.pythonhosted.org/packages/source/r/ravello-sdk/ravello-sdk-%{version}.tar.gz
-BuildRequires: %{python_module devel}
BuildRequires: %{python_module docopt}
BuildRequires: %{python_module requests >= 2.6.0}
BuildRequires: %{python_module setuptools}
@@ -34,7 +33,6 @@
Requires: python-docopt
Requires: python-requests >= 2.6.0
Requires: python-six
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
@@ -55,8 +53,8 @@
%python_exec tests/unit.py
%files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
%{python_sitelib}/*
%changelog
++++++ ravello-sdk-2.7.tar.gz -> ravello-sdk-2.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/PKG-INFO
new/ravello-sdk-2.17/PKG-INFO
--- old/ravello-sdk-2.7/PKG-INFO 2017-11-12 16:04:06.000000000 +0100
+++ new/ravello-sdk-2.17/PKG-INFO 2018-11-29 14:02:24.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: ravello-sdk
-Version: 2.7
+Version: 2.17
Summary: Python SDK for the Ravello API
Home-page: https://github.com/ravello/python-sdk
Author: Hadar Davidovich
Author-email: [email protected]
License: Apache 2.0
-Description-Content-Type: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/lib/ravello_sdk.egg-info/PKG-INFO
new/ravello-sdk-2.17/lib/ravello_sdk.egg-info/PKG-INFO
--- old/ravello-sdk-2.7/lib/ravello_sdk.egg-info/PKG-INFO 2017-11-12
16:04:06.000000000 +0100
+++ new/ravello-sdk-2.17/lib/ravello_sdk.egg-info/PKG-INFO 2018-11-29
14:02:24.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: ravello-sdk
-Version: 2.7
+Version: 2.17
Summary: Python SDK for the Ravello API
Home-page: https://github.com/ravello/python-sdk
Author: Hadar Davidovich
Author-email: [email protected]
License: Apache 2.0
-Description-Content-Type: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/lib/ravello_sdk.py
new/ravello-sdk-2.17/lib/ravello_sdk.py
--- old/ravello-sdk-2.7/lib/ravello_sdk.py 2017-11-12 15:38:40.000000000
+0100
+++ new/ravello-sdk-2.17/lib/ravello_sdk.py 2018-11-29 14:02:23.000000000
+0100
@@ -58,17 +58,29 @@
multiple VMs based on the same image, the IDs are copied and you need to
use this function to ensure the VMs have unique local IDs again.
"""
+ old_luid_to_new_luid_dict = dict()
+ return inner_update_luids(obj, old_luid_to_new_luid_dict)
+
+def inner_update_luids(obj, old_luid_to_new_luid_dict):
if isinstance(obj, list):
- return [update_luids(elem) for elem in obj]
+ return [inner_update_luids(elem, old_luid_to_new_luid_dict) for elem
in obj]
elif isinstance(obj, dict):
for key, value in obj.items():
- if key == 'id':
- obj['id'] = random_luid()
+ if key in ('id','controllerId','componentId','ipConfigLuid'):
+ new_id = get_luid(value, old_luid_to_new_luid_dict)
+ obj[key] = new_id
+ if key == 'busId' and value != '0':
+ new_id = get_luid(long(value), old_luid_to_new_luid_dict)
+ obj['busId'] = str(new_id)
elif isinstance(value, (dict, list)):
- update_luids(value)
+ inner_update_luids(value, old_luid_to_new_luid_dict)
else:
return obj
+def get_luid(luid, old_luid_to_new_luid_dict):
+ if luid not in old_luid_to_new_luid_dict.keys():
+ old_luid_to_new_luid_dict[luid] = random_luid()
+ return old_luid_to_new_luid_dict[luid]
def application_state(app):
"""Return the consolidated state for application *app*.
@@ -225,7 +237,11 @@
self._connection = None
self._user_info = None
self._set_url(url or self.default_url)
- self._proxies = {}
+ # Get proxy setting from environment variables
+ try:
+ self._proxies = urllib.getproxies()
+ except:
+ self._proxies = urllib.request.getproxies()
if proxy_url is not None:
self._proxies = {"http": proxy_url, "https": proxy_url}
self._eph_token = eph_token
@@ -354,7 +370,7 @@
This method can be used in case a certain API call has not yet been
added as a method.
"""
- body = json.dumps(entity).encode('utf8') if entity is not None else b''
+ body = json.dumps(entity).encode('utf-8') if entity is not None else
b''
headers = headers if headers is not None else []
response = self._request(method, path, body, headers)
return response.entity
@@ -366,14 +382,14 @@
if self._eph_token is not None:
hdict['X-Ephemeral-Token-Authorization'] = self._eph_token
if body:
- hdict['Content-Type'] = 'application/json'
+ hdict['Content-Type'] = 'application/json;charset=utf-8'
if isinstance(headers, dict):
hdict.update(headers)
elif isinstance(headers, list):
for key, value in headers:
hdict[key] = value
retries = 0
- while retries < self.retries:
+ while retries <= self.retries:
if not self.logged_in and (self.have_credentials or
self.have_eph_access_token) and self._autologin:
self._login()
try:
@@ -421,6 +437,8 @@
self.close()
response.raise_for_status()
elif self._autologin:
+ if not self.retries:
+ response.raise_for_status()
self._login()
retries += 1
continue
@@ -432,13 +450,13 @@
except (requests.exceptions.Timeout, ValueError) as e:
self._logger.debug('error: {0!s}'.format(e))
self.close()
- if not _idempotent(method):
+ if not _idempotent(method) or not self.retries:
self._logger.debug('not retrying {0}
request'.format(method))
raise e
retries += 1
continue
break
- if retries == self.retries:
+ if retries > self.retries:
raise RavelloError('maximum number of retries reached')
return response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/release.py
new/ravello-sdk-2.17/release.py
--- old/ravello-sdk-2.7/release.py 2017-11-12 15:38:40.000000000 +0100
+++ new/ravello-sdk-2.17/release.py 2018-11-29 14:02:23.000000000 +0100
@@ -106,7 +106,8 @@
sh('git add setup.py')
sh('git commit -m "version {0}"', relver)
sh('git tag -a -m "version {0}" {1}-{0}', relver, vinfo['name'])
- sh('python setup.py sdist upload >/dev/null')
+ sh('python setup.py sdist')
+ sh('twine upload dist/*')
if nextver:
sh('sed -i -e \'s/{0}/{1}.dev/\' setup.py', relver, nextver)
sh('git add setup.py')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/setup.cfg
new/ravello-sdk-2.17/setup.cfg
--- old/ravello-sdk-2.7/setup.cfg 2017-11-12 16:04:06.000000000 +0100
+++ new/ravello-sdk-2.17/setup.cfg 2018-11-29 14:02:24.000000000 +0100
@@ -5,4 +5,5 @@
[egg_info]
tag_build =
tag_date = 0
+tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.7/setup.py
new/ravello-sdk-2.17/setup.py
--- old/ravello-sdk-2.7/setup.py 2017-11-12 15:38:40.000000000 +0100
+++ new/ravello-sdk-2.17/setup.py 2018-11-29 14:02:23.000000000 +0100
@@ -22,9 +22,10 @@
version_info = {
'name': 'ravello-sdk',
- 'version': '2.7',
+ 'version': '2.17',
'description': 'Python SDK for the Ravello API',
'author': 'Geert Jansen',
+ 'author_email': '[email protected]',
'maintainer': 'Hadar Davidovich',
'maintainer_email': '[email protected]',
'url': 'https://github.com/ravello/python-sdk',