Hello community,
here is the log from the commit of package python3-ipa for openSUSE:Factory checked in at 2019-02-04 14:25:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-ipa (Old)
and /work/SRC/openSUSE:Factory/.python3-ipa.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-ipa"
Mon Feb 4 14:25:20 2019 rev:12 rq:670903 version:2.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-ipa/python3-ipa.changes 2018-12-13 19:48:53.900665722 +0100
+++ /work/SRC/openSUSE:Factory/.python3-ipa.new.28833/python3-ipa.changes 2019-02-04 14:25:22.749054697 +0100
@@ -1,0 +2,9 @@
+Fri Jan 4 16:27:48 UTC 2019 - Sean Marlow
+
+- Update to v2.6.0 (2019-01-04)
+ + Remove duplication when logging.
+ + Allow azure instance to start in existing subnet.
+ + Treat uuid always lowercase.
+ + Use base provider waiter method.
+
+-------------------------------------------------------------------
Old:
----
python3-ipa-2.5.0.tar.gz
New:
----
python3-ipa-2.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-ipa.spec ++++++
--- /var/tmp/diff_new_pack.xgHxJA/_old 2019-02-04 14:25:23.465054358 +0100
+++ /var/tmp/diff_new_pack.xgHxJA/_new 2019-02-04 14:25:23.469054356 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-ipa
#
-# 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
@@ -18,7 +18,7 @@
%bcond_without test
Name: python3-ipa
-Version: 2.5.0
+Version: 2.6.0
Release: 0
Summary: Command line and API for testing custom images
License: GPL-3.0-or-later
++++++ python3-ipa-2.5.0.tar.gz -> python3-ipa-2.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/CHANGES.md new/python3-ipa-2.6.0/CHANGES.md
--- old/python3-ipa-2.5.0/CHANGES.md 2018-12-12 02:51:13.000000000 +0100
+++ new/python3-ipa-2.6.0/CHANGES.md 2019-01-04 17:15:48.000000000 +0100
@@ -1,3 +1,15 @@
+v2.6.0 (2019-01-04)
+===================
+
+- Remove duplication when logging.
+ [\#156](https://github.com/SUSE-Enceladus/ipa/pull/156)
+- Allow azure instance to start in existing subnet.
+ [\#158](https://github.com/SUSE-Enceladus/ipa/pull/158)
+- Treat uuid always lowercase.
+ [\#159](https://github.com/SUSE-Enceladus/ipa/pull/159)
+- Use base provider waiter method.
+ [\#160](https://github.com/SUSE-Enceladus/ipa/pull/160)
+
v2.5.0 (2018-12-11)
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/PKG-INFO new/python3-ipa-2.6.0/PKG-INFO
--- old/python3-ipa-2.5.0/PKG-INFO 2018-12-12 02:52:08.000000000 +0100
+++ new/python3-ipa-2.6.0/PKG-INFO 2019-01-04 17:16:46.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: python3-ipa
-Version: 2.5.0
+Version: 2.6.0
Summary: Package for automated testing of cloud images.
Home-page: https://github.com/SUSE-Enceladus/ipa
Author: SUSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/ipa/__init__.py new/python3-ipa-2.6.0/ipa/__init__.py
--- old/python3-ipa-2.5.0/ipa/__init__.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/ipa/__init__.py 2019-01-04 17:15:48.000000000 +0100
@@ -22,4 +22,4 @@
__author__ = """SUSE"""
__email__ = 'public-cloud-dev@susecloud.net'
-__version__ = '2.5.0'
+__version__ = '2.6.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/ipa/ipa_azure.py new/python3-ipa-2.6.0/ipa/ipa_azure.py
--- old/python3-ipa-2.5.0/ipa/ipa_azure.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/ipa/ipa_azure.py 2019-01-04 17:15:48.000000000 +0100
@@ -91,10 +91,11 @@
timeout,
collect_vm_info)
- if subnet_id and not (vnet_name and vnet_resource_group):
+ subnet_args = [subnet_id, vnet_name, vnet_resource_group]
+ if any(subnet_args) and not all(subnet_args):
raise AzureProviderException(
- 'If subnet_id is provided vnet_resource_group and vnet_name'
- ' are also required.'
+ 'subnet_id, vnet_resource_group and vnet_name'
+ ' are all required to use an existing subnet.'
)
self.service_account_file = (
@@ -250,7 +251,7 @@
return storage_profile
- def _create_subnet(self, resource_group_name, subnet_name, vnet_name):
+ def _create_subnet(self, resource_group_name, subnet_id, vnet_name):
"""
Create a subnet in the provided vnet and resource group.
"""
@@ -258,7 +259,7 @@
try:
subnet_setup = self.network.subnets.create_or_update(
- resource_group_name, vnet_name, subnet_name, subnet_config
+ resource_group_name, vnet_name, subnet_id, subnet_config
)
except Exception as error:
raise AzureProviderException(
@@ -441,12 +442,17 @@
self.vnet_resource_group, self.vnet_name, self.subnet_id
)
else:
- # Create new vnet/subnet.
+ self.subnet_id = ''.join([self.running_instance_id, '-subnet'])
+ self.vnet_name = ''.join([self.running_instance_id, '-vnet'])
+
+ # Create new vnet
self._create_virtual_network(
self.region, self.running_instance_id, self.vnet_name
)
+
+ # Create new subnet in new vnet
subnet = self._create_subnet(
- self.running_instance_id, self.subnet_name, self.vnet_name
+ self.running_instance_id, self.subnet_id, self.vnet_name
)
# Setup interface and public ip in resource group.
@@ -498,8 +504,6 @@
self.running_instance_id, '-ip-config'
])
self.nic_name = ''.join([self.running_instance_id, '-nic'])
- self.subnet_name = ''.join([self.running_instance_id, '-subnet'])
- self.vnet_name = ''.join([self.running_instance_id, '-vnet'])
self.public_ip_name = ''.join([self.running_instance_id, '-public-ip'])
def _set_image_id(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/ipa/ipa_ec2.py new/python3-ipa-2.6.0/ipa/ipa_ec2.py
--- old/python3-ipa-2.5.0/ipa/ipa_ec2.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/ipa/ipa_ec2.py 2019-01-04 17:15:48.000000000 +0100
@@ -278,8 +278,8 @@
'Unable to create instance: {0}.'.format(error)
)
- instances[0].wait_until_running()
self.running_instance_id = instances[0].instance_id
+ self._wait_on_instance('running', self.timeout)
def _set_image_id(self):
"""If existing image used get image id."""
@@ -312,13 +312,13 @@
"""Start the instance."""
instance = self._get_instance()
instance.start()
- instance.wait_until_running()
+ self._wait_on_instance('running', self.timeout)
def _stop_instance(self):
"""Stop the instance."""
instance = self._get_instance()
instance.stop()
- instance.wait_until_stopped()
+ self._wait_on_instance('stopped', self.timeout)
def _terminate_instance(self):
"""Terminate the instance."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/ipa/ipa_provider.py new/python3-ipa-2.6.0/ipa/ipa_provider.py
--- old/python3-ipa-2.5.0/ipa/ipa_provider.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/ipa/ipa_provider.py 2019-01-04 17:15:48.000000000 +0100
@@ -237,13 +237,18 @@
'results_file': self.results_file
}
- with open(self.log_file, 'a') as log_file:
- log_file.write(
- '\n'.join(
- '%s: %s' % (key, val) for key, val
- in self.results['info'].items()
- )
+ self._write_to_log(
+ '\n'.join(
+ '%s: %s' % (key, val) for key, val
+ in self.results['info'].items()
)
+ )
+
+ def _write_to_log(self, output):
+ """Write the output string to the log file."""
+ with open(self.log_file, 'a') as log_file:
+ log_file.write('\n')
+ log_file.write(output)
log_file.write('\n')
def _merge_results(self, results):
@@ -442,10 +447,7 @@
client = self._get_ssh_client()
out = self.distro.get_vm_info(client)
-
- with open(self.log_file, 'a') as log_file:
- log_file.write('\n')
- log_file.write(out)
+ self._write_to_log(out)
def _update_history(self):
"""Save the current test information to history json."""
@@ -486,9 +488,7 @@
)
)
else:
- with open(self.log_file, 'a') as log_file:
- log_file.write('\n')
- log_file.write(out)
+ self._write_to_log(out)
def extract_archive(self, client, archive_path, extract_path=None):
"""Extract the archive files using the client in the current path."""
@@ -502,9 +502,7 @@
)
else:
- with open(self.log_file, 'a') as log_file:
- log_file.write('\n')
- log_file.write(out)
+ self._write_to_log(out)
def hard_reboot_instance(self):
"""Stop then start the instance."""
@@ -527,9 +525,7 @@
)
)
else:
- with open(self.log_file, 'a') as log_file:
- log_file.write('\n')
- log_file.write(out)
+ self._write_to_log(out)
def process_injection_file(self, client):
"""
@@ -751,8 +747,7 @@
self.logger.error('Instance failed to update')
self.logger.debug(error)
else:
- with open(self.log_file, 'a') as log_file:
- log_file.write(out)
+ self._write_to_log(out)
finally:
duration = time.time() - start
self._process_test_results(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/package/python3-ipa.spec new/python3-ipa-2.6.0/package/python3-ipa.spec
--- old/python3-ipa-2.5.0/package/python3-ipa.spec 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/package/python3-ipa.spec 2019-01-04 17:15:48.000000000 +0100
@@ -18,7 +18,7 @@
%bcond_without test
Name: python3-ipa
-Version: 2.5.0
+Version: 2.6.0
Release: 0
Summary: Command line and API for testing custom images
License: GPL-3.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/python3_ipa.egg-info/PKG-INFO new/python3-ipa-2.6.0/python3_ipa.egg-info/PKG-INFO
--- old/python3-ipa-2.5.0/python3_ipa.egg-info/PKG-INFO 2018-12-12 02:52:08.000000000 +0100
+++ new/python3-ipa-2.6.0/python3_ipa.egg-info/PKG-INFO 2019-01-04 17:16:46.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: python3-ipa
-Version: 2.5.0
+Version: 2.6.0
Summary: Package for automated testing of cloud images.
Home-page: https://github.com/SUSE-Enceladus/ipa
Author: SUSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/setup.cfg new/python3-ipa-2.6.0/setup.cfg
--- old/python3-ipa-2.5.0/setup.cfg 2018-12-12 02:52:08.000000000 +0100
+++ new/python3-ipa-2.6.0/setup.cfg 2019-01-04 17:16:46.000000000 +0100
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 2.5.0
+current_version = 2.6.0
commit = True
tag = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/setup.py new/python3-ipa-2.6.0/setup.py
--- old/python3-ipa-2.5.0/setup.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/setup.py 2019-01-04 17:15:48.000000000 +0100
@@ -43,7 +43,7 @@
setup(
name='python3-ipa',
- version='2.5.0',
+ version='2.6.0',
description="Package for automated testing of cloud images.",
long_description=readme,
long_description_content_type="text/markdown",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/tests/test_ipa_azure.py new/python3-ipa-2.6.0/tests/test_ipa_azure.py
--- old/python3-ipa-2.5.0/tests/test_ipa_azure.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/tests/test_ipa_azure.py 2019-01-04 17:15:48.000000000 +0100
@@ -203,8 +203,6 @@
assert provider.ip_config_name == 'fakeinstance-ip-config'
assert provider.nic_name == 'fakeinstance-nic'
- assert provider.subnet_name == 'fakeinstance-subnet'
- assert provider.vnet_name == 'fakeinstance-vnet'
assert provider.public_ip_name == 'fakeinstance-public-ip'
@patch.object(AzureProvider, '_get_instance')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/tests/test_ipa_ec2.py new/python3-ipa-2.6.0/tests/test_ipa_ec2.py
--- old/python3-ipa-2.5.0/tests/test_ipa_ec2.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/tests/test_ipa_ec2.py 2019-01-04 17:15:48.000000000 +0100
@@ -163,8 +163,9 @@
assert result == '#!/bin/bash\n' \
'echo testkey12345 >> /home/ec2-user/.ssh/authorized_keys\n'
+ @patch.object(EC2Provider, '_wait_on_instance')
@patch.object(EC2Provider, '_connect')
- def test_ec2_launch_instance(self, mock_connect):
+ def test_ec2_launch_instance(self, mock_connect, mock_wait_on_instance):
"""Test ec2 provider launch instance method."""
instance = MagicMock()
instance.instance_id = 'i-123456789'
@@ -180,6 +181,7 @@
provider.security_group_id = 'sg-123456789'
provider._launch_instance()
+ mock_wait_on_instance.assert_called_once_with('running', 600)
assert instance.instance_id == provider.running_instance_id
assert resource.create_instances.call_count == 1
@@ -237,8 +239,11 @@
assert provider.instance_ip == '127.0.0.3'
assert mock_get_instance.call_count == 1
+ @patch.object(EC2Provider, '_wait_on_instance')
@patch.object(EC2Provider, '_get_instance')
- def test_ec2_start_instance(self, mock_get_instance):
+ def test_ec2_start_instance(
+ self, mock_get_instance, mock_wait_on_instance
+ ):
"""Test ec2 start instance method."""
instance = MagicMock()
instance.start.return_value = None
@@ -247,10 +252,15 @@
provider = EC2Provider(**self.kwargs)
provider._start_instance()
+
+ mock_wait_on_instance.assert_called_once_with('running', 600)
assert mock_get_instance.call_count == 1
+ @patch.object(EC2Provider, '_wait_on_instance')
@patch.object(EC2Provider, '_get_instance')
- def test_ec2_stop_instance(self, mock_get_instance):
+ def test_ec2_stop_instance(
+ self, mock_get_instance, mock_wait_on_instance
+ ):
"""Test ec2 stop instance method."""
instance = MagicMock()
instance.stop.return_value = None
@@ -259,6 +269,8 @@
provider = EC2Provider(**self.kwargs)
provider._stop_instance()
+
+ mock_wait_on_instance.assert_called_once_with('stopped', 600)
assert mock_get_instance.call_count == 1
@patch.object(EC2Provider, '_get_instance')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.5.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_uuid.py new/python3-ipa-2.6.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_uuid.py
--- old/python3-ipa-2.5.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_uuid.py 2018-12-12 02:51:14.000000000 +0100
+++ new/python3-ipa-2.6.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_uuid.py 2019-01-04 17:15:48.000000000 +0100
@@ -2,4 +2,4 @@
def test_sles_ec2_uuid(host):
result = host.run('sudo cat /sys/devices/virtual/dmi/id/product_uuid')
- assert result.stdout.startswith('EC2')
+ assert result.stdout[:3].lower() == 'ec2'