Hello community,
here is the log from the commit of package python-senlinclient for
openSUSE:Factory checked in at 2020-07-15 11:28:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-senlinclient (Old)
and /work/SRC/openSUSE:Factory/.python-senlinclient.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-senlinclient"
Wed Jul 15 11:28:05 2020 rev:10 rq:812567 version:2.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-senlinclient/python-senlinclient.changes
2020-03-24 22:32:06.249082114 +0100
+++
/work/SRC/openSUSE:Factory/.python-senlinclient.new.3060/python-senlinclient.changes
2020-07-15 11:30:58.741953239 +0200
@@ -1,0 +2,12 @@
+Tue May 12 10:05:50 UTC 2020 - [email protected]
+
+- update to version 2.0.1
+ - Change default API version to 1.14
+ - Add support for node tainted field
+ - Update master for stable/train
+ - Return meta-data field for events list
+ - Add action update command
+ - Drop python 2.7 support and testing
+ - Flush confirmation messages
+
+-------------------------------------------------------------------
Old:
----
python-senlinclient-1.11.0.tar.gz
New:
----
python-senlinclient-2.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-senlinclient.spec ++++++
--- /var/tmp/diff_new_pack.yV5tSF/_old 2020-07-15 11:31:04.389959179 +0200
+++ /var/tmp/diff_new_pack.yV5tSF/_new 2020-07-15 11:31:04.393959183 +0200
@@ -17,13 +17,13 @@
Name: python-senlinclient
-Version: 1.11.0
+Version: 2.0.1
Release: 0
Summary: Python API and CLI for OpenStack Senlin
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/python-senlinclient
-Source0:
https://files.pythonhosted.org/packages/source/p/python-senlinclient/python-senlinclient-1.11.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/p/python-senlinclient/python-senlinclient-2.0.1.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-Babel >= 2.3.4
BuildRequires: python3-PrettyTable >= 0.7.2
@@ -90,7 +90,7 @@
auto-generated documentation.
%prep
-%autosetup -p1 -n python-senlinclient-1.11.0
+%autosetup -p1 -n python-senlinclient-2.0.1
%py_req_cleanup
%build
++++++ _service ++++++
--- /var/tmp/diff_new_pack.yV5tSF/_old 2020-07-15 11:31:04.425959217 +0200
+++ /var/tmp/diff_new_pack.yV5tSF/_new 2020-07-15 11:31:04.425959217 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/python-senlinclient/python-senlinclient.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/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/train/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/python-senlinclient/raw/branch/stable/ussuri/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,python-senlinclient</param>
</service>
++++++ python-senlinclient-1.11.0.tar.gz -> python-senlinclient-2.0.1.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/.zuul.yaml
new/python-senlinclient-2.0.1/.zuul.yaml
--- old/python-senlinclient-1.11.0/.zuul.yaml 2019-08-23 01:46:17.000000000
+0200
+++ new/python-senlinclient-2.0.1/.zuul.yaml 2020-04-08 14:09:09.000000000
+0200
@@ -13,8 +13,7 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- - openstack-python3-train-jobs
+ - openstack-python3-ussuri-jobs
- openstackclient-plugin-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/AUTHORS
new/python-senlinclient-2.0.1/AUTHORS
--- old/python-senlinclient-1.11.0/AUTHORS 2019-08-23 01:47:28.000000000
+0200
+++ new/python-senlinclient-2.0.1/AUTHORS 2020-04-08 14:10:23.000000000
+0200
@@ -2,6 +2,7 @@
Aaron-DH <[email protected]>
Andreas Jaeger <[email protected]>
Ayush Garg <[email protected]>
+Bo Tran <[email protected]>
Cao Xuan Hoang <[email protected]>
Christopher Stone <[email protected]>
Cindia-blue <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/ChangeLog
new/python-senlinclient-2.0.1/ChangeLog
--- old/python-senlinclient-1.11.0/ChangeLog 2019-08-23 01:47:28.000000000
+0200
+++ new/python-senlinclient-2.0.1/ChangeLog 2020-04-08 14:10:23.000000000
+0200
@@ -1,6 +1,21 @@
CHANGES
=======
+2.0.1
+-----
+
+* Flush confirmation messages
+
+2.0.0
+-----
+
+* Change default API version to 1.14
+* Drop python 2.7 support and testing
+* Add action update command
+* Add support for node tainted field
+* Update master for stable/train
+* Return meta-data field for events list
+
1.11.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/PKG-INFO
new/python-senlinclient-2.0.1/PKG-INFO
--- old/python-senlinclient-1.11.0/PKG-INFO 2019-08-23 01:47:28.000000000
+0200
+++ new/python-senlinclient-2.0.1/PKG-INFO 2020-04-08 14:10:24.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-senlinclient
-Version: 1.11.0
+Version: 2.0.1
Summary: OpenStack Clustering API Client Library
Home-page: https://docs.openstack.org/python-senlinclient/latest/
Author: OpenStack
@@ -33,8 +33,6 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/playbooks/legacy/senlinclient-dsvm-functional/run.yaml
new/python-senlinclient-2.0.1/playbooks/legacy/senlinclient-dsvm-functional/run.yaml
---
old/python-senlinclient-1.11.0/playbooks/legacy/senlinclient-dsvm-functional/run.yaml
2019-08-23 01:46:17.000000000 +0200
+++
new/python-senlinclient-2.0.1/playbooks/legacy/senlinclient-dsvm-functional/run.yaml
2020-04-08 14:09:09.000000000 +0200
@@ -31,6 +31,7 @@
[[local|localrc]]
enable_plugin senlin https://opendev.org/openstack/senlin
enable_service sl-api sl-eng
+ USE_PYTHON3=True
EOF
executable: /bin/bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/python_senlinclient.egg-info/PKG-INFO
new/python-senlinclient-2.0.1/python_senlinclient.egg-info/PKG-INFO
--- old/python-senlinclient-1.11.0/python_senlinclient.egg-info/PKG-INFO
2019-08-23 01:47:28.000000000 +0200
+++ new/python-senlinclient-2.0.1/python_senlinclient.egg-info/PKG-INFO
2020-04-08 14:10:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-senlinclient
-Version: 1.11.0
+Version: 2.0.1
Summary: OpenStack Clustering API Client Library
Home-page: https://docs.openstack.org/python-senlinclient/latest/
Author: OpenStack
@@ -33,8 +33,6 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/python_senlinclient.egg-info/SOURCES.txt
new/python-senlinclient-2.0.1/python_senlinclient.egg-info/SOURCES.txt
--- old/python-senlinclient-1.11.0/python_senlinclient.egg-info/SOURCES.txt
2019-08-23 01:47:28.000000000 +0200
+++ new/python-senlinclient-2.0.1/python_senlinclient.egg-info/SOURCES.txt
2020-04-08 14:10:24.000000000 +0200
@@ -40,6 +40,7 @@
releasenotes/notes/cluster-run-210247ab70b289a5.yaml
releasenotes/notes/cluster-scaling-command-e0d96f2cd0c7ca5f.yaml
releasenotes/notes/deletion-output-a841931367a2689d.yaml
+releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml
releasenotes/notes/fix-region-732c2be90e58c347.yaml
releasenotes/notes/force-delete-c8d6cf4d6f049cb2.yaml
releasenotes/notes/micro-version-1.10-dabb632bfa40b79b.yaml
@@ -62,6 +63,7 @@
releasenotes/source/queens.rst
releasenotes/source/rocky.rst
releasenotes/source/stein.rst
+releasenotes/source/train.rst
releasenotes/source/unreleased.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/python_senlinclient.egg-info/entry_points.txt
new/python-senlinclient-2.0.1/python_senlinclient.egg-info/entry_points.txt
---
old/python-senlinclient-1.11.0/python_senlinclient.egg-info/entry_points.txt
2019-08-23 01:47:28.000000000 +0200
+++ new/python-senlinclient-2.0.1/python_senlinclient.egg-info/entry_points.txt
2020-04-08 14:10:23.000000000 +0200
@@ -4,6 +4,7 @@
[openstack.clustering.v1]
cluster_action_list = senlinclient.v1.action:ListAction
cluster_action_show = senlinclient.v1.action:ShowAction
+cluster_action_update = senlinclient.v1.action:UpdateAction
cluster_build_info = senlinclient.v1.build_info:BuildInfo
cluster_check = senlinclient.v1.cluster:CheckCluster
cluster_collect = senlinclient.v1.cluster:ClusterCollect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/python_senlinclient.egg-info/pbr.json
new/python-senlinclient-2.0.1/python_senlinclient.egg-info/pbr.json
--- old/python-senlinclient-1.11.0/python_senlinclient.egg-info/pbr.json
2019-08-23 01:47:28.000000000 +0200
+++ new/python-senlinclient-2.0.1/python_senlinclient.egg-info/pbr.json
2020-04-08 14:10:23.000000000 +0200
@@ -1 +1 @@
-{"git_version": "c23edfc", "is_release": true}
\ No newline at end of file
+{"git_version": "d943036", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml
new/python-senlinclient-2.0.1/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml
---
old/python-senlinclient-1.11.0/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/python-senlinclient-2.0.1/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml
2020-04-08 14:09:09.000000000 +0200
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ Python 2.7 support has been dropped. Last release of python-senlinclient
+ to support python 2.7 is OpenStack Train. The minimum version of Python now
+ supported by python-senlinclient is Python 3.6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/releasenotes/source/index.rst
new/python-senlinclient-2.0.1/releasenotes/source/index.rst
--- old/python-senlinclient-1.11.0/releasenotes/source/index.rst
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/releasenotes/source/index.rst 2020-04-08
14:09:09.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ train
stein
rocky
queens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/releasenotes/source/train.rst
new/python-senlinclient-2.0.1/releasenotes/source/train.rst
--- old/python-senlinclient-1.11.0/releasenotes/source/train.rst
1970-01-01 01:00:00.000000000 +0100
+++ new/python-senlinclient-2.0.1/releasenotes/source/train.rst 2020-04-08
14:09:09.000000000 +0200
@@ -0,0 +1,6 @@
+==========================
+Train Series Release Notes
+==========================
+
+.. release-notes::
+ :branch: stable/train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/plugin.py
new/python-senlinclient-2.0.1/senlinclient/plugin.py
--- old/python-senlinclient-1.11.0/senlinclient/plugin.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/plugin.py 2020-04-08
14:09:09.000000000 +0200
@@ -24,7 +24,7 @@
DEFAULT_CLUSTERING_API_VERSION = '1'
API_VERSION_OPTION = 'os_clustering_api_version'
API_NAME = 'clustering'
-CURRENT_API_VERSION = '1.12'
+CURRENT_API_VERSION = '1.14'
def _make_key(service_type, key):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/functional/profiles/cirros_basic.yaml
new/python-senlinclient-2.0.1/senlinclient/tests/functional/profiles/cirros_basic.yaml
---
old/python-senlinclient-1.11.0/senlinclient/tests/functional/profiles/cirros_basic.yaml
2019-08-23 01:46:17.000000000 +0200
+++
new/python-senlinclient-2.0.1/senlinclient/tests/functional/profiles/cirros_basic.yaml
2020-04-08 14:09:09.000000000 +0200
@@ -2,7 +2,7 @@
version: 1.0
properties:
flavor: 1
- image: "cirros-0.3.5-x86_64-disk.img"
+ image: "cirros-0.4.0-x86_64-disk"
networks:
- network: private
metadata:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_actions.py
new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_actions.py
---
old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_actions.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_actions.py
2020-04-08 14:09:09.000000000 +0200
@@ -19,6 +19,7 @@
def test_action_list(self):
result = self.openstack('cluster action list')
action_list = self.parser.listing(result)
- self.assertTableStruct(action_list, ['id', 'name', 'action', 'status',
- 'target_id', 'depends_on',
- 'depended_by', 'created_at'])
+ self.assertTableStruct(action_list,
+ ['id', 'name', 'action', 'status',
+ 'target_id', 'depends_on', 'cluster_id',
+ 'depended_by', 'created_at'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_events.py
new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_events.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_events.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_events.py
2020-04-08 14:09:09.000000000 +0200
@@ -21,4 +21,5 @@
event_list = self.parser.listing(result)
self.assertTableStruct(event_list, ['id', 'generated_at', 'obj_type',
'obj_id', 'obj_name', 'action',
- 'status', 'level', 'cluster_id'])
+ 'status', 'level', 'cluster_id',
+ 'meta_data'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_nodes.py
new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_nodes.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/functional/test_nodes.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/functional/test_nodes.py
2020-04-08 14:09:09.000000000 +0200
@@ -22,7 +22,7 @@
self.assertTableStruct(node_list, ['id', 'name', 'index', 'status',
'cluster_id', 'physical_id',
'profile_name', 'created_at',
- 'updated_at'])
+ 'updated_at', 'tainted'])
def test_node_create(self):
name = self.name_generate()
@@ -39,8 +39,10 @@
new_name = self.name_generate()
pf_new = self.profile_create(new_name)
role = 'master'
- cmd = ('cluster node update --name %s --role %s --profile %s %s'
- % (new_name, role, pf_new['id'], n1['id']))
+ tainted = 'True'
+ cmd = ('cluster node update --name %s --role %s --profile %s '
+ '--tainted %s %s'
+ % (new_name, role, pf_new['id'], tainted, n1['id']))
self.openstack(cmd)
self.wait_for_status(n1['id'], 'ACTIVE', 'node', 120)
raw_node = self.openstack('cluster node show %s' % n1['id'])
@@ -48,6 +50,7 @@
self.assertEqual(node_data['name'], new_name)
self.assertNotEqual(node_data['name'], old_name)
self.assertEqual(node_data['role'], role)
+ self.assertEqual(node_data['tainted'], tainted)
self.assertEqual(node_data['profile_id'], pf_new['id'])
self.node_delete(new_name)
self.addCleanup(self.profile_delete, pf['id'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_action.py
new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_action.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_action.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_action.py
2020-04-08 14:09:09.000000000 +0200
@@ -30,7 +30,7 @@
class TestActionList(TestAction):
columns = ['id', 'name', 'action', 'status', 'target_id', 'depends_on',
- 'depended_by', 'created_at']
+ 'depended_by', 'created_at', 'cluster_id']
defaults = {
'global_project': False,
'marker': None,
@@ -43,6 +43,7 @@
self.cmd = osc_action.ListAction(self.app, None)
fake_action = mock.Mock(
action="NODE_CREATE",
+ cluster_id="FAKE_CLUSTER_ID",
cause="RPC Request",
created_at="2015-12-04T04:54:41",
depended_by=[],
@@ -140,6 +141,7 @@
self.cmd = osc_action.ShowAction(self.app, None)
fake_action = mock.Mock(
action="NODE_CREATE",
+ cluster_id="FAKE_CLUSTER_ID",
cause="RPC Request",
created_at="2015-12-04T04:54:41",
depended_by=[],
@@ -174,3 +176,47 @@
error = self.assertRaises(exc.CommandError, self.cmd.take_action,
parsed_args)
self.assertEqual('Action not found: my_action', str(error))
+
+
+class TestActionUpdate(TestAction):
+
+ def setUp(self):
+ super(TestActionUpdate, self).setUp()
+ self.cmd = osc_action.UpdateAction(self.app, None)
+ fake_action = mock.Mock(
+ action="NODE_CREATE",
+ cluster_id="FAKE_CLUSTER_ID",
+ cause="RPC Request",
+ created_at="2015-12-04T04:54:41",
+ depended_by=[],
+ depends_on=[],
+ end_time=1425550000.0,
+ id="2366d440-c73e-4961-9254-6d1c3af7c167",
+ inputs={},
+ interval=-1,
+ name="node_create_0df0931b",
+ outputs={},
+ owner=None,
+ start_time=1425550000.0,
+ status="INIT",
+ status_reason="Action completed successfully.",
+ target_id="0df0931b-e251-4f2e-8719-4ebfda3627ba",
+ timeout=3600,
+ updated_at=None
+ )
+ fake_action.to_dict = mock.Mock(return_value={})
+ self.mock_client.get_action = mock.Mock(return_value=fake_action)
+ self.mock_client.update_action = mock.Mock(return_value=fake_action)
+
+ def test_action_update(self):
+ arglist = ['--status', 'CANCELLED',
+ '2366d440-c73e-4961-9254-6d1c3af7c167']
+ parsed_args = self.check_parser(self.cmd, arglist, [])
+ defaults = {
+ "status": "CANCELLED"
+ }
+
+ self.cmd.take_action(parsed_args)
+
+ self.mock_client.update_action.assert_called_with(
+ "2366d440-c73e-4961-9254-6d1c3af7c167", **defaults)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_client.py
new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_client.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_client.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_client.py
2020-04-08 14:09:09.000000000 +0200
@@ -462,6 +462,15 @@
self.assertEqual(self.service.get_action.return_value, res)
self.service.get_action.assert_called_once_with('FOOBAR')
+ def test_update_action(self, mock_conn):
+ mock_conn.return_value = self.conn
+ sc = client.Client()
+
+ res = sc.update_action('FAKE_ID', status='CANCELLED')
+ self.assertEqual(self.service.update_action.return_value, res)
+ self.service.update_action.assert_called_once_with(
+ 'FAKE_ID', status='CANCELLED')
+
def test_events(self, mock_conn):
mock_conn.return_value = self.conn
sc = client.Client()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_event.py
new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_event.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_event.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_event.py
2020-04-08 14:09:09.000000000 +0200
@@ -29,7 +29,7 @@
class TestEventList(TestEvent):
columns = ['id', 'generated_at', 'obj_type', 'obj_id', 'obj_name',
- 'action', 'status', 'level', 'cluster_id']
+ 'action', 'status', 'level', 'cluster_id', 'meta_data']
defaults = {
'global_project': False,
'marker': None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_node.py
new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_node.py
--- old/python-senlinclient-1.11.0/senlinclient/tests/unit/v1/test_node.py
2019-08-23 01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/tests/unit/v1/test_node.py
2020-04-08 14:09:09.000000000 +0200
@@ -30,7 +30,8 @@
class TestNodeList(TestNode):
columns = ['id', 'name', 'index', 'status', 'cluster_id',
- 'physical_id', 'profile_name', 'created_at', 'updated_at']
+ 'physical_id', 'profile_name', 'created_at', 'updated_at',
+ 'tainted']
defaults = {
'cluster_id': None,
@@ -60,6 +61,7 @@
role=None,
status="ACTIVE",
status_reason="Creation succeeded",
+ tainted=True,
updated_at=None,
user_id="5e5bf8027826429c96af157f68dc9072"
)
@@ -160,6 +162,7 @@
role=None,
status="ACTIVE",
status_reason="Creation succeeded",
+ tainted=True,
updated_at="2015-03-04T04:58:27",
user_id="5e5bf8027826429c96af157f68dc9072"
)
@@ -275,7 +278,8 @@
"nk2": "nv2",
},
"profile_id": "new_profile",
- "role": "new_role"
+ "role": "new_role",
+ "tainted": True
}
def setUp(self):
@@ -298,6 +302,7 @@
role="master",
status="INIT",
status_reason="Initializing",
+ tainted=False,
updated_at=None,
user_id="5e5bf8027826429c96af157f68dc9072"
)
@@ -310,7 +315,7 @@
def test_node_update_defaults(self):
arglist = ['--name', 'new_node', '--metadata', 'nk1=nv1;nk2=nv2',
'--profile', 'new_profile', '--role', 'new_role',
- '0df0931b']
+ '--tainted', 'True', '0df0931b']
parsed_args = self.check_parser(self.cmd, arglist, [])
self.cmd.take_action(parsed_args)
self.mock_client.update_node.assert_called_with(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/v1/action.py
new/python-senlinclient-2.0.1/senlinclient/v1/action.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/action.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/action.py 2020-04-08
14:09:09.000000000 +0200
@@ -82,7 +82,7 @@
senlin_client = self.app.client_manager.clustering
columns = ['id', 'name', 'action', 'status', 'target_id', 'depends_on',
- 'depended_by', 'created_at']
+ 'depended_by', 'created_at', 'cluster_id']
queries = {
'sort': parsed_args.sort,
@@ -114,6 +114,27 @@
)
+def _show_action(senlin_client, action_id):
+ try:
+ action = senlin_client.get_action(action_id)
+ except sdk_exc.ResourceNotFound:
+ raise exc.CommandError(_('Action not found: %s')
+ % action_id)
+
+ formatters = {
+ 'inputs': senlin_utils.json_formatter,
+ 'outputs': senlin_utils.json_formatter,
+ 'metadata': senlin_utils.json_formatter,
+ 'data': senlin_utils.json_formatter,
+ 'depends_on': senlin_utils.list_formatter,
+ 'depended_by': senlin_utils.list_formatter,
+ }
+ data = action.to_dict()
+ columns = sorted(data.keys())
+ return columns, utils.get_dict_properties(data, columns,
+ formatters=formatters)
+
+
class ShowAction(command.ShowOne):
"""Show detailed info about the specified action."""
@@ -132,21 +153,35 @@
self.log.debug("take_action(%s)", parsed_args)
senlin_client = self.app.client_manager.clustering
- try:
- action = senlin_client.get_action(parsed_args.action)
- except sdk_exc.ResourceNotFound:
- raise exc.CommandError(_('Action not found: %s')
- % parsed_args.action)
-
- formatters = {
- 'inputs': senlin_utils.json_formatter,
- 'outputs': senlin_utils.json_formatter,
- 'metadata': senlin_utils.json_formatter,
- 'data': senlin_utils.json_formatter,
- 'depends_on': senlin_utils.list_formatter,
- 'depended_by': senlin_utils.list_formatter,
+ return _show_action(senlin_client, parsed_args.action)
+
+
+class UpdateAction(command.ShowOne):
+ """Update an action."""
+
+ log = logging.getLogger(__name__ + ".UpdateAction")
+
+ def get_parser(self, prog_name):
+ parser = super(UpdateAction, self).get_parser(prog_name)
+ parser.add_argument(
+ '--status',
+ metavar='<status>',
+ help=_('The new status for the action')
+ )
+ parser.add_argument(
+ 'action',
+ metavar='<action>',
+ help=_('ID of the action to update')
+ )
+ return parser
+
+ def take_action(self, parsed_args):
+ self.log.debug("take_action(%s)", parsed_args)
+ senlin_client = self.app.client_manager.clustering
+
+ params = {
+ 'status': parsed_args.status,
}
- data = action.to_dict()
- columns = sorted(data.keys())
- return columns, utils.get_dict_properties(data, columns,
- formatters=formatters)
+
+ senlin_client.update_action(parsed_args.action, **params)
+ return _show_action(senlin_client, parsed_args.action)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/v1/client.py
new/python-senlinclient-2.0.1/senlinclient/v1/client.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/client.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/client.py 2020-04-08
14:09:09.000000000 +0200
@@ -495,6 +495,14 @@
"""
return self.service.get_action(action)
+ def update_action(self, action, **attrs):
+ """Update an action
+
+ Doc link:
+ https://docs.openstack.org/api-ref/clustering/#update-action
+ """
+ return self.service.update_action(action, **attrs)
+
def services(self, **queries):
"""List services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/v1/cluster.py
new/python-senlinclient-2.0.1/senlinclient/v1/cluster.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/cluster.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/cluster.py 2020-04-08
14:09:09.000000000 +0200
@@ -345,6 +345,7 @@
sys.stdout.write(
_("Are you sure you want to delete this cluster(s)"
" [y/N]?"))
+ sys.stdout.flush()
prompt_response = sys.stdin.readline().lower()
if not prompt_response.startswith('y'):
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/v1/event.py
new/python-senlinclient-2.0.1/senlinclient/v1/event.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/event.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/event.py 2020-04-08
14:09:09.000000000 +0200
@@ -82,7 +82,7 @@
senlin_client = self.app.client_manager.clustering
columns = ['id', 'generated_at', 'obj_type', 'obj_id', 'obj_name',
- 'action', 'status', 'level', 'cluster_id']
+ 'action', 'status', 'level', 'cluster_id', 'meta_data']
queries = {
'sort': parsed_args.sort,
'limit': parsed_args.limit,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/v1/node.py
new/python-senlinclient-2.0.1/senlinclient/v1/node.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/node.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/node.py 2020-04-08
14:09:09.000000000 +0200
@@ -86,7 +86,8 @@
senlin_client = self.app.client_manager.clustering
columns = ['id', 'name', 'index', 'status', 'cluster_id',
- 'physical_id', 'profile_name', 'created_at', 'updated_at']
+ 'physical_id', 'profile_name', 'created_at', 'updated_at',
+ 'tainted']
queries = {
'cluster_id': parsed_args.cluster,
'sort': parsed_args.sort,
@@ -255,6 +256,14 @@
action='append'
)
parser.add_argument(
+ '--tainted',
+ metavar='<boolean>',
+ help=_("Whether the node should be marked as tainted. "
+ "If true, this node will be selected first for the next"
+ "cluster scale-in operation.")
+
+ )
+ parser.add_argument(
'node',
metavar='<node>',
help=_('Name or ID of node to update')
@@ -278,6 +287,12 @@
'metadata': senlin_utils.format_parameters(parsed_args.metadata),
}
+ if parsed_args.tainted is not None:
+ attrs['tainted'] = strutils.bool_from_string(
+ parsed_args.tainted,
+ strict=True,
+ )
+
senlin_client.update_node(node.id, **attrs)
return _show_node(senlin_client, node.id)
@@ -316,6 +331,7 @@
sys.stdout.write(
_("Are you sure you want to delete this node(s)"
" [y/N]?"))
+ sys.stdout.flush()
prompt_response = sys.stdin.readline().lower()
if not prompt_response.startswith('y'):
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/senlinclient/v1/policy.py
new/python-senlinclient-2.0.1/senlinclient/v1/policy.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/policy.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/policy.py 2020-04-08
14:09:09.000000000 +0200
@@ -241,6 +241,7 @@
sys.stdout.write(
_("Are you sure you want to delete this policy(s)"
" [y/N]?"))
+ sys.stdout.flush()
prompt_response = sys.stdin.readline().lower()
if not prompt_response.startswith('y'):
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/v1/profile.py
new/python-senlinclient-2.0.1/senlinclient/v1/profile.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/profile.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/profile.py 2020-04-08
14:09:09.000000000 +0200
@@ -176,6 +176,7 @@
sys.stdout.write(
_("Are you sure you want to delete this profile(s)"
" [y/N]?"))
+ sys.stdout.flush()
prompt_response = sys.stdin.readline().lower()
if not prompt_response.startswith('y'):
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-senlinclient-1.11.0/senlinclient/v1/receiver.py
new/python-senlinclient-2.0.1/senlinclient/v1/receiver.py
--- old/python-senlinclient-1.11.0/senlinclient/v1/receiver.py 2019-08-23
01:46:17.000000000 +0200
+++ new/python-senlinclient-2.0.1/senlinclient/v1/receiver.py 2020-04-08
14:09:09.000000000 +0200
@@ -294,6 +294,7 @@
sys.stdout.write(
_("Are you sure you want to delete this receiver(s)"
" [y/N]?"))
+ sys.stdout.flush()
prompt_response = sys.stdin.readline().lower()
if not prompt_response.startswith('y'):
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/setup.cfg
new/python-senlinclient-2.0.1/setup.cfg
--- old/python-senlinclient-1.11.0/setup.cfg 2019-08-23 01:47:28.000000000
+0200
+++ new/python-senlinclient-2.0.1/setup.cfg 2020-04-08 14:10:24.000000000
+0200
@@ -13,8 +13,6 @@
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
@@ -29,6 +27,7 @@
openstack.clustering.v1 =
cluster_action_list = senlinclient.v1.action:ListAction
cluster_action_show = senlinclient.v1.action:ShowAction
+ cluster_action_update = senlinclient.v1.action:UpdateAction
cluster_build_info = senlinclient.v1.build_info:BuildInfo
cluster_check = senlinclient.v1.cluster:CheckCluster
cluster_create = senlinclient.v1.cluster:CreateCluster
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-senlinclient-1.11.0/tox.ini
new/python-senlinclient-2.0.1/tox.ini
--- old/python-senlinclient-1.11.0/tox.ini 2019-08-23 01:46:17.000000000
+0200
+++ new/python-senlinclient-2.0.1/tox.ini 2020-04-08 14:09:09.000000000
+0200
@@ -1,9 +1,11 @@
[tox]
-envlist = py27,py37,pep8,releasenotes
-minversion = 2.0
+envlist = py37,pep8,releasenotes
+minversion = 3.1.1
skipsdist = True
+ignore_basepython_conflict = True
[testenv]
+basepython = python3
setenv = VIRTUAL_ENV={envdir}
CLIENT_NAME=python-senlinclient
usedevelop = True
@@ -18,12 +20,10 @@
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 =
flake8
# Check that .po and .pot files are valid:
@@ -31,7 +31,6 @@
whitelist_externals = bash
[testenv:venv]
-basepython = python3
commands = {posargs}
[testenv:functional]
@@ -41,7 +40,6 @@
passenv = OS_*
[testenv:cover]
-basepython = python3
setenv =
PYTHON=coverage run --source senlinclient --parallel-mode
commands =
@@ -52,11 +50,9 @@
coverage report
[testenv:debug]
-basepython = python3
commands = oslo_debug_helper -t senlinclient/tests {posargs}
[testenv:docs]
-basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
@@ -64,7 +60,6 @@
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
-basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
@@ -82,7 +77,6 @@
import_exceptions = senlinclient.common.i18n
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt