Hello community, here is the log from the commit of package salt-shaptools for openSUSE:Factory checked in at 2020-01-29 13:18:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt-shaptools (Old) and /work/SRC/openSUSE:Factory/.salt-shaptools.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt-shaptools" Wed Jan 29 13:18:09 2020 rev:11 rq:768022 version:0.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/salt-shaptools/salt-shaptools.changes 2020-01-25 13:24:52.104055178 +0100 +++ /work/SRC/openSUSE:Factory/.salt-shaptools.new.26092/salt-shaptools.changes 2020-01-29 13:18:33.738175412 +0100 @@ -1,0 +2,6 @@ +Fri Jan 24 10:40:26 UTC 2020 - Xabier Arbulu <[email protected]> + +- Version 0.3.1 + * Add the virtual_host_mask parameter (gcp uses 32 mask) + +------------------------------------------------------------------- Old: ---- salt-shaptools-0.3.0.tar.gz New: ---- salt-shaptools-0.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt-shaptools.spec ++++++ --- /var/tmp/diff_new_pack.YGhyw7/_old 2020-01-29 13:18:34.758175934 +0100 +++ /var/tmp/diff_new_pack.YGhyw7/_new 2020-01-29 13:18:34.758175934 +0100 @@ -19,7 +19,7 @@ # See also https://en.opensuse.org/openSUSE:Specfile_guidelines Name: salt-shaptools -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: Salt modules and states for SAP Applications and SLE-HA components management ++++++ salt-shaptools-0.3.0.tar.gz -> salt-shaptools-0.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/salt/__init__.py new/salt-shaptools-0.3.1/salt/__init__.py --- old/salt-shaptools-0.3.0/salt/__init__.py 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/salt/__init__.py 2020-01-27 08:16:57.504733184 +0100 @@ -6,4 +6,4 @@ :since: 2018-11-30 """ -__version__ = "0.2.11" +__version__ = "0.3.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/salt/modules/netweavermod.py new/salt-shaptools-0.3.1/salt/modules/netweavermod.py --- old/salt-shaptools-0.3.0/salt/modules/netweavermod.py 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/salt/modules/netweavermod.py 2020-01-27 08:16:57.504733184 +0100 @@ -229,14 +229,17 @@ def attach_virtual_host( virtual_host, - virtual_host_interface='eth0'): + virtual_host_interface='eth0', + virtual_host_mask=24): ''' Attach virtual host ip address to network interface virtual_host Virtual host name - virtual_host_interface: + virtual_host_interface Network interface to attach the virtual host ip address + virtual_host_mask + Ip address mask for the virtual address (24 be default) Returns: str: Attached ip address @@ -250,10 +253,11 @@ ip_address = __salt__['hosts.get_ip'](virtual_host) if not ip_address: raise exceptions.CommandExecutionError('virtual host {} not available'.format(virtual_host)) - result = __salt__['cmd.retcode']('ip a | grep {}/24'.format(ip_address), python_shell=True) + result = __salt__['cmd.retcode']( + 'ip a | grep {}/{}'.format(ip_address, virtual_host_mask), python_shell=True) if result == 1: - result = __salt__['cmd.run']('ip address add {}/24 dev {}'.format( - ip_address, virtual_host_interface)) + result = __salt__['cmd.run']('ip address add {}/{} dev {}'.format( + ip_address, virtual_host_mask, virtual_host_interface)) # Non zero return code in any of the cmd commands if result: raise exceptions.CommandExecutionError('error running "ip address" command') @@ -270,10 +274,10 @@ Path to the existing configuration file extra_parameters (dict): Dictionary with the values to be updated. Use the exact name of the SAP configuration file for the key - + Returns: str: Configuration file path - + CLI Example: .. code-block:: bash diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/salt/states/netweavermod.py new/salt-shaptools-0.3.1/salt/states/netweavermod.py --- old/salt-shaptools-0.3.0/salt/states/netweavermod.py 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/salt/states/netweavermod.py 2020-01-27 08:16:57.504733184 +0100 @@ -74,6 +74,7 @@ cwd='/tmp/swpm_unattended', additional_dvds=None, ascs_password=None, + virtual_host_mask=24, timeout=0, interval=5): """ @@ -109,6 +110,8 @@ ascs_password (Only used when the Product is ERS.) Password of the SAP user in the machine hosting the ASCS instance. If it's not set the same password used to install ERS will be used + virtual_host_mask + Ip address mask for the virtual address (24 be default) timeout (Only used when the Product is ERS.) Timeout of the installation process. If 0 it will try to install the instance only once interval (Only used when the Product is ERS.) @@ -143,7 +146,8 @@ # Here starts the actual process __salt__['netweaver.attach_virtual_host']( virtual_host=virtual_host, - virtual_host_interface=virtual_host_interface) + virtual_host_interface=virtual_host_interface, + virtual_host_mask=virtual_host_mask) if cwd: cwd = __salt__['netweaver.setup_cwd']( @@ -213,7 +217,8 @@ virtual_host_interface, product_id, cwd='/tmp/swpm_unattended', - additional_dvds=None): + additional_dvds=None, + virtual_host_mask=24): """ Install SAP Netweaver DB instance if the instance is not installed yet. @@ -244,6 +249,8 @@ New value for SAPINST_CWD parameter additional_dvds Additional folder where to retrieve required software for the installation + virtual_host_mask + Ip address mask for the virtual address (24 be default) """ host = name @@ -271,7 +278,8 @@ # Here starts the actual process __salt__['netweaver.attach_virtual_host']( virtual_host=virtual_host, - virtual_host_interface=virtual_host_interface) + virtual_host_interface=virtual_host_interface, + virtual_host_mask=virtual_host_mask) if cwd: cwd = __salt__['netweaver.setup_cwd']( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/salt-shaptools.changes new/salt-shaptools-0.3.1/salt-shaptools.changes --- old/salt-shaptools-0.3.0/salt-shaptools.changes 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/salt-shaptools.changes 2020-01-27 08:16:57.504733184 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Jan 24 10:40:26 UTC 2020 - Xabier Arbulu <[email protected]> + +- Version 0.3.1 + * Add the virtual_host_mask parameter (gcp uses 32 mask) + +------------------------------------------------------------------- Wed Jan 22 10:52:20 UTC 2020 - Dario Maiocchi <[email protected]> - Version 0.3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/salt-shaptools.spec new/salt-shaptools-0.3.1/salt-shaptools.spec --- old/salt-shaptools-0.3.0/salt-shaptools.spec 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/salt-shaptools.spec 2020-01-27 08:16:57.504733184 +0100 @@ -19,7 +19,7 @@ # See also https://en.opensuse.org/openSUSE:Specfile_guidelines Name: salt-shaptools -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: Salt modules and states for SAP Applications and SLE-HA components management diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/tests/unit/modules/test_netweavermod.py new/salt-shaptools-0.3.1/tests/unit/modules/test_netweavermod.py --- old/salt-shaptools-0.3.0/tests/unit/modules/test_netweavermod.py 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/tests/unit/modules/test_netweavermod.py 2020-01-27 08:16:57.504733184 +0100 @@ -254,11 +254,11 @@ with patch.dict(netweavermod.__salt__, {'hosts.get_ip': mock_get_ip, 'cmd.retcode': mock_retcode, 'cmd.run': mock_run}): - ip_address = netweavermod.attach_virtual_host('vhost', 'eth1') + ip_address = netweavermod.attach_virtual_host('vhost', 'eth1', 32) mock_get_ip.assert_called_once_with('vhost') - mock_retcode.assert_called_once_with('ip a | grep 192.168.15.1/24', python_shell=True) - mock_run.assert_called_once_with('ip address add 192.168.15.1/24 dev eth1') + mock_retcode.assert_called_once_with('ip a | grep 192.168.15.1/32', python_shell=True) + mock_run.assert_called_once_with('ip address add 192.168.15.1/32 dev eth1') assert ip_address == '192.168.15.1' def test_attach_virtual_host_not_ip(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-shaptools-0.3.0/tests/unit/states/test_netweavermod.py new/salt-shaptools-0.3.1/tests/unit/states/test_netweavermod.py --- old/salt-shaptools-0.3.0/tests/unit/states/test_netweavermod.py 2020-01-23 12:08:57.968470309 +0100 +++ new/salt-shaptools-0.3.1/tests/unit/states/test_netweavermod.py 2020-01-27 08:16:57.504733184 +0100 @@ -106,7 +106,7 @@ sid='prd', inst='00', password='pass', sap_instance='ascs') mock_get.assert_called_once_with('productID') mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=24) @mock.patch('salt.states.netweavermod._get_sap_instance_type') def test_installed_correct(self, mock_get): @@ -132,7 +132,8 @@ 'file.chown': mock_chown}): assert netweavermod.installed( 'prd', '00', 'pass', '/software', 'root', 'pass', - 'config_file', 'vhost', 'eth1', 'productID', cwd='/tmp') == ret + 'config_file', 'vhost', 'eth1', 'productID', + cwd='/tmp', virtual_host_mask=32) == ret mock_installed.assert_has_calls([ mock.call(sid='prd', inst='00', password='pass', sap_instance='di'), mock.call(sid='prd', inst='00', password='pass', sap_instance='di'), @@ -140,7 +141,7 @@ mock_get.assert_called_once_with('productID') mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=32) mock_setup_cwd.assert_called_once_with( software_path='/software', cwd='/tmp', additional_dvds=None) mock_install.assert_called_once_with( @@ -181,7 +182,7 @@ assert mock_chown.call_count == 0 mock_get.assert_called_once_with('productID') mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=24) mock_setup_cwd.assert_called_once_with( software_path='/software', cwd='/tmp/swpm_unattended', additional_dvds=None) mock_install.assert_called_once_with( @@ -220,7 +221,7 @@ mock_get.assert_called_once_with('productID') mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=24) mock_setup_cwd.assert_called_once_with( software_path='/software', cwd='/tmp/swpm_unattended', additional_dvds=None) mock_install.assert_called_once_with( @@ -290,7 +291,7 @@ mock_db_installed.assert_called_once_with( host='192.168.10.15', port=30015, schema_name='SAPABAP1', schema_password='schema_pass') mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=24) def test_db_installed_correct(self): ''' @@ -313,7 +314,7 @@ assert netweavermod.db_installed( '192.168.10.15', 30015, 'SAPABAP1', 'schema_pass', '/software', 'root', 'pass', - 'config_file', 'vhost', 'eth1', 'productID') == ret + 'config_file', 'vhost', 'eth1', 'productID', virtual_host_mask=32) == ret mock_db_installed.assert_has_calls([ mock.call( host='192.168.10.15', port=30015, @@ -324,7 +325,7 @@ ]) mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=32) mock_setup_cwd.assert_called_once_with( software_path='/software', cwd='/tmp/swpm_unattended', additional_dvds=None) mock_install.assert_called_once_with( @@ -364,7 +365,7 @@ ]) mock_attach.assert_called_once_with( - virtual_host='vhost', virtual_host_interface='eth1') + virtual_host='vhost', virtual_host_interface='eth1', virtual_host_mask=24) mock_setup_cwd.assert_called_once_with( software_path='/software', cwd='/tmp/swpm_unattended', additional_dvds=None) mock_install.assert_called_once_with(
