commit python-ravello-sdk for openSUSE:Factory
Hello community, here is the log from the commit of package python-ravello-sdk for openSUSE:Factory checked in at 2019-05-22 12:19:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ravello-sdk (Old) and /work/SRC/openSUSE:Factory/.python-ravello-sdk.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-ravello-sdk" Wed May 22 12:19:32 2019 rev:7 rq:702937 version:2.17 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ravello-sdk/python-ravello-sdk.changes 2018-12-24 11:42:58.305368084 +0100 +++ /work/SRC/openSUSE:Factory/.python-ravello-sdk.new.5148/python-ravello-sdk.changes 2019-05-22 12:19:36.896866716 +0200 @@ -1,0 +2,6 @@ +Tue May 14 18:18:56 UTC 2019 - John Jolly <jjolly@suse.com> + +- Update to v2.17 + + No upstream changelog + +------------------------------------------------------------------- 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.oeeb7a/_old 2019-05-22 12:19:37.808866075 +0200 +++ /var/tmp/diff_new_pack.oeeb7a/_new 2019-05-22 12:19:37.808866075 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-ravello-sdk # -# Copyright (c) 2018 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 @@ -18,7 +18,7 @@ %{?!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 ++++++ 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: hadar.davidovich@oracle.com 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: hadar.davidovich@oracle.com 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': 'geert.jansen@ravellosystems.com', 'maintainer': 'Hadar Davidovich', 'maintainer_email': 'hadar.davidovich@oracle.com', 'url': 'https://github.com/ravello/python-sdk',
participants (1)
-
root