Hello community,
here is the log from the commit of package python-shaptools for
openSUSE:Factory checked in at 2019-12-09 21:38:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shaptools (Old)
and /work/SRC/openSUSE:Factory/.python-shaptools.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-shaptools"
Mon Dec 9 21:38:16 2019 rev:9 rq:755360 version:0.3.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shaptools/python-shaptools.changes
2019-11-13 13:29:11.771752174 +0100
+++
/work/SRC/openSUSE:Factory/.python-shaptools.new.4691/python-shaptools.changes
2019-12-09 21:38:23.218023400 +0100
@@ -1,0 +2,6 @@
+Thu Dec 5 10:48:53 UTC 2019 - Xabier Arbulu <[email protected]>
+
+- Create package version 0.3.4
+- Fix ascs restart conditions in ers installation
+
+-------------------------------------------------------------------
Old:
----
shaptools-0.3.3.tar.gz
New:
----
shaptools-0.3.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-shaptools.spec ++++++
--- /var/tmp/diff_new_pack.8HTC2A/_old 2019-12-09 21:38:23.618023243 +0100
+++ /var/tmp/diff_new_pack.8HTC2A/_new 2019-12-09 21:38:23.618023243 +0100
@@ -22,7 +22,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-shaptools
-Version: 0.3.3
+Version: 0.3.4
Release: 0
Summary: Python tools to interact with SAP HANA utilities
License: Apache-2.0
++++++ shaptools-0.3.3.tar.gz -> shaptools-0.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/shaptools-0.3.3/python-shaptools.changes
new/shaptools-0.3.4/python-shaptools.changes
--- old/shaptools-0.3.3/python-shaptools.changes 2019-11-12
15:44:55.900127362 +0100
+++ new/shaptools-0.3.4/python-shaptools.changes 2019-12-09
14:35:21.200307067 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Dec 5 10:48:53 UTC 2019 - Xabier Arbulu <[email protected]>
+
+- Create package version 0.3.4
+- Fix ascs restart conditions in ers installation
+
+-------------------------------------------------------------------
Thu Nov 7 00:36:08 UTC 2019 - Simranpal Singh <[email protected]>
- Create package version 0.3.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/shaptools-0.3.3/python-shaptools.spec
new/shaptools-0.3.4/python-shaptools.spec
--- old/shaptools-0.3.3/python-shaptools.spec 2019-11-12 15:44:55.900127362
+0100
+++ new/shaptools-0.3.4/python-shaptools.spec 2019-12-09 14:35:21.200307067
+0100
@@ -22,7 +22,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-shaptools
-Version: 0.3.3
+Version: 0.3.4
Release: 0
Summary: Python tools to interact with SAP HANA utilities
License: Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/shaptools-0.3.3/shaptools/netweaver.py
new/shaptools-0.3.4/shaptools/netweaver.py
--- old/shaptools-0.3.3/shaptools/netweaver.py 2019-11-12 15:44:55.904127362
+0100
+++ new/shaptools-0.3.4/shaptools/netweaver.py 2019-12-09 14:35:21.200307067
+0100
@@ -329,8 +329,9 @@
software_path, virtual_host, product_id, conf_file, root_user,
password,
exception=False, remote_host=remote_host, cwd=cwd)
- if result.returncode == cls.SUCCESSFULLY_INSTALLED or \
- cls._ascs_restart_needed(result):
+ if result.returncode == cls.SUCCESSFULLY_INSTALLED:
+ break
+ elif cls._ascs_restart_needed(result):
cls._restart_ascs(conf_file, ers_pass, ascs_pass, remote_host)
break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/shaptools-0.3.3/tests/netweaver_test.py
new/shaptools-0.3.4/tests/netweaver_test.py
--- old/shaptools-0.3.3/tests/netweaver_test.py 2019-11-12 15:44:55.904127362
+0100
+++ new/shaptools-0.3.4/tests/netweaver_test.py 2019-12-09 14:35:21.200307067
+0100
@@ -279,7 +279,7 @@
'/tmp/copy.inifile.params', sid='HA1',
sidadmPassword='testpwd', masterPwd='Suse1234')
self.assertTrue(filecmp.cmp(pwd+'/support/modified.inifile.params',
conf_file))
-
+
#case when new entry is added to config file
shutil.copyfile(pwd+'/support/original.inifile.params',
'/tmp/copy.inifile.params')
conf_file = netweaver.NetweaverInstance.update_conf_file(
@@ -439,9 +439,31 @@
@mock.patch('time.time')
@mock.patch('shaptools.netweaver.NetweaverInstance.get_attribute_from_file')
@mock.patch('shaptools.netweaver.NetweaverInstance.install')
+ def test_install_ers(self, mock_install, mock_get_attribute, mock_time):
+
+ mock_result = mock.Mock()
+ mock_result.group.return_value = 'ers_pass'
+ mock_get_attribute.return_value = mock_result
+
+ mock_time.return_value = 1
+ mock_install_result = mock.Mock(returncode=0)
+ mock_install.return_value = mock_install_result
+
+ netweaver.NetweaverInstance.install_ers(
+ 'software', 'myhost', 'product', 'conf_file', 'user', 'pass',
+ ascs_password='ascs_pass', timeout=5, interval=1, cwd='/tmp')
+
+ mock_result.group.assert_called_once_with(1)
+ mock_install.assert_called_once_with(
+ 'software', 'myhost', 'product', 'conf_file', 'user', 'pass',
+ exception=False, remote_host=None, cwd='/tmp')
+
+ @mock.patch('time.time')
+
@mock.patch('shaptools.netweaver.NetweaverInstance.get_attribute_from_file')
+ @mock.patch('shaptools.netweaver.NetweaverInstance.install')
@mock.patch('shaptools.netweaver.NetweaverInstance._ascs_restart_needed')
@mock.patch('shaptools.netweaver.NetweaverInstance._restart_ascs')
- def test_install_ers_first_install(
+ def test_install_ers_with_restart(
self, mock_restart, mock_restart_needed, mock_install,
mock_get_attribute, mock_time):