commit 1e2270b1a52be17f11c630933803e955854bcf26 Author: hanjiangxue Date: Wed Sep 30 09:54:39 2020 +0800 update python-tripleoclient to 13.7.0 Add PEP3151 patch to avoid SUSE CI issue catching KeyError and OSError [0]. [0] https://review.opendev.org/756720 Depends-On: https://review.opendev.org/756720 Change-Id: Ie55f48825956922428ec6070c7cbf8706deb19b9 diff --git a/openstack/python-tripleoclient/0001-catch-KeyError-and-OSError-PEP3151.patch b/openstack/python-tripleoclient/0001-catch-KeyError-and-OSError-PEP3151.patch new file mode 100644 index 0000000..78e72af --- /dev/null +++ b/openstack/python-tripleoclient/0001-catch-KeyError-and-OSError-PEP3151.patch @@ -0,0 +1,39 @@ +From 41d43e1ab71f2270341c9c29ecbae7eec4465030 Mon Sep 17 00:00:00 2001 +From: Sébastien Boyron +Date: Thu, 08 Oct 2020 16:19:39 +0200 +Subject: [PATCH] Add catch for OSError and KeyError (PEP 3151) + +During RPM packaging SUSE CI where raising KeyError and +OSError [0]. + +[0] https://review.opendev.org/755159 + +Change-Id: I47e25d3c70183e7617e42ac83a55f3d6e4f7a70f +--- + +diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py +index 677e2bf..6955d4a 100644 +--- a/tripleoclient/utils.py ++++ b/tripleoclient/utils.py +@@ -592,7 +592,7 @@ + get_uid = int(os.getenv('SUDO_UID', os.getuid())) + try: + user_pwd = pwd.getpwuid(get_uid) +- except TypeError: ++ except (KeyError, TypeError): + home = constants.CLOUD_HOME_DIR + else: + home = user_pwd.pw_dir +diff --git a/tripleoclient/v1/overcloud_netenv_validate.py b/tripleoclient/v1/overcloud_netenv_validate.py +index cd06acf..15f1b03 100644 +--- a/tripleoclient/v1/overcloud_netenv_validate.py ++++ b/tripleoclient/v1/overcloud_netenv_validate.py +@@ -163,7 +163,7 @@ + try: + with open(path, 'r') as nic_file: + nic_data = yaml.safe_load(nic_file) +- except IOError: ++ except (IOError, OSError): + self.log.error( + 'The resource "%s" reference file does not exist: "%s"', + resource, path) diff --git a/openstack/python-tripleoclient/python-tripleoclient.spec.j2 b/openstack/python-tripleoclient/python-tripleoclient.spec.j2 index 886d017..fdfa600 100644 --- a/openstack/python-tripleoclient/python-tripleoclient.spec.j2 +++ b/openstack/python-tripleoclient/python-tripleoclient.spec.j2 @@ -1,5 +1,5 @@ {% set pypi_name = 'python-tripleoclient' %} -{% set upstream_version = upstream_version('13.0.0') %} +{% set upstream_version = upstream_version('13.7.0') %} {% set rpm_release = '1' %} {% set source = url_pypi() %} @@ -14,6 +14,10 @@ License: {{ license('Apache-2.0') }} Group: Development/Languages/Python URL: https://launchpad.net/{{ pypi_name }} Source0: {{ source }} +# Patch added due to SUSE CI error due to PEP3151 must be removed +# when https://review.opendev.org/#/c/756720/ will be released +Patch0: 0001-catch-KeyError-and-OSError-PEP3151.patch +BuildRequires: {{ py3('ansible-runner') }} BuildRequires: openstack-macros BuildRequires: {{ py2pkg('tripleo-common') }} BuildRequires: {{ py3('cliff') }} @@ -32,6 +36,7 @@ BuildRequires: {{ py3('requests-mock') }} BuildRequires: {{ py3('stestr') }} BuildRequires: {{ py3('testscenarios') }} BuildRequires: {{ py3('testtools') }} +BuildRequires: {{ py3('validations-libs') }} BuildRequires: {{ py3('python-zaqarclient') }} BuildArch: noarch %if 0%{?rdo} @@ -44,8 +49,8 @@ for TripleO. %package -n python3-tripleoclient Summary: OpenstackClient plugin for tripleoclient +Requires: {{ py3('ansible-runner') }} Requires: {{ py2pkg('tripleo-common') }} -Requires: {{ py3('Babel') }} Requires: {{ py3('cliff') }} Requires: {{ py3('cryptography') }} Requires: {{ py3('python-heatclient') }} @@ -60,6 +65,7 @@ Requires: {{ py3('pbr') }} Requires: {{ py3('psutil') }} Requires: {{ py3('simplejson') }} Requires: {{ py3('six') }} +Requires: {{ py3('validations-libs') }} Requires: {{ py3('websocket-client') }} Requires: {{ py3('python-zaqarclient') }}