commit python-senlinclient for openSUSE:Factory
Hello community, here is the log from the commit of package python-senlinclient for openSUSE:Factory checked in at 2019-05-03 22:43:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-senlinclient (Old) and /work/SRC/openSUSE:Factory/.python-senlinclient.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-senlinclient" Fri May 3 22:43:17 2019 rev:7 rq:692878 version:1.10.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-senlinclient/python-senlinclient.changes 2018-09-07 15:39:32.998526740 +0200 +++ /work/SRC/openSUSE:Factory/.python-senlinclient.new.5148/python-senlinclient.changes 2019-05-03 22:43:18.771353422 +0200 @@ -1,0 +2,27 @@ +Mon Apr 8 12:26:15 UTC 2019 - cloud-devel@suse.de + +- update to version 1.10.1 + - Fix calls to functions removed from openstacksdk + - Update json module to jsonutils + - Imported Translations from Zanata + - Use template for lower-constraints + - Enable cluster profile only and replace function test + - Fix getting action id in Location header + - Use latest senlin microversion for Stein + - Change openstack-dev to openstack-discuss + - import zuul job settings from project-config + - Add Stein release notes + - Update reno for stable/rocky + - Don't quote {posargs} in tox.ini + - add python 3.6 unit test job + - Add senlinclient support bandit test + - Add Python 3.6 classifier to setup.cfg + - Bump openstacksdk to 0.24.0 + - switch documentation job to new PTI + - Update hacking version + - Fix _get_config_from_profile key building + - Update client to account for 409 error in cluster actions + - add python 3.7 unit test job + - Update python-senlinclient to use current openstacksdk + +------------------------------------------------------------------- Old: ---- python-senlinclient-1.8.0.tar.gz New: ---- python-senlinclient-1.10.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-senlinclient.spec ++++++ --- /var/tmp/diff_new_pack.GKOPjS/_old 2019-05-03 22:43:19.243354416 +0200 +++ /var/tmp/diff_new_pack.GKOPjS/_new 2019-05-03 22:43:19.243354416 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-senlinclient # -# 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 @@ -12,51 +12,62 @@ # 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/ # -%global sname python-senlinclient Name: python-senlinclient -Version: 1.8.0 +Version: 1.10.1 Release: 0 Summary: Python API and CLI for OpenStack Senlin License: Apache-2.0 Group: Development/Languages/Python -URL: https://launchpad.net/%{sname} -Source0: https://files.pythonhosted.org/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz +URL: https://launchpad.net/python-senlinclient +Source0: https://files.pythonhosted.org/packages/source/p/python-senlinclient/python-... BuildRequires: openstack-macros -BuildRequires: python-Babel >= 2.3.4 -BuildRequires: python-PrettyTable >= 0.7.2 -BuildRequires: python-PyYAML >= 3.12 -BuildRequires: python-appdirs BuildRequires: python-devel -BuildRequires: python-fixtures -BuildRequires: python-heatclient >= 1.10.0 -BuildRequires: python-jsonschema -BuildRequires: python-mock -BuildRequires: python-openstackclient -BuildRequires: python-openstacksdk >= 0.11.2 -BuildRequires: python-os-testr -BuildRequires: python-osc-lib >= 1.8.0 -BuildRequires: python-oslo.i18n >= 3.15.3 -BuildRequires: python-oslo.serialization >= 2.18.0 -BuildRequires: python-oslo.utils >= 3.33.0 -BuildRequires: python-oslotest -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-python-subunit -BuildRequires: python-requests >= 2.14.2 -BuildRequires: python-requests-mock -BuildRequires: python-stestr -BuildRequires: python-testtools +BuildRequires: python2-Babel >= 2.3.4 +BuildRequires: python2-PrettyTable >= 0.7.2 +BuildRequires: python2-PyYAML >= 3.12 +BuildRequires: python2-fixtures +BuildRequires: python2-heatclient >= 1.10.0 +BuildRequires: python2-mock +BuildRequires: python2-openstackclient +BuildRequires: python2-openstacksdk >= 0.24.0 +BuildRequires: python2-osc-lib >= 1.8.0 +BuildRequires: python2-oslo.i18n >= 3.15.3 +BuildRequires: python2-oslo.serialization >= 2.18.0 +BuildRequires: python2-oslo.utils >= 3.33.0 +BuildRequires: python2-oslotest +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-requests >= 2.14.2 +BuildRequires: python2-requests-mock +BuildRequires: python2-stestr +BuildRequires: python3-Babel >= 2.3.4 +BuildRequires: python3-PrettyTable >= 0.7.2 +BuildRequires: python3-PyYAML >= 3.12 +BuildRequires: python3-devel +BuildRequires: python3-fixtures +BuildRequires: python3-heatclient >= 1.10.0 +BuildRequires: python3-mock +BuildRequires: python3-openstackclient +BuildRequires: python3-openstacksdk >= 0.24.0 +BuildRequires: python3-osc-lib >= 1.8.0 +BuildRequires: python3-oslo.i18n >= 3.15.3 +BuildRequires: python3-oslo.serialization >= 2.18.0 +BuildRequires: python3-oslo.utils >= 3.33.0 +BuildRequires: python3-oslotest +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-requests >= 2.14.2 +BuildRequires: python3-requests-mock +BuildRequires: python3-stestr +Requires: python-Babel >= 2.3.4 Requires: python-PrettyTable >= 0.7.2 Requires: python-PyYAML >= 3.12 -Requires: python-appdirs Requires: python-heatclient >= 1.10.0 -Requires: python-jsonschema Requires: python-keystoneauth1 >= 3.4.0 Requires: python-openstackclient -Requires: python-openstacksdk >= 0.11.2 +Requires: python-openstacksdk >= 0.24.0 Requires: python-osc-lib >= 1.8.0 Requires: python-oslo.i18n >= 3.15.3 Requires: python-oslo.serialization >= 2.18.0 @@ -65,6 +76,7 @@ Requires: python-requests >= 2.14.2 Requires: python-six >= 1.10.0 BuildArch: noarch +%python_subpackages %description OpenStack Clustering service Provisioning API Client Library @@ -72,24 +84,24 @@ This is a client for the OpenStack Senlin API. It provides a Python API (the senlinclient module). -%package doc +%package -n python-senlinclient-doc Summary: Documentation for OpenStack Senlin API Client Group: Documentation/HTML BuildRequires: python-Sphinx BuildRequires: python-openstackdocstheme BuildRequires: python-reno -%description doc +%description -n python-senlinclient-doc This is a client for the OpenStack Senlin API. It implements 100% of the OpenStack Senlin API. This package contains auto-generated documentation. %prep -%autosetup -n %{sname}-%{version} +%autosetup -p1 -n python-senlinclient-1.10.1 %py_req_cleanup %build -%{py2_build} +%{python_build} %{__python2} setup.py build_sphinx PBR_VERSION=%version sphinx-build -b html doc/source doc/build/html @@ -97,18 +109,18 @@ rm -rf doc/build/html/.{doctrees,buildinfo} %install -%{py2_install} +%{python_install} %check -stestr run +%python_exec -m stestr.cli run -%files +%files %{python_files} %license LICENSE %doc README.rst -%{python2_sitelib}/senlinclient -%{python2_sitelib}/*.egg-info +%{python_sitelib}/senlinclient +%{python_sitelib}/*.egg-info -%files doc +%files -n python-senlinclient-doc %license LICENSE %doc doc/build/html ++++++ _service ++++++ --- /var/tmp/diff_new_pack.GKOPjS/_old 2019-05-03 22:43:19.263354458 +0200 +++ /var/tmp/diff_new_pack.GKOPjS/_new 2019-05-03 22:43:19.263354458 +0200 @@ -1,8 +1,8 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/rocky/openstack/python-senlinclient/python-senlinclient.spec.j2</param> + <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/stein/openstack/python-senlinclient/python-senlinclient.spec.j2</param> <param name="output-name">python-senlinclient.spec</param> - <param name="requirements">https://raw.githubusercontent.com/openstack/python-senlinclient/stable/rocky/requirements.txt</param> + <param name="requirements">https://raw.githubusercontent.com/openstack/python-senlinclient/stable/stein/requirements.txt</param> <param name="changelog-email">cloud-devel@suse.de</param> <param name="changelog-provider">gh,openstack,python-senlinclient</param> </service> ++++++ python-senlinclient-1.8.0.tar.gz -> python-senlinclient-1.10.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/.zuul.yaml new/python-senlinclient-1.10.1/.zuul.yaml --- old/python-senlinclient-1.8.0/.zuul.yaml 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/.zuul.yaml 2019-03-08 01:47:21.000000000 +0100 @@ -10,13 +10,17 @@ - openstack/senlin - project: + templates: + - check-requirements + - openstack-lower-constraints-jobs + - openstack-python-jobs + - openstack-python35-jobs + - openstack-python36-jobs + - openstack-python37-jobs + - openstackclient-plugin-jobs + - publish-openstack-docs-pti + - release-notes-jobs-python3 check: jobs: - senlinclient-dsvm-functional: voting: false - - openstack-tox-lower-constraints - gate: - jobs: - - senlinclient-dsvm-functional: - voting: false - - openstack-tox-lower-constraints diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/AUTHORS new/python-senlinclient-1.10.1/AUTHORS --- old/python-senlinclient-1.8.0/AUTHORS 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/AUTHORS 2019-03-08 01:49:25.000000000 +0100 @@ -6,6 +6,7 @@ Christopher Stone <cstone@blizzard.com> Cindia-blue <lxinhui@vmware.com> Doug Hellmann <doug@doughellmann.com> +Duc Truong <dtruong@blizzard.com> EldonZhao <xyz_213083464@126.com> Erik Olof Gunnar Andersson <eandersson@blizzard.com> Ethan Lynn <xjunlin@cn.ibm.com> @@ -20,10 +21,12 @@ Jeffrey Guan <double12gzh@gmail.com> Jeremy Liu <liujiong@gohighsec.com> Jeremy Stanley <fungi@yuggoth.org> +Jude Cross <jucross@blizzard.com> KATO Tomoyuki <kato.tomoyuki@jp.fujitsu.com> LiuNanke <nanke.liu@easystack.cn> Liuqing Jing <lawrancejing@gmail.com> Lu lei <lei.lu@easystack.cn> +Monty Taylor <mordred@inaugust.com> Navneet Gupta <navneet@us.ibm.com> Nguyen Hai <nguyentrihai93@gmail.com> Ondřej Nový <ondrej.novy@firma.seznam.cz> @@ -36,18 +39,21 @@ Sharat Sharma <sharat.sharma@nectechnologies.in> Tang Chen <chen.tang@easystack.cn> Thomas Bechtold <tbechtold@suse.com> +Thomas Herve <therve@redhat.com> Tony Breeds <tony@bakeyournoodle.com> Tovin Seven <vinhnt@vn.fujitsu.com> +Vieri <15050873171@163.com> Vu Cong Tuan <tuanvc@vn.fujitsu.com> XueFeng Liu <liu.xuefeng1@zte.com.cn> Yanyan Hu <yanyanhu@cn.ibm.com> Yuanbin.Chen <cybing4@gmail.com> +ZhijunWei <wzj334965317@outlook.com> ZhongShengping <chdzsp@163.com> -Zuul <zuul@review.openstack.org> bhavani.cr <bhavani.r@nectechnologies.in> blkart <blkart.org@gmail.com> blue55 <yllan@fiberhome.com> caishan <caishan1993@foxmail.com> +cao.yuan <cao.yuan@99cloud.net> chenpengzi <1523688226@qq.com> chohoor <chohoor@gmail.com> dixiaoli <dixiaobj@cn.ibm.com> @@ -67,8 +73,10 @@ pawnesh.kumar <pawnesh.kumar@nectechnologies.in> pengdake <19921207pq@gmail.com> qinchunhua <qin.chunhua@zte.com.cn> +qingszhao <zhao.daqing@99cloud.net> shangxiaobj <shangxiaobj@inspur.com> shu-mutou <shu-mutou@rf.jp.nec.com> +sunjia <sunjia@inspur.com> tengqm <tengqim@cn.ibm.com> venkatamahesh <venkatamaheshkotha@gmail.com> xiaolihope <dixiaobj@cn.ibm.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/ChangeLog new/python-senlinclient-1.10.1/ChangeLog --- old/python-senlinclient-1.8.0/ChangeLog 2018-08-08 20:27:16.000000000 +0200 +++ new/python-senlinclient-1.10.1/ChangeLog 2019-03-08 01:49:25.000000000 +0100 @@ -1,12 +1,46 @@ CHANGES ======= +1.10.1 +------ + +* Use latest senlin microversion for Stein +* Update json module to jsonutils + +1.10.0 +------ + +* Add Stein release notes +* add python 3.7 unit test job +* Bump openstacksdk to 0.24.0 +* Fix getting action id in Location header +* Update hacking version +* Use template for lower-constraints +* Fix calls to functions removed from openstacksdk +* Change openstack-dev to openstack-discuss +* Add Python 3.6 classifier to setup.cfg +* Fix \_get\_config\_from\_profile key building + +1.9.0 +----- + +* Don't quote {posargs} in tox.ini +* Add senlinclient support bandit test +* Enable cluster profile only and replace function test +* add python 3.6 unit test job +* switch documentation job to new PTI +* import zuul job settings from project-config +* Update python-senlinclient to use current openstacksdk +* Imported Translations from Zanata +* Update reno for stable/rocky + 1.8.0 ----- * Rocky releasenotes for python-senlinclient * Zuul enable senlinclient function check * Add cluster and receiver function test +* Update client to account for 409 error in cluster actions * Add function test path to test\_path * Switch to stestr * Change CURRENT\_API\_VERSION to "1.10" @@ -441,8 +475,8 @@ * Updated from global requirements * Change 'status\_code' to 'http\_status' to parse SDK's exception -0.3.0 ------ +0.3 +--- * Remove argparse from requirements * Updated from global requirements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/PKG-INFO new/python-senlinclient-1.10.1/PKG-INFO --- old/python-senlinclient-1.8.0/PKG-INFO 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/PKG-INFO 2019-03-08 01:49:25.000000000 +0100 @@ -1,10 +1,10 @@ Metadata-Version: 1.1 Name: python-senlinclient -Version: 1.8.0 +Version: 1.10.1 Summary: OpenStack Clustering API Client Library Home-page: https://docs.openstack.org/python-senlinclient/latest/ Author: OpenStack -Author-email: openstack-dev@lists.openstack.org +Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ======================== Team and repository tags @@ -37,3 +37,4 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/lower-constraints.txt new/python-senlinclient-1.10.1/lower-constraints.txt --- old/python-senlinclient-1.8.0/lower-constraints.txt 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/lower-constraints.txt 2019-03-08 01:47:21.000000000 +0100 @@ -39,7 +39,7 @@ netaddr==0.7.18 netifaces==0.10.4 openstackdocstheme==1.18.1 -openstacksdk==0.11.2 +openstacksdk==0.24.0 os-client-config==1.28.0 os-service-types==1.2.0 os-testr==1.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/python_senlinclient.egg-info/PKG-INFO new/python-senlinclient-1.10.1/python_senlinclient.egg-info/PKG-INFO --- old/python-senlinclient-1.8.0/python_senlinclient.egg-info/PKG-INFO 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/python_senlinclient.egg-info/PKG-INFO 2019-03-08 01:49:25.000000000 +0100 @@ -1,10 +1,10 @@ Metadata-Version: 1.1 Name: python-senlinclient -Version: 1.8.0 +Version: 1.10.1 Summary: OpenStack Clustering API Client Library Home-page: https://docs.openstack.org/python-senlinclient/latest/ Author: OpenStack -Author-email: openstack-dev@lists.openstack.org +Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ======================== Team and repository tags @@ -37,3 +37,4 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/python_senlinclient.egg-info/SOURCES.txt new/python-senlinclient-1.10.1/python_senlinclient.egg-info/SOURCES.txt --- old/python-senlinclient-1.8.0/python_senlinclient.egg-info/SOURCES.txt 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/python_senlinclient.egg-info/SOURCES.txt 2019-03-08 01:49:25.000000000 +0100 @@ -32,6 +32,7 @@ python_senlinclient.egg-info/requires.txt python_senlinclient.egg-info/top_level.txt releasenotes/notes/.placeholder +releasenotes/notes/bug-1814171-b1c58797c9ca9f44.yaml releasenotes/notes/cli-deprecation-241b9569b85f8fbd.yaml releasenotes/notes/cluster-collect-a9d1bc8c2e799c7c.yaml releasenotes/notes/cluster-policy-list-42ff03ef25d64dd1.yaml @@ -58,12 +59,11 @@ releasenotes/source/ocata.rst releasenotes/source/pike.rst releasenotes/source/queens.rst +releasenotes/source/rocky.rst releasenotes/source/unreleased.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po -releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po -releasenotes/source/locale/zh_CN/LC_MESSAGES/releasenotes.po senlinclient/__init__.py senlinclient/client.py senlinclient/plugin.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/python_senlinclient.egg-info/pbr.json new/python-senlinclient-1.10.1/python_senlinclient.egg-info/pbr.json --- old/python-senlinclient-1.8.0/python_senlinclient.egg-info/pbr.json 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/python_senlinclient.egg-info/pbr.json 2019-03-08 01:49:25.000000000 +0100 @@ -1 +1 @@ -{"git_version": "08649a0", "is_release": true} \ No newline at end of file +{"git_version": "5f9c27d", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/python_senlinclient.egg-info/requires.txt new/python-senlinclient-1.10.1/python_senlinclient.egg-info/requires.txt --- old/python-senlinclient-1.8.0/python_senlinclient.egg-info/requires.txt 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/python_senlinclient.egg-info/requires.txt 2019-03-08 01:49:25.000000000 +0100 @@ -2,7 +2,7 @@ pbr!=2.1.0,>=2.0.0 PrettyTable<0.8,>=0.7.2 keystoneauth1>=3.4.0 -openstacksdk>=0.11.2 +openstacksdk>=0.24.0 osc-lib>=1.8.0 oslo.i18n>=3.15.3 oslo.serialization!=2.19.1,>=2.18.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/notes/bug-1814171-b1c58797c9ca9f44.yaml new/python-senlinclient-1.10.1/releasenotes/notes/bug-1814171-b1c58797c9ca9f44.yaml --- old/python-senlinclient-1.8.0/releasenotes/notes/bug-1814171-b1c58797c9ca9f44.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-senlinclient-1.10.1/releasenotes/notes/bug-1814171-b1c58797c9ca9f44.yaml 2019-03-08 01:47:21.000000000 +0100 @@ -0,0 +1,6 @@ +--- +fixes: + - | + [`bug 1814171 <https://bugs.launchpad.net/senlin/+bug/1814171>`_] + Fixed a bug so that cluster delete and node delete return action id + associated with the delete action. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/source/index.rst new/python-senlinclient-1.10.1/releasenotes/source/index.rst --- old/python-senlinclient-1.8.0/releasenotes/source/index.rst 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/releasenotes/source/index.rst 2019-03-08 01:47:21.000000000 +0100 @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + rocky queens pike ocata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po new/python-senlinclient-1.10.1/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po --- old/python-senlinclient-1.8.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 2019-03-08 01:47:21.000000000 +0100 @@ -2,13 +2,13 @@ # Andi Chandler <andi@gowling.com>, 2018. #zanata msgid "" msgstr "" -"Project-Id-Version: Senlin Client Release Notes\n" +"Project-Id-Version: python-senlinclient\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-28 14:44+0000\n" +"POT-Creation-Date: 2018-08-13 16:27+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2018-02-09 10:54+0000\n" +"PO-Revision-Date: 2018-08-08 07:57+0000\n" "Last-Translator: Andi Chandler <andi@gowling.com>\n" "Language-Team: English (United Kingdom)\n" "Language: en_GB\n" @@ -71,9 +71,15 @@ msgid "Added command for node-check and node-recover." msgstr "Added command for node-check and node-recover." +msgid "Aded profile, policy, cluster and receiver functional test." +msgstr "Added profile, policy, cluster and receiver functional test." + msgid "Bug Fixes" msgstr "Bug Fixes" +msgid "Changed CURRENT_API_VERSION to \"1.10\"." +msgstr "Changed CURRENT_API_VERSION to \"1.10\"." + msgid "Current Series Release Notes" msgstr "Current Series Release Notes" @@ -105,6 +111,9 @@ msgid "Fix resource update operations." msgstr "Fix resource update operations." +msgid "Fix tox python3 overrides." +msgstr "Fix tox python3 overrides." + msgid "Fixed a bug that force deletion of cluster or node was not working." msgstr "Fixed a bug that force deletion of cluster or node was not working." @@ -112,9 +121,18 @@ msgstr "" "Fixed a bug that region name is not respected when connecting to cloud." +msgid "Fixed tox python3 overrides." +msgstr "Fixed tox python3 overrides." + +msgid "Followed the new PTI for document build." +msgstr "Followed the new PTI for document build." + msgid "Help message for metadata clean operations." msgstr "Help message for metadata clean operations." +msgid "Improved functional test for python-senlinclient." +msgstr "Improved functional test for python-senlinclient." + msgid "New Features" msgstr "New Features" @@ -143,6 +161,9 @@ msgid "Remove unsupported sort key \"user\" for event-list." msgstr "Remove unsupported sort key \"user\" for event-list." +msgid "Removed pypy because pypy is no longer supported by oslo libraries." +msgstr "Removed pypy because pypy is no longer supported by oslo libraries." + msgid "Senlin Client Release Notes" msgstr "Senlin Client Release Notes" @@ -152,6 +173,9 @@ msgid "Support node replace operation." msgstr "Support node replace operation." +msgid "Switched testr switch to stestr." +msgstr "Switched testr switch to stestr." + msgid "" "The 'senlin' CLI will be removed in April 2017. This message is now " "explicitly printed when senlin CLI commands are invoked." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po new/python-senlinclient-1.10.1/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po --- old/python-senlinclient-1.8.0/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -# Gérald LONLAS <g.lonlas@gmail.com>, 2016. #zanata -msgid "" -msgstr "" -"Project-Id-Version: Senlin Client Release Notes 1.4.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-09 13:26+0000\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2016-10-22 06:14+0000\n" -"Last-Translator: Gérald LONLAS <g.lonlas@gmail.com>\n" -"Language-Team: French\n" -"Language: fr\n" -"X-Generator: Zanata 3.9.6\n" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" - -msgid "0.5.0" -msgstr "0.5.0" - -msgid "1.0.0" -msgstr "1.0.0" - -msgid "Bug Fixes" -msgstr "Corrections de bugs" - -msgid "Current Series Release Notes" -msgstr "Note de la release actuelle" - -msgid "New Features" -msgstr "Nouvelles fonctionnalités" - -msgid "Newton Series Release Notes" -msgstr "Note de release pour Newton" - -msgid "Other Notes" -msgstr "Autres notes" - -msgid "Senlin Client Release Notes" -msgstr "Note de release du Client Senlin" - -msgid "Upgrade Notes" -msgstr "Notes de mises à jours" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/source/locale/zh_CN/LC_MESSAGES/releasenotes.po new/python-senlinclient-1.10.1/releasenotes/source/locale/zh_CN/LC_MESSAGES/releasenotes.po --- old/python-senlinclient-1.8.0/releasenotes/source/locale/zh_CN/LC_MESSAGES/releasenotes.po 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/releasenotes/source/locale/zh_CN/LC_MESSAGES/releasenotes.po 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -# zzxwill <zzxwill@gmail.com>, 2016. #zanata -msgid "" -msgstr "" -"Project-Id-Version: Senlin Client Release Notes\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-28 14:44+0000\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2016-06-25 02:41+0000\n" -"Last-Translator: zzxwill <zzxwill@gmail.com>\n" -"Language-Team: Chinese (China)\n" -"Language: zh_CN\n" -"X-Generator: Zanata 4.3.3\n" -"Plural-Forms: nplurals=1; plural=0\n" - -msgid "0.5.0" -msgstr "0.5.0" - -msgid "Added command for node-check and node-recover." -msgstr "已为node-check和node-recover添加了命令。" - -msgid "Current Series Release Notes" -msgstr "当前版本发布说明" - -msgid "New Features" -msgstr "新特性" - -msgid "" -"OSC commands for cluster scaling are changed from 'cluster scale in' and " -"'cluster scale out' to 'cluster shrink' and 'cluster expand' respectively." -msgstr "" -"集群扩展的OSC命令分别从'cluster scale in'和'cluster scale out'改成了'cluster " -"shrink'和'cluster expand'。" - -msgid "Senlin Client Release Notes" -msgstr "Senlin Client发布说明" - -msgid "Upgrade Notes" -msgstr "升级说明" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/releasenotes/source/rocky.rst new/python-senlinclient-1.10.1/releasenotes/source/rocky.rst --- old/python-senlinclient-1.8.0/releasenotes/source/rocky.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/python-senlinclient-1.10.1/releasenotes/source/rocky.rst 2019-03-08 01:47:21.000000000 +0100 @@ -0,0 +1,6 @@ +=================================== + Rocky Series Release Notes +=================================== + +.. release-notes:: + :branch: stable/rocky diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/requirements.txt new/python-senlinclient-1.10.1/requirements.txt --- old/python-senlinclient-1.8.0/requirements.txt 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/requirements.txt 2019-03-08 01:47:21.000000000 +0100 @@ -6,7 +6,7 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 PrettyTable<0.8,>=0.7.2 # BSD keystoneauth1>=3.4.0 # Apache-2.0 -openstacksdk>=0.11.2 # Apache-2.0 +openstacksdk>=0.24.0 # Apache-2.0 osc-lib>=1.8.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/plugin.py new/python-senlinclient-1.10.1/senlinclient/plugin.py --- old/python-senlinclient-1.8.0/senlinclient/plugin.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/plugin.py 2019-03-08 01:47:24.000000000 +0100 @@ -14,8 +14,9 @@ import logging +from openstack.config import cloud_region +from openstack.config import defaults as config_defaults from openstack import connection -from openstack import profile from osc_lib import utils LOG = logging.getLogger(__name__) @@ -23,38 +24,84 @@ DEFAULT_CLUSTERING_API_VERSION = '1' API_VERSION_OPTION = 'os_clustering_api_version' API_NAME = 'clustering' -CURRENT_API_VERSION = '1.10' +CURRENT_API_VERSION = '1.12' -def create_connection(prof=None, **kwargs): - interface = kwargs.pop('interface', None) - region_name = kwargs.pop('region_name', None) - user_agent = kwargs.pop('user_agent', None) - - if not prof: - prof = profile.Profile() - prof.set_api_version(API_NAME, CURRENT_API_VERSION) - - if interface: - prof.set_interface(API_NAME, interface) - if region_name: - prof.set_region(API_NAME, region_name) +def _make_key(service_type, key): + if not service_type: + return key + else: + service_type = service_type.lower().replace('-', '_') + return "_".join([service_type, key]) + + +def _get_config_from_profile(profile, **kwargs): + # Deal with clients still trying to use legacy profile objects + region_name = None + for service in profile.get_services(): + if service.region: + region_name = service.region + service_type = service.service_type + if service.interface: + key = _make_key(service_type, 'interface') + kwargs[key] = service.interface + if service.version: + version = service.version + if version.startswith('v'): + version = version[1:] + key = _make_key(service_type, 'api_version') + kwargs[key] = version + if service.api_version: + version = service.api_version + key = _make_key(service_type, 'default_microversion') + kwargs[key] = version + + config_kwargs = config_defaults.get_defaults() + config_kwargs.update(kwargs) + config = cloud_region.CloudRegion( + region_name=region_name, config=config_kwargs) + return config + + +def create_connection(prof=None, cloud_region=None, **kwargs): + version_key = _make_key(API_NAME, 'api_version') + kwargs[version_key] = CURRENT_API_VERSION + + if not cloud_region: + if prof: + cloud_region = _get_config_from_profile(prof, **kwargs) + else: + # If we got the CloudRegion from python-openstackclient and it doesn't + # already have a default microversion set, set it here. + microversion_key = _make_key(API_NAME, 'default_microversion') + cloud_region.config.setdefault(microversion_key, CURRENT_API_VERSION) - return connection.Connection(profile=prof, user_agent=user_agent, **kwargs) + user_agent = kwargs.pop('user_agent', None) + app_name = kwargs.pop('app_name', None) + app_version = kwargs.pop('app_version', None) + if user_agent is not None and (not app_name and not app_version): + app_name, app_version = user_agent.split('/', 1) + + return connection.Connection( + config=cloud_region, + app_name=app_name, + app_version=app_version, **kwargs) def make_client(instance): """Returns a clustering proxy""" + # TODO(mordred) the ClientManager already has an OpenStackSDK connection, + # but it only has it once setup_auth has been called. For things that + # don't require auth, this is problematic, so we have to make our own. + # Use the CloudRegion stored on the ClientManager for now. conn = create_connection( - region_name=instance.region_name, - interface=instance.interface, - authenticator=instance.session.auth + cloud_region=instance._cli_options, ) LOG.debug('Connection: %s', conn) LOG.debug('Clustering client initialized using OpenStackSDK: %s', - conn.cluster) - return conn.cluster + conn.clustering) + return conn.clustering def build_option_parser(parser): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/functional/test_clusters.py new/python-senlinclient-1.10.1/senlinclient/tests/functional/test_clusters.py --- old/python-senlinclient-1.8.0/senlinclient/tests/functional/test_clusters.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/functional/test_clusters.py 2019-03-08 01:47:21.000000000 +0100 @@ -9,7 +9,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -from tempest.lib import decorators from senlinclient.tests.functional import base @@ -82,10 +81,6 @@ self.assertEqual(cluster_data['timeout'], '300') self.assertEqual(new_pf['name'], node_data['profile_name']) - # (chenyb4) cluster update profile only need api microversion support, - # skip cluster update profile only before openstacksdk support - # api microversion. - @decorators.skip_because(bug="2003146") def test_cluster_update_profile_only(self): old_name = self.name_generate() old_pf = self.profile_create(old_name) @@ -257,9 +252,6 @@ self.assertEqual('', mem_del_data['node_ids']) self.assertNotIn(node['id'], mem_del_data['node_ids']) - # (chenyb4) cluster members replace need api microversion support, - # skip cluster members replace before openstacksdk support api microversion - @decorators.skip_because(bug="2003146") def test_cluster_members_replace(self): name = self.name_generate() pf = self.profile_create(name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/test_format_utils.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/test_format_utils.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/test_format_utils.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/test_format_utils.py 2019-03-08 01:47:24.000000000 +0100 @@ -10,9 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. -import json import yaml +from oslo_serialization import jsonutils + from osc_lib.tests import utils from senlinclient.common import format_utils @@ -46,7 +47,7 @@ def test_json_format(self): self.cmd = ShowJson(self.app, None) parsed_args = self.check_parser(self.cmd, [], []) - expected = json.dumps(dict(zip(columns, data)), indent=2) + expected = jsonutils.dumps(dict(zip(columns, data)), indent=2) self.cmd.run(parsed_args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/test_plugin.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/test_plugin.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/test_plugin.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/test_plugin.py 2019-03-08 01:47:24.000000000 +0100 @@ -12,7 +12,6 @@ import mock from openstack import connection as sdk_connection -from openstack import profile as sdk_profile import testtools from senlinclient import plugin @@ -22,7 +21,15 @@ @mock.patch.object(sdk_connection, 'Connection') def test_create_connection_with_profile(self, mock_connection): + class FakeService(object): + interface = 'public' + region = 'a_region' + version = '1' + api_version = None + service_type = 'clustering' + mock_prof = mock.Mock() + mock_prof.get_services.return_value = [FakeService()] mock_conn = mock.Mock() mock_connection.return_value = mock_conn kwargs = { @@ -31,20 +38,17 @@ 'auth_url': 'test_url' } res = plugin.create_connection(mock_prof, **kwargs) - mock_connection.assert_called_once_with(profile=mock_prof, - user_agent=None, - user_id='123', - password='abc', - auth_url='test_url') + mock_connection.assert_called_once_with( + app_name=None, app_version=None, + config=mock.ANY, + clustering_api_version=plugin.CURRENT_API_VERSION, + **kwargs + ) self.assertEqual(mock_conn, res) @mock.patch.object(sdk_connection, 'Connection') - @mock.patch.object(sdk_profile, 'Profile') - def test_create_connection_without_profile(self, mock_profile, - mock_connection): - mock_prof = mock.Mock() + def test_create_connection_without_profile(self, mock_connection): mock_conn = mock.Mock() - mock_profile.return_value = mock_prof mock_connection.return_value = mock_conn kwargs = { 'interface': 'public', @@ -55,11 +59,14 @@ } res = plugin.create_connection(**kwargs) - mock_prof.set_interface.assert_called_once_with('clustering', 'public') - mock_prof.set_region.assert_called_once_with('clustering', 'RegionOne') - mock_connection.assert_called_once_with(profile=mock_prof, - user_agent=None, - user_id='123', - password='abc', - auth_url='test_url') + mock_connection.assert_called_once_with( + app_name=None, app_version=None, + auth_url='test_url', + clustering_api_version=plugin.CURRENT_API_VERSION, + config=None, + interface='public', + password='abc', + region_name='RegionOne', + user_id='123' + ) self.assertEqual(mock_conn, res) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/fakes.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/fakes.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/fakes.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/fakes.py 2019-03-08 01:47:24.000000000 +0100 @@ -12,12 +12,11 @@ import sys -import json import mock from osc_lib.tests import utils import requests -import six +from oslo_serialization import jsonutils AUTH_TOKEN = "foobar" AUTH_URL = "http://0.0.0.0" @@ -158,9 +157,7 @@ self.status_code = status_code self.headers.update(headers) - self._content = json.dumps(data) - if not isinstance(self._content, six.binary_type): - self._content = self._content.encode() + self._content = jsonutils.dump_as_bytes(data) class FakeClusteringv1Client(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_client.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_client.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_client.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_client.py 2019-03-08 01:47:21.000000000 +0100 @@ -220,8 +220,8 @@ sc = client.Client() res = sc.cluster_add_nodes('FAKE_ID', ['NODE1', 'NODE2']) - self.assertEqual(self.service.cluster_add_nodes.return_value, res) - self.service.cluster_add_nodes.assert_called_once_with( + self.assertEqual(self.service.add_nodes_to_cluster.return_value, res) + self.service.add_nodes_to_cluster.assert_called_once_with( 'FAKE_ID', ['NODE1', 'NODE2']) def test_cluster_del_nodes(self, mock_conn): @@ -229,8 +229,9 @@ sc = client.Client() res = sc.cluster_del_nodes('FAKE_ID', ['NODE1', 'NODE2']) - self.assertEqual(self.service.cluster_del_nodes.return_value, res) - self.service.cluster_del_nodes.assert_called_once_with( + self.assertEqual(self.service.remove_nodes_from_cluster.return_value, + res) + self.service.remove_nodes_from_cluster.assert_called_once_with( 'FAKE_ID', ['NODE1', 'NODE2']) def test_cluster_resize(self, mock_conn): @@ -238,8 +239,8 @@ sc = client.Client() res = sc.cluster_resize('FAKE_ID', foo='bar', zoo=1) - self.assertEqual(self.service.cluster_resize.return_value, res) - self.service.cluster_resize.assert_called_once_with( + self.assertEqual(self.service.resize_cluster.return_value, res) + self.service.resize_cluster.assert_called_once_with( 'FAKE_ID', foo='bar', zoo=1) def test_cluster_scale_in(self, mock_conn): @@ -247,8 +248,8 @@ sc = client.Client() res = sc.cluster_scale_in('FAKE_ID', 3) - self.assertEqual(self.service.cluster_scale_in.return_value, res) - self.service.cluster_scale_in.assert_called_once_with( + self.assertEqual(self.service.scale_in_cluster.return_value, res) + self.service.scale_in_cluster.assert_called_once_with( 'FAKE_ID', 3) def test_cluster_scale_out(self, mock_conn): @@ -256,8 +257,8 @@ sc = client.Client() res = sc.cluster_scale_out('FAKE_ID', 3) - self.assertEqual(self.service.cluster_scale_out.return_value, res) - self.service.cluster_scale_out.assert_called_once_with( + self.assertEqual(self.service.scale_out_cluster.return_value, res) + self.service.scale_out_cluster.assert_called_once_with( 'FAKE_ID', 3) def test_cluster_policies(self, mock_conn): @@ -283,8 +284,9 @@ sc = client.Client() res = sc.cluster_attach_policy('FOO', 'BAR', zoo='car') - self.assertEqual(self.service.cluster_attach_policy.return_value, res) - self.service.cluster_attach_policy.assert_called_once_with( + self.assertEqual(self.service.attach_policy_to_cluster.return_value, + res) + self.service.attach_policy_to_cluster.assert_called_once_with( 'FOO', 'BAR', zoo='car') def test_cluster_detach_policy(self, mock_conn): @@ -292,8 +294,9 @@ sc = client.Client() res = sc.cluster_detach_policy('FOO', 'BAR') - self.assertEqual(self.service.cluster_detach_policy.return_value, res) - self.service.cluster_detach_policy.assert_called_once_with( + self.assertEqual(self.service.detach_policy_from_cluster.return_value, + res) + self.service.detach_policy_from_cluster.assert_called_once_with( 'FOO', 'BAR') def test_cluster_update_policy(self, mock_conn): @@ -301,8 +304,8 @@ sc = client.Client() res = sc.cluster_update_policy('FOO', 'BAR', foo='bar') - self.assertEqual(self.service.cluster_update_policy.return_value, res) - self.service.cluster_update_policy.assert_called_once_with( + self.assertEqual(self.service.update_cluster_policy.return_value, res) + self.service.update_cluster_policy.assert_called_once_with( 'FOO', 'BAR', foo='bar') def test_check_cluster(self, mock_conn): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_cluster.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_cluster.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_cluster.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_cluster.py 2019-03-08 01:47:21.000000000 +0100 @@ -432,7 +432,7 @@ def setUp(self): super(TestClusterResize, self).setUp() self.cmd = osc_cluster.ResizeCluster(self.app, None) - self.mock_client.cluster_resize = mock.Mock( + self.mock_client.resize_cluster = mock.Mock( return_value=self.response) def test_cluster_resize_no_params(self): @@ -460,7 +460,7 @@ 'my_cluster', '--strict'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_resize.assert_called_with('my_cluster', + self.mock_client.resize_cluster.assert_called_with('my_cluster', **self.defaults) def test_cluster_resize_invalid_capacity(self): @@ -481,7 +481,7 @@ kwargs['number'] = 1 parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_resize.assert_called_with('my_cluster', + self.mock_client.resize_cluster.assert_called_with('my_cluster', **kwargs) def test_cluster_resize_invalid_adjustment(self): @@ -501,7 +501,7 @@ kwargs['adjustment_type'] = 'CHANGE_IN_PERCENTAGE' kwargs['number'] = 50.0 self.cmd.take_action(parsed_args) - self.mock_client.cluster_resize.assert_called_with('my_cluster', + self.mock_client.resize_cluster.assert_called_with('my_cluster', **kwargs) def test_cluster_resize_invalid_percentage(self): @@ -568,14 +568,14 @@ def setUp(self): super(TestClusterScaleIn, self).setUp() self.cmd = osc_cluster.ScaleInCluster(self.app, None) - self.mock_client.cluster_scale_in = mock.Mock( + self.mock_client.scale_in_cluster = mock.Mock( return_value=self.response) def test_cluster_scale_in(self): arglist = ['--count', '2', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_scale_in.assert_called_with('my_cluster', + self.mock_client.scale_in_cluster.assert_called_with('my_cluster', '2') @@ -585,14 +585,14 @@ def setUp(self): super(TestClusterScaleOut, self).setUp() self.cmd = osc_cluster.ScaleOutCluster(self.app, None) - self.mock_client.cluster_scale_out = mock.Mock( + self.mock_client.scale_out_cluster = mock.Mock( return_value=self.response) - def test_cluster_scale_in(self): + def test_cluster_scale_out(self): arglist = ['--count', '2', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_scale_out.assert_called_with('my_cluster', + self.mock_client.scale_out_cluster.assert_called_with('my_cluster', '2') @@ -602,14 +602,14 @@ def setUp(self): super(TestClusterPolicyAttach, self).setUp() self.cmd = osc_cluster.ClusterPolicyAttach(self.app, None) - self.mock_client.cluster_attach_policy = mock.Mock( + self.mock_client.attach_policy_to_cluster = mock.Mock( return_value=self.response) def test_cluster_policy_attach(self): arglist = ['--policy', 'my_policy', '--enabled', 'True', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_attach_policy.assert_called_with( + self.mock_client.attach_policy_to_cluster.assert_called_with( 'my_cluster', 'my_policy', enabled=True) @@ -621,14 +621,14 @@ def setUp(self): super(TestClusterPolicyDetach, self).setUp() self.cmd = osc_cluster.ClusterPolicyDetach(self.app, None) - self.mock_client.cluster_detach_policy = mock.Mock( + self.mock_client.detach_policy_from_cluster = mock.Mock( return_value=self.response) def test_cluster_policy_detach(self): arglist = ['--policy', 'my_policy', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_detach_policy.assert_called_with( + self.mock_client.detach_policy_from_cluster.assert_called_with( 'my_cluster', 'my_policy') @@ -711,14 +711,14 @@ def setUp(self): super(TestClusterNodeAdd, self).setUp() self.cmd = osc_cluster.ClusterNodeAdd(self.app, None) - self.mock_client.cluster_add_nodes = mock.Mock( + self.mock_client.add_nodes_to_cluster = mock.Mock( return_value=self.response) def test_cluster_node_add(self): arglist = ['--nodes', 'node1', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_add_nodes.assert_called_with( + self.mock_client.add_nodes_to_cluster.assert_called_with( 'my_cluster', ['node1']) @@ -726,7 +726,7 @@ arglist = ['--nodes', 'node1,node2', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_add_nodes.assert_called_with( + self.mock_client.add_nodes_to_cluster.assert_called_with( 'my_cluster', ['node1', 'node2']) @@ -737,14 +737,14 @@ def setUp(self): super(TestClusterNodeDel, self).setUp() self.cmd = osc_cluster.ClusterNodeDel(self.app, None) - self.mock_client.cluster_del_nodes = mock.Mock( + self.mock_client.remove_nodes_from_cluster = mock.Mock( return_value=self.response) def test_cluster_node_delete(self): arglist = ['-d', 'True', '--nodes', 'node1', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_del_nodes.assert_called_with( + self.mock_client.remove_nodes_from_cluster.assert_called_with( 'my_cluster', ['node1'], destroy_after_deletion=True) @@ -753,7 +753,7 @@ arglist = ['-d', 'False', '--nodes', 'node1', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_del_nodes.assert_called_with( + self.mock_client.remove_nodes_from_cluster.assert_called_with( 'my_cluster', ['node1'], destroy_after_deletion=False) @@ -762,7 +762,7 @@ arglist = ['--nodes', 'node1,node2', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_del_nodes.assert_called_with( + self.mock_client.remove_nodes_from_cluster.assert_called_with( 'my_cluster', ['node1', 'node2'], destroy_after_deletion=False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_cluster_policy.py new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_cluster_policy.py --- old/python-senlinclient-1.8.0/senlinclient/tests/unit/v1/test_cluster_policy.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/tests/unit/v1/test_cluster_policy.py 2019-03-08 01:47:21.000000000 +0100 @@ -89,12 +89,12 @@ super(TestClusterPolicyUpdate, self).setUp() self.cmd = osc_cluster_policy.ClusterPolicyUpdate(self.app, None) fake_resp = {"action": "8bb476c3-0f4c-44ee-9f64-c7b0260814de"} - self.mock_client.cluster_update_policy = mock.Mock( + self.mock_client.update_cluster_policy = mock.Mock( return_value=fake_resp) def test_cluster_policy_update(self): arglist = ['--policy', 'my_policy', '--enabled', 'true', 'my_cluster'] parsed_args = self.check_parser(self.cmd, arglist, []) self.cmd.take_action(parsed_args) - self.mock_client.cluster_update_policy.assert_called_with( + self.mock_client.update_cluster_policy.assert_called_with( 'my_cluster', 'my_policy', enabled=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/v1/client.py new/python-senlinclient-1.10.1/senlinclient/v1/client.py --- old/python-senlinclient-1.8.0/senlinclient/v1/client.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/v1/client.py 2019-03-08 01:47:21.000000000 +0100 @@ -221,7 +221,7 @@ https://developer.openstack.org/api-ref/clustering/ #add-nodes-to-a-cluster """ - return self.service.cluster_add_nodes(cluster, nodes) + return self.service.add_nodes_to_cluster(cluster, nodes) def cluster_del_nodes(self, cluster, nodes): """Delete a node belongs to cluster @@ -230,7 +230,7 @@ https://developer.openstack.org/api-ref/clustering/ #remove-nodes-from-a-cluster """ - return self.service.cluster_del_nodes(cluster, nodes) + return self.service.remove_nodes_from_cluster(cluster, nodes) def cluster_replace_nodes(self, cluster, nodes): """Replace the nodes in a cluster with specified nodes @@ -239,7 +239,7 @@ https://developer.openstack.org/api-ref/clustering/ #replace-nodes-in-a-cluster """ - return self.service.cluster_replace_nodes(cluster, nodes) + return self.service.replace_nodes_in_cluster(cluster, nodes) def cluster_resize(self, cluster, **params): """Resize cluster @@ -247,7 +247,7 @@ Doc link: https://developer.openstack.org/api-ref/clustering/#resize-a-cluster """ - return self.service.cluster_resize(cluster, **params) + return self.service.resize_cluster(cluster, **params) def cluster_scale_out(self, cluster, count): """Scale out cluster @@ -255,7 +255,7 @@ Doc link: https://developer.openstack.org/api-ref/clustering/#scale-out-a-cluster """ - return self.service.cluster_scale_out(cluster, count) + return self.service.scale_out_cluster(cluster, count) def cluster_scale_in(self, cluster, count): """Scale in cluster @@ -263,7 +263,7 @@ Doc link: https://developer.openstack.org/api-ref/clustering/#scale-in-a-cluster """ - return self.service.cluster_scale_in(cluster, count) + return self.service.scale_in_cluster(cluster, count) def cluster_policies(self, cluster, **queries): """List all policies attached to cluster @@ -290,7 +290,7 @@ https://developer.openstack.org/api-ref/clustering/ #attach-a-policy-to-a-cluster """ - return self.service.cluster_attach_policy(cluster, policy, **attrs) + return self.service.attach_policy_to_cluster(cluster, policy, **attrs) def cluster_detach_policy(self, cluster, policy): """Detach a policy from cluster @@ -299,7 +299,7 @@ https://developer.openstack.org/api-ref/clustering/ #detach-a-policy-from-a-cluster """ - return self.service.cluster_detach_policy(cluster, policy) + return self.service.detach_policy_from_cluster(cluster, policy) def cluster_update_policy(self, cluster, policy, **attrs): """Update the policy attachment @@ -308,7 +308,7 @@ https://developer.openstack.org/api-ref/clustering/ #update-a-policy-on-a-cluster """ - return self.service.cluster_update_policy(cluster, policy, **attrs) + return self.service.update_cluster_policy(cluster, policy, **attrs) def collect_cluster_attrs(self, cluster, path): """Collect cluster attributes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/v1/cluster.py new/python-senlinclient-1.10.1/senlinclient/v1/cluster.py --- old/python-senlinclient-1.8.0/senlinclient/v1/cluster.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/v1/cluster.py 2019-03-08 01:47:21.000000000 +0100 @@ -358,9 +358,9 @@ result = {} for cid in parsed_args.cluster: try: - cluster = senlin_client.delete_cluster( + cluster_delete_action = senlin_client.delete_cluster( cid, False, parsed_args.force_delete) - result[cid] = ('OK', cluster.location.split('/')[-1]) + result[cid] = ('OK', cluster_delete_action['id']) except Exception as ex: result[cid] = ('ERROR', six.text_type(ex)) @@ -503,7 +503,7 @@ action_args['min_step'] = min_step action_args['strict'] = parsed_args.strict - resp = senlin_client.cluster_resize(parsed_args.cluster, **action_args) + resp = senlin_client.resize_cluster(parsed_args.cluster, **action_args) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -533,8 +533,12 @@ self.log.debug("take_action(%s)", parsed_args) senlin_client = self.app.client_manager.clustering - resp = senlin_client.cluster_scale_in(parsed_args.cluster, + resp = senlin_client.scale_in_cluster(parsed_args.cluster, parsed_args.count) + status_code = resp.get('code', None) + if status_code in [409]: + raise exc.CommandError(_( + 'Unable to scale in cluster: %s') % resp['error']['message']) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -564,8 +568,12 @@ self.log.debug("take_action(%s)", parsed_args) senlin_client = self.app.client_manager.clustering - resp = senlin_client.cluster_scale_out(parsed_args.cluster, + resp = senlin_client.scale_out_cluster(parsed_args.cluster, parsed_args.count) + status_code = resp.get('code', None) + if status_code in [409]: + raise exc.CommandError(_( + 'Unable to scale out cluster: %s') % resp['error']['message']) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -608,9 +616,9 @@ strict=True), } - resp = senlin_client.cluster_attach_policy(parsed_args.cluster, - parsed_args.policy, - **kwargs) + resp = senlin_client.attach_policy_to_cluster(parsed_args.cluster, + parsed_args.policy, + **kwargs) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -640,8 +648,8 @@ def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) senlin_client = self.app.client_manager.clustering - resp = senlin_client.cluster_detach_policy(parsed_args.cluster, - parsed_args.policy) + resp = senlin_client.detach_policy_from_cluster(parsed_args.cluster, + parsed_args.policy) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -750,7 +758,8 @@ self.log.debug("take_action(%s)", parsed_args) senlin_client = self.app.client_manager.clustering node_ids = parsed_args.nodes.split(',') - resp = senlin_client.cluster_add_nodes(parsed_args.cluster, node_ids) + resp = senlin_client.add_nodes_to_cluster(parsed_args.cluster, + node_ids) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -792,8 +801,8 @@ destroy = parsed_args.destroy_after_deletion destroy = strutils.bool_from_string(destroy, strict=True) kwargs = {"destroy_after_deletion": destroy} - resp = senlin_client.cluster_del_nodes(parsed_args.cluster, node_ids, - **kwargs) + resp = senlin_client.remove_nodes_from_cluster( + parsed_args.cluster, node_ids, **kwargs) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: @@ -831,8 +840,8 @@ key = nodepair.split('=')[0] value = nodepair.split('=')[1] nodepairs[key] = value - resp = senlin_client.cluster_replace_nodes(parsed_args.cluster, - nodepairs) + resp = senlin_client.replace_nodes_in_cluster(parsed_args.cluster, + nodepairs) if 'action' in resp: print('Request accepted by action: %s' % resp['action']) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/v1/cluster_policy.py new/python-senlinclient-1.10.1/senlinclient/v1/cluster_policy.py --- old/python-senlinclient-1.8.0/senlinclient/v1/cluster_policy.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/v1/cluster_policy.py 2019-03-08 01:47:21.000000000 +0100 @@ -150,7 +150,7 @@ strict=True), } - resp = senlin_client.cluster_update_policy(parsed_args.cluster, + resp = senlin_client.update_cluster_policy(parsed_args.cluster, parsed_args.policy, **kwargs) if 'action' in resp: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/senlinclient/v1/node.py new/python-senlinclient-1.10.1/senlinclient/v1/node.py --- old/python-senlinclient-1.8.0/senlinclient/v1/node.py 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/senlinclient/v1/node.py 2019-03-08 01:47:21.000000000 +0100 @@ -329,9 +329,9 @@ result = {} for nid in parsed_args.node: try: - node = senlin_client.delete_node( + node_delete_action = senlin_client.delete_node( nid, False, parsed_args.force_delete) - result[nid] = ('OK', node.location.split('/')[-1]) + result[nid] = ('OK', node_delete_action['id']) except Exception as ex: result[nid] = ('ERROR', six.text_type(ex)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/setup.cfg new/python-senlinclient-1.10.1/setup.cfg --- old/python-senlinclient-1.8.0/setup.cfg 2018-08-08 20:27:17.000000000 +0200 +++ new/python-senlinclient-1.10.1/setup.cfg 2019-03-08 01:49:25.000000000 +0100 @@ -4,7 +4,7 @@ description-file = README.rst author = OpenStack -author-email = openstack-dev@lists.openstack.org +author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/python-senlinclient/latest/ classifier = Environment :: OpenStack @@ -17,6 +17,7 @@ Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 [files] packages = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/test-requirements.txt new/python-senlinclient-1.10.1/test-requirements.txt --- old/python-senlinclient-1.8.0/test-requirements.txt 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/test-requirements.txt 2019-03-08 01:47:21.000000000 +0100 @@ -3,7 +3,8 @@ # process, which may cause wedges in the gate later. # Hacking already pins down pep8, pyflakes and flake8 -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +bandit>=1.1.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD requests-mock>=1.2.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-senlinclient-1.8.0/tox.ini new/python-senlinclient-1.10.1/tox.ini --- old/python-senlinclient-1.8.0/tox.ini 2018-08-08 20:23:54.000000000 +0200 +++ new/python-senlinclient-1.10.1/tox.ini 2019-03-08 01:47:21.000000000 +0100 @@ -17,6 +17,11 @@ stestr run --slowest {posargs} whitelist_externals = find +[testenv:bandit] +basepython = python3 +deps = -r{toxinidir}/test-requirements.txt +commands = bandit -r senlinclient -x tests -n5 -ll + [testenv:pep8] basepython = python3 commands = @@ -40,7 +45,7 @@ setenv = PYTHON=coverage run --source senlinclient --parallel-mode commands = - stestr run '{posargs}' + stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml
participants (1)
-
root