Hello community, here is the log from the commit of package python3-ipa for openSUSE:Factory checked in at 2018-10-02 19:48:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-ipa (Old) and /work/SRC/openSUSE:Factory/.python3-ipa.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-ipa" Tue Oct 2 19:48:58 2018 rev:7 rq:639456 version:2.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python3-ipa/python3-ipa.changes 2018-08-18 00:06:41.583540576 +0200 +++ /work/SRC/openSUSE:Factory/.python3-ipa.new/python3-ipa.changes 2018-10-02 19:49:34.961696271 +0200 @@ -1,0 +2,22 @@ +Mon Oct 1 19:39:29 UTC 2018 - Sean Marlow <sean.mar...@suse.com> + +- Update to v2.1.0 (2018-10-01) + + Add azure accelerated networking option. + + Add IPA logo. + + Cloud init services are one-shot in EC2. + + Curl directly for placement in metadata when determining + region. +- Add ec2_types.patch to allow passing instance type strings to + libcloud driver. + +------------------------------------------------------------------- +Wed Sep 12 21:32:35 UTC 2018 - Sean Marlow <sean.mar...@suse.com> + +- Update to v2.0.1 (2018-09-12) + + Update project status to stable. + + Update root pass test to work with SLE11. + + Account for sysvinit in SLE11. + + Convert azure regions from id to display format. + + Update repo URL to correct org. + +------------------------------------------------------------------- Old: ---- python3-ipa-2.0.0.tar.gz New: ---- ec2_types.patch python3-ipa-2.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-ipa.spec ++++++ --- /var/tmp/diff_new_pack.M8n9lj/_old 2018-10-02 19:49:35.385695829 +0200 +++ /var/tmp/diff_new_pack.M8n9lj/_new 2018-10-02 19:49:35.389695825 +0200 @@ -12,19 +12,20 @@ # 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/ # %bcond_without test Name: python3-ipa -Version: 2.0.0 +Version: 2.1.0 Release: 0 Summary: Command line and API for testing custom images License: GPL-3.0-or-later Group: Development/Languages/Python URL: https://github.com/SUSE/ipa Source: https://files.pythonhosted.org/packages/source/p/python3-ipa/%{name}-%{version}.tar.gz +Patch1: ec2_types.patch BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-PyYAML @@ -74,6 +75,7 @@ %prep %setup -q +%patch1 -p1 %build python3 setup.py build ++++++ ec2_types.patch ++++++ Index: python3-ipa-2.0.1/ipa/ipa_ec2.py =================================================================== --- python3-ipa-2.0.1.orig/ipa/ipa_ec2.py +++ python3-ipa-2.0.1/ipa/ipa_ec2.py @@ -254,9 +254,14 @@ class EC2Provider(LibcloudProvider): def _launch_instance(self): """Launch an instance of the given image.""" + try: + size = self._get_instance_size() + except EC2ProviderException: + size = self.instance_type or EC2_DEFAULT_TYPE + kwargs = { 'name': ipa_utils.generate_instance_name('ec2-ipa-test'), - 'size': self._get_instance_size(), + 'size': size, 'image': self._get_image() } Index: python3-ipa-2.0.1/tests/test_ipa_ec2.py =================================================================== --- python3-ipa-2.0.1.orig/tests/test_ipa_ec2.py +++ python3-ipa-2.0.1/tests/test_ipa_ec2.py @@ -179,21 +179,6 @@ class TestEC2Provider(object): assert driver.create_node.call_count == 1 @patch.object(EC2Provider, '_get_driver') - def test_ec2_launch_instance_no_size(self, mock_get_driver): - """Test exception raised if instance type not found.""" - driver = MagicMock() - driver.list_sizes.return_value = [] - - mock_get_driver.return_value = driver - provider = EC2Provider(**self.kwargs) - - with pytest.raises(EC2ProviderException) as error: - provider._launch_instance() - - assert str(error.value) == 'Instance type: t2.micro not found.' - assert driver.list_sizes.call_count == 1 - - @patch.object(EC2Provider, '_get_driver') def test_ec2_launch_instance_no_image(self, mock_get_driver): """Test exception raised if image not found.""" driver = MagicMock() ++++++ python3-ipa-2.0.0.tar.gz -> python3-ipa-2.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/CHANGES.md new/python3-ipa-2.1.0/CHANGES.md --- old/python3-ipa-2.0.0/CHANGES.md 2018-08-16 17:35:08.000000000 +0200 +++ new/python3-ipa-2.1.0/CHANGES.md 2018-10-01 21:26:47.000000000 +0200 @@ -1,3 +1,28 @@ +v2.1.0 (2018-10-01) +=================== + +- Add IPA logo. +- Cloud init services are one-shot in EC2. + [\#131](https://github.com/SUSE-Enceladus/ipa/pull/131) +- Add azure accelerated networking option. + [\#132](https://github.com/SUSE-Enceladus/ipa/pull/132) +- Curl directly for placement in metadata when determining + region. + [\#133](https://github.com/SUSE-Enceladus/ipa/pull/133) + +v2.0.1 (2018-09-12) +=================== + +- Update project status to stable. +- Update root pass test to work with SLE11. + [\#125](https://github.com/SUSE-Enceladus/ipa/pull/125) +- Account for sysvinit in SLE11. + [\#126](https://github.com/SUSE-Enceladus/ipa/pull/126) +- Convert azure regions from id to display format. + [\#127](https://github.com/SUSE-Enceladus/ipa/pull/127) +- Update repo URL to correct org. + [\#128](https://github.com/SUSE-Enceladus/ipa/pull/128) + v2.0.0 (2018-08-15) =================== @@ -8,50 +33,50 @@ =================== - Add archive management option to CLI. - [\#83](https://github.com/SUSE/ipa/pull/83) + [\#83](https://github.com/SUSE-Enceladus/ipa/pull/83) - openSUSE Leap requires auto import of repo keys. - [\#98](https://github.com/SUSE/ipa/pull/98) + [\#98](https://github.com/SUSE-Enceladus/ipa/pull/98) - Update Leap test description. - [\#99](https://github.com/SUSE/ipa/pull/99) + [\#99](https://github.com/SUSE-Enceladus/ipa/pull/99) - Sync tests should not raise exception. - [\#100](https://github.com/SUSE/ipa/pull/100) + [\#100](https://github.com/SUSE-Enceladus/ipa/pull/100) - Use the GCE service account in the launched instance. - [\#107](https://github.com/SUSE/ipa/pull/107) + [\#107](https://github.com/SUSE-Enceladus/ipa/pull/107) - Add serviceAccountUser role requirement for GCE. - Rename pretty\_name to be generic value. - [\#108](https://github.com/SUSE/ipa/pull/108) + [\#108](https://github.com/SUSE-Enceladus/ipa/pull/108) - Use temp directory for results in tests. - [\#109](https://github.com/SUSE/ipa/pull/109) + [\#109](https://github.com/SUSE-Enceladus/ipa/pull/109) - Move docs to markdown for better support. - [\#110](https://github.com/SUSE/ipa/pull/110) + [\#110](https://github.com/SUSE-Enceladus/ipa/pull/110) - Determine provider and region from instance. - [\#113](https://github.com/SUSE/ipa/pull/113) + [\#113](https://github.com/SUSE-Enceladus/ipa/pull/113) - Add SLE\_15 repos. - [\#116](https://github.com/SUSE/ipa/pull/116) + [\#116](https://github.com/SUSE-Enceladus/ipa/pull/116) - Update GCE services test. - [\#117](https://github.com/SUSE/ipa/pull/117) + [\#117](https://github.com/SUSE-Enceladus/ipa/pull/117) - Rename `--ssh-private-key` option. - [\#119](https://github.com/SUSE/ipa/pull/119) + [\#119](https://github.com/SUSE-Enceladus/ipa/pull/119) - Add ip address option for SSH testing. - Add SSH provider. - [\#115](https://github.com/SUSE/ipa/pull/115) + [\#115](https://github.com/SUSE-Enceladus/ipa/pull/115) v1.3.0 (2018-07-23) =================== - Add ec2 tests to check billing code in metadata. - [\#81](https://github.com/SUSE/ipa/pull/81) + [\#81](https://github.com/SUSE-Enceladus/ipa/pull/81) - Using token normalize breaks region shortcode. Remove region shortcode which overlaps running instance id. - [\#92](https://github.com/SUSE/ipa/pull/92) + [\#92](https://github.com/SUSE-Enceladus/ipa/pull/92) - Allow new paths for history log option. when testing. - [\#95](https://github.com/SUSE/ipa/pull/95) + [\#95](https://github.com/SUSE-Enceladus/ipa/pull/95) - If a test dir does not exist just continue. - [\#104](https://github.com/SUSE/ipa/pull/104) + [\#104](https://github.com/SUSE-Enceladus/ipa/pull/104) - Update GCE setup/configuration docs. - Move requirements to txt files. - Raise useful exception msg if GCE service account file is invalid. - [\#106](https://github.com/SUSE/ipa/pull/106) + [\#106](https://github.com/SUSE-Enceladus/ipa/pull/106) - Add certifi requirement for Libcloud GCE driver. - Update pycrypto requirement to pycryptodome. @@ -59,29 +84,29 @@ =================== - Add SLES test to ensure root user has no password. - [\#90](https://github.com/SUSE/ipa/pull/90) + [\#90](https://github.com/SUSE-Enceladus/ipa/pull/90) - Fix typo in force new reg test. - Add \--timeout cli and configuration option. - [\#86](https://github.com/SUSE/ipa/pull/86) + [\#86](https://github.com/SUSE-Enceladus/ipa/pull/86) - Add a test to wait on registration for on-demand instances. - [\#87](https://github.com/SUSE/ipa/pull/87) + [\#87](https://github.com/SUSE-Enceladus/ipa/pull/87) - Add azure tests to check billing tag in metadata. - [\#88](https://github.com/SUSE/ipa/pull/88) + [\#88](https://github.com/SUSE-Enceladus/ipa/pull/88) - Handle custom Azure image vhd id's. - [\#89](https://github.com/SUSE/ipa/pull/89) + [\#89](https://github.com/SUSE-Enceladus/ipa/pull/89) v1.1.1 (2018-05-16) =================== - Cleanup typo in docs. - Explicitly close SSH connections. - [\#79](https://github.com/SUSE/ipa/pull/79) + [\#79](https://github.com/SUSE-Enceladus/ipa/pull/79) v1.1.0 (2018-05-15) =================== - Add requirements and external test injection with the `--inject` - option. [\#78](https://github.com/SUSE/ipa/pull/78) + option. [\#78](https://github.com/SUSE-Enceladus/ipa/pull/78) - Adds the option to inject packages, archives and files. Also provides the ability to execute commands and install packages from an existing repository. @@ -90,27 +115,27 @@ =================== - Tests argument is now optional. - [\#56](https://github.com/SUSE/ipa/pull/56) + [\#56](https://github.com/SUSE-Enceladus/ipa/pull/56) - This allows for the use of `--no-cleanup` option to start an instance in the given framework. - Add regression test to check for valid UUID on SLES instance in EC2. - [\#57](https://github.com/SUSE/ipa/pull/57) + [\#57](https://github.com/SUSE-Enceladus/ipa/pull/57) - Add regression test to confirm lscpu binary returns successful exit - code. [\#58](https://github.com/SUSE/ipa/pull/58) + code. [\#58](https://github.com/SUSE-Enceladus/ipa/pull/58) - Subnet option has been added to launch a new instance in the given network/subnet (`--subnet-id`). - [\#59](https://github.com/SUSE/ipa/pull/59) + [\#59](https://github.com/SUSE-Enceladus/ipa/pull/59) - Remove requirement on case with distro and provider options. - [\#60](https://github.com/SUSE/ipa/pull/60) & - [\#65](https://github.com/SUSE/ipa/pull/65) + [\#60](https://github.com/SUSE-Enceladus/ipa/pull/60) & + [\#65](https://github.com/SUSE-Enceladus/ipa/pull/65) - Use Testinfra run module to check hostname. System Info module was - removed from package. [\#61](https://github.com/SUSE/ipa/pull/61) + removed from package. [\#61](https://github.com/SUSE-Enceladus/ipa/pull/61) - Migrate Azure provider to the ARM (resource manager API). - [\#63](https://github.com/SUSE/ipa/pull/63) + [\#63](https://github.com/SUSE-Enceladus/ipa/pull/63) - Add option to use user-data for loading SSH public key to instance - in EC2. [\#68](https://github.com/SUSE/ipa/pull/68) + in EC2. [\#68](https://github.com/SUSE-Enceladus/ipa/pull/68) - Add delete history item option to results command. - [\#69](https://github.com/SUSE/ipa/pull/69) + [\#69](https://github.com/SUSE-Enceladus/ipa/pull/69) - Split up results command into separate subcommands. v0.5.1 (2017-12-11) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/CONTRIBUTING.md new/python3-ipa-2.1.0/CONTRIBUTING.md --- old/python3-ipa-2.0.0/CONTRIBUTING.md 2018-08-13 18:35:21.000000000 +0200 +++ new/python3-ipa-2.1.0/CONTRIBUTING.md 2018-08-28 00:07:08.000000000 +0200 @@ -2,7 +2,7 @@ ============ ```shell -$ git clone https://github.com/SUSE/ipa.git +$ git clone https://github.com/SUSE-Enceladus/ipa.git $ cd ipa # Activate virtual Environment then install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/PKG-INFO new/python3-ipa-2.1.0/PKG-INFO --- old/python3-ipa-2.0.0/PKG-INFO 2018-08-16 17:37:58.000000000 +0200 +++ new/python3-ipa-2.1.0/PKG-INFO 2018-10-01 21:36:59.000000000 +0200 @@ -1,20 +1,20 @@ Metadata-Version: 2.1 Name: python3-ipa -Version: 2.0.0 +Version: 2.1.0 Summary: Package for automated testing of cloud images. -Home-page: https://github.com/SUSE/pubcloud/ipa +Home-page: https://github.com/SUSE-Enceladus/ipa Author: SUSE Author-email: public-cloud-...@susecloud.net License: GPLv3+ Description: [![Build Status](https://travis-ci.com/SUSE-Enceladus/ipa.svg?branch=master)](https://travis-ci.com/SUSE-Enceladus/ipa) - **IPA** (Image Proofing App) + [![IPA](https://raw.githubusercontent.com/SUSE-Enceladus/ipa/master/docs/assets/images/ipa-logo.png "IPA Logo")](https://github.com/SUSE-Enceladus/ipa) overview ======== - **IPA** provides a command line utility to test images in the Public - Cloud (AWS, Azure, GCE, etc.). + **IPA** (Image Proofing App) provides a command line utility to test + images in the Public Cloud (AWS, Azure, GCE, etc.). With **IPA** you can now test custom images in a provider agnostic way with one tool and one API. In the first release, **IPA** supports the @@ -75,7 +75,7 @@ > **ipa** currently passes the Pytest option `-x` (stop on first > failure) through as `--early-exit`. If there's an interest or need for > any other options/args please submit an issue to - > [Github](https://github.com/SUSE/ipa/issues). + > [Github](https://github.com/SUSE-Enceladus/ipa/issues). CLI Overview ============ @@ -114,13 +114,13 @@ =================== Please submit issues and requests to - [Github](https://github.com/SUSE/ipa/issues). + [Github](https://github.com/SUSE-Enceladus/ipa/issues). Contributing ============ Contributions to **ipa** are welcome and encouraged. See - [CONTRIBUTING](https://github.com/SUSE/ipa/blob/master/CONTRIBUTING.md) + [CONTRIBUTING](https://github.com/SUSE-Enceladus/ipa/blob/master/CONTRIBUTING.md) for info on getting started. License @@ -129,12 +129,12 @@ Copyright (c) 2018 SUSE LLC. Distributed under the terms of GPL-3.0+ license, see - [LICENSE](https://github.com/SUSE/ipa/blob/master/LICENSE) + [LICENSE](https://github.com/SUSE-Enceladus/ipa/blob/master/LICENSE) for details. Keywords: ipa Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: Developers Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/README.md new/python3-ipa-2.1.0/README.md --- old/python3-ipa-2.0.0/README.md 2018-08-15 18:37:51.000000000 +0200 +++ new/python3-ipa-2.1.0/README.md 2018-09-26 23:40:46.000000000 +0200 @@ -1,12 +1,12 @@ [![Build Status](https://travis-ci.com/SUSE-Enceladus/ipa.svg?branch=master)](https://travis-ci.com/SUSE-Enceladus/ipa) -**IPA** (Image Proofing App) +[![IPA](https://raw.githubusercontent.com/SUSE-Enceladus/ipa/master/docs/assets/images/ipa-logo.png "IPA Logo")](https://github.com/SUSE-Enceladus/ipa) overview ======== -**IPA** provides a command line utility to test images in the Public -Cloud (AWS, Azure, GCE, etc.). +**IPA** (Image Proofing App) provides a command line utility to test +images in the Public Cloud (AWS, Azure, GCE, etc.). With **IPA** you can now test custom images in a provider agnostic way with one tool and one API. In the first release, **IPA** supports the @@ -67,7 +67,7 @@ > **ipa** currently passes the Pytest option `-x` (stop on first > failure) through as `--early-exit`. If there's an interest or need for > any other options/args please submit an issue to -> [Github](https://github.com/SUSE/ipa/issues). +> [Github](https://github.com/SUSE-Enceladus/ipa/issues). CLI Overview ============ @@ -106,13 +106,13 @@ =================== Please submit issues and requests to -[Github](https://github.com/SUSE/ipa/issues). +[Github](https://github.com/SUSE-Enceladus/ipa/issues). Contributing ============ Contributions to **ipa** are welcome and encouraged. See -[CONTRIBUTING](https://github.com/SUSE/ipa/blob/master/CONTRIBUTING.md) +[CONTRIBUTING](https://github.com/SUSE-Enceladus/ipa/blob/master/CONTRIBUTING.md) for info on getting started. License @@ -121,5 +121,5 @@ Copyright (c) 2018 SUSE LLC. Distributed under the terms of GPL-3.0+ license, see -[LICENSE](https://github.com/SUSE/ipa/blob/master/LICENSE) +[LICENSE](https://github.com/SUSE-Enceladus/ipa/blob/master/LICENSE) for details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/docs/index.md new/python3-ipa-2.1.0/docs/index.md --- old/python3-ipa-2.0.0/docs/index.md 2018-08-13 18:35:21.000000000 +0200 +++ new/python3-ipa-2.1.0/docs/index.md 2018-08-28 00:07:08.000000000 +0200 @@ -50,10 +50,10 @@ ```shell # latest source -$ pip install git+https://github.com/SUSE/ipa.git +$ pip install git+https://github.com/SUSE-Enceladus/ipa.git # specific branch or release -$ pip install git+https://github.com/SUSE/ipa.git@{branch/release} +$ pip install git+https://github.com/SUSE-Enceladus/ipa.git@{branch/release} ``` See [PyPi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/docs/start.md new/python3-ipa-2.1.0/docs/start.md --- old/python3-ipa-2.0.0/docs/start.md 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/docs/start.md 2018-08-28 00:07:08.000000000 +0200 @@ -42,10 +42,10 @@ ```shell # latest source -$ pip install git+https://github.com/SUSE/ipa.git +$ pip install git+https://github.com/SUSE-Enceladus/ipa.git # specific branch or release -$ pip install git+https://github.com/SUSE/ipa.git@{branch/release} +$ pip install git+https://github.com/SUSE-Enceladus/ipa.git@{branch/release} ``` See [PyPi @@ -90,7 +90,7 @@ For testing EC2 instances **ipa** will use the ec2utils configuration file located at \~/.ec2utils.conf. See -[ec2utils](https://github.com/SUSE/Enceladus/tree/master/ec2utils) for +[ec2utils](https://github.com/SUSE-Enceladus/Enceladus/tree/master/ec2utils) for an example configuration file. GCE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/__init__.py new/python3-ipa-2.1.0/ipa/__init__.py --- old/python3-ipa-2.0.0/ipa/__init__.py 2018-08-16 17:35:08.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/__init__.py 2018-10-01 21:29:09.000000000 +0200 @@ -22,4 +22,4 @@ __author__ = """SUSE""" __email__ = 'public-cloud-...@susecloud.net' -__version__ = '2.0.0' +__version__ = '2.1.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/ipa_azure.py new/python3-ipa-2.1.0/ipa/ipa_azure.py --- old/python3-ipa-2.0.0/ipa/ipa_azure.py 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/ipa_azure.py 2018-09-26 21:35:52.000000000 +0200 @@ -37,6 +37,7 @@ """Class for testing instances in Azure.""" def __init__(self, + accelerated_networking=False, access_key_id=None, # Not used in Azure account_name=None, cleanup=None, @@ -124,6 +125,7 @@ self.ssh_private_key_file ) + self.accelerated_networking = accelerated_networking self.ssh_user = ssh_user or AZURE_DEFAULT_USER self.ssh_public_key = self._get_ssh_public_key() self.subnet_id = subnet_id @@ -139,7 +141,7 @@ def _create_network_interface( self, ip_config_name, nic_name, public_ip, region, - resource_group_name, subnet + resource_group_name, subnet, accelerated_networking=False ): """ Create a network interface in the resource group. @@ -160,6 +162,9 @@ }] } + if accelerated_networking: + nic_config['enable_accelerated_networking'] = True + try: nic_setup = self.network.network_interfaces.create_or_update( resource_group_name, nic_name, nic_config @@ -447,7 +452,7 @@ ) interface = self._create_network_interface( self.ip_config_name, self.nic_name, public_ip, self.region, - self.running_instance_id, subnet + self.running_instance_id, subnet, self.accelerated_networking ) # Get dictionary of VM parameters and create instance. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/ipa_controller.py new/python3-ipa-2.1.0/ipa/ipa_controller.py --- old/python3-ipa-2.0.0/ipa/ipa_controller.py 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/ipa_controller.py 2018-09-26 21:35:52.000000000 +0200 @@ -35,6 +35,7 @@ def test_image(provider_name, + accelerated_networking=None, access_key_id=None, account=None, cleanup=None, @@ -80,6 +81,7 @@ ) provider = provider_class( + accelerated_networking=accelerated_networking, access_key_id=access_key_id, account_name=account, cleanup=cleanup, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/ipa_ec2.py new/python3-ipa-2.1.0/ipa/ipa_ec2.py --- old/python3-ipa-2.0.0/ipa/ipa_ec2.py 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/ipa_ec2.py 2018-10-01 20:21:25.000000000 +0200 @@ -39,6 +39,7 @@ """Provider class for testing AWS EC2 images.""" def __init__(self, + accelerated_networking=None, # Not used in EC2 access_key_id=None, account_name=None, cleanup=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/ipa_gce.py new/python3-ipa-2.1.0/ipa/ipa_gce.py --- old/python3-ipa-2.0.0/ipa/ipa_gce.py 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/ipa_gce.py 2018-09-26 21:35:52.000000000 +0200 @@ -40,6 +40,7 @@ """Provider class for testing Google Compute Engine (GCE) images.""" def __init__(self, + accelerated_networking=None, # Not used in GCE access_key_id=None, # Not used in GCE account_name=None, # Not used in GCE cleanup=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/ipa_ssh.py new/python3-ipa-2.1.0/ipa/ipa_ssh.py --- old/python3-ipa-2.0.0/ipa/ipa_ssh.py 2018-08-15 17:27:46.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/ipa_ssh.py 2018-09-26 21:35:52.000000000 +0200 @@ -30,6 +30,7 @@ """Class for testing instances in Azure.""" def __init__(self, + accelerated_networking=None, # Not used in SSH access_key_id=None, # Not used in SSH account_name=None, # Not used in SSH cleanup=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/ipa/scripts/cli.py new/python3-ipa-2.1.0/ipa/scripts/cli.py --- old/python3-ipa-2.0.0/ipa/scripts/cli.py 2018-08-16 17:35:08.000000000 +0200 +++ new/python3-ipa-2.1.0/ipa/scripts/cli.py 2018-09-26 21:35:52.000000000 +0200 @@ -82,6 +82,11 @@ @click.command(context_settings=dict(token_normalize_func=str.lower)) @click.option( + '--accelerated-networking', + is_flag=True, + help='Enable accelerated networking in Azure instance network interface.' +) +@click.option( '--access-key-id', help='EC2 access key ID for login credentials.' ) @@ -236,6 +241,7 @@ @click.argument('tests', nargs=-1) @click.pass_context def test(context, + accelerated_networking, access_key_id, account, cleanup, @@ -271,6 +277,7 @@ try: status, results = test_image( provider, + accelerated_networking, access_key_id, account, cleanup, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/package/python3-ipa.spec new/python3-ipa-2.1.0/package/python3-ipa.spec --- old/python3-ipa-2.0.0/package/python3-ipa.spec 2018-08-16 17:35:08.000000000 +0200 +++ new/python3-ipa-2.1.0/package/python3-ipa.spec 2018-10-01 21:29:09.000000000 +0200 @@ -18,12 +18,12 @@ %bcond_without test Name: python3-ipa -Version: 2.0.0 +Version: 2.1.0 Release: 0 Summary: Command line and API for testing custom images License: GPL-3.0-or-later Group: Development/Languages/Python -URL: https://github.com/SUSE/ipa +URL: https://github.com/SUSE-Enceladus/ipa Source: https://files.pythonhosted.org/packages/source/p/python3-ipa/%{name}-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: python3-setuptools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/python3_ipa.egg-info/PKG-INFO new/python3-ipa-2.1.0/python3_ipa.egg-info/PKG-INFO --- old/python3-ipa-2.0.0/python3_ipa.egg-info/PKG-INFO 2018-08-16 17:37:58.000000000 +0200 +++ new/python3-ipa-2.1.0/python3_ipa.egg-info/PKG-INFO 2018-10-01 21:36:59.000000000 +0200 @@ -1,20 +1,20 @@ Metadata-Version: 2.1 Name: python3-ipa -Version: 2.0.0 +Version: 2.1.0 Summary: Package for automated testing of cloud images. -Home-page: https://github.com/SUSE/pubcloud/ipa +Home-page: https://github.com/SUSE-Enceladus/ipa Author: SUSE Author-email: public-cloud-...@susecloud.net License: GPLv3+ Description: [![Build Status](https://travis-ci.com/SUSE-Enceladus/ipa.svg?branch=master)](https://travis-ci.com/SUSE-Enceladus/ipa) - **IPA** (Image Proofing App) + [![IPA](https://raw.githubusercontent.com/SUSE-Enceladus/ipa/master/docs/assets/images/ipa-logo.png "IPA Logo")](https://github.com/SUSE-Enceladus/ipa) overview ======== - **IPA** provides a command line utility to test images in the Public - Cloud (AWS, Azure, GCE, etc.). + **IPA** (Image Proofing App) provides a command line utility to test + images in the Public Cloud (AWS, Azure, GCE, etc.). With **IPA** you can now test custom images in a provider agnostic way with one tool and one API. In the first release, **IPA** supports the @@ -75,7 +75,7 @@ > **ipa** currently passes the Pytest option `-x` (stop on first > failure) through as `--early-exit`. If there's an interest or need for > any other options/args please submit an issue to - > [Github](https://github.com/SUSE/ipa/issues). + > [Github](https://github.com/SUSE-Enceladus/ipa/issues). CLI Overview ============ @@ -114,13 +114,13 @@ =================== Please submit issues and requests to - [Github](https://github.com/SUSE/ipa/issues). + [Github](https://github.com/SUSE-Enceladus/ipa/issues). Contributing ============ Contributions to **ipa** are welcome and encouraged. See - [CONTRIBUTING](https://github.com/SUSE/ipa/blob/master/CONTRIBUTING.md) + [CONTRIBUTING](https://github.com/SUSE-Enceladus/ipa/blob/master/CONTRIBUTING.md) for info on getting started. License @@ -129,12 +129,12 @@ Copyright (c) 2018 SUSE LLC. Distributed under the terms of GPL-3.0+ license, see - [LICENSE](https://github.com/SUSE/ipa/blob/master/LICENSE) + [LICENSE](https://github.com/SUSE-Enceladus/ipa/blob/master/LICENSE) for details. Keywords: ipa Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: Developers Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/python3_ipa.egg-info/SOURCES.txt new/python3-ipa-2.1.0/python3_ipa.egg-info/SOURCES.txt --- old/python3-ipa-2.0.0/python3_ipa.egg-info/SOURCES.txt 2018-08-16 17:37:58.000000000 +0200 +++ new/python3-ipa-2.1.0/python3_ipa.egg-info/SOURCES.txt 2018-10-01 21:36:59.000000000 +0200 @@ -112,6 +112,7 @@ usr/share/lib/ipa/tests/SLES/test_sles_zypper_migration.py usr/share/lib/ipa/tests/SLES/Azure/conftest.py usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure.yaml +usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_accel_networking.py usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_billing_tag.py usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_infiniband.py usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_on_demand.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/setup.cfg new/python3-ipa-2.1.0/setup.cfg --- old/python3-ipa-2.0.0/setup.cfg 2018-08-16 17:37:58.000000000 +0200 +++ new/python3-ipa-2.1.0/setup.cfg 2018-10-01 21:36:59.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.0 +current_version = 2.1.0 commit = True tag = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/setup.py new/python3-ipa-2.1.0/setup.py --- old/python3-ipa-2.0.0/setup.py 2018-08-16 17:35:08.000000000 +0200 +++ new/python3-ipa-2.1.0/setup.py 2018-10-01 21:29:09.000000000 +0200 @@ -43,13 +43,13 @@ setup( name='python3-ipa', - version='2.0.0', + version='2.1.0', description="Package for automated testing of cloud images.", long_description=readme, long_description_content_type="text/markdown", author="SUSE", author_email='public-cloud-...@susecloud.net', - url='https://github.com/SUSE/pubcloud/ipa', + url='https://github.com/SUSE-Enceladus/ipa', packages=find_packages(), package_dir={'ipa': 'ipa'}, @@ -70,7 +70,7 @@ zip_safe=False, keywords='ipa', classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Topic :: Software Development :: Testing', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/tests/test_ipa_cli.py new/python3-ipa-2.1.0/tests/test_ipa_cli.py --- old/python3-ipa-2.0.0/tests/test_ipa_cli.py 2018-08-13 18:35:21.000000000 +0200 +++ new/python3-ipa-2.1.0/tests/test_ipa_cli.py 2018-09-26 21:35:52.000000000 +0200 @@ -62,7 +62,7 @@ runner = CliRunner() result = runner.invoke(main, ['test']) assert result.exit_code != 0 - assert 'Error: Missing argument "provider"' in result.output + assert 'Error: Missing argument' in result.output def test_cli_invalid_provider(): @@ -70,7 +70,7 @@ runner = CliRunner() result = runner.invoke(main, ['test', 'Provider']) assert result.exit_code != 0 - assert 'Error: Invalid value for "provider"' in result.output + assert 'Error: Invalid value for' in result.output def test_cli_invalid_distro(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_accel_networking.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_accel_networking.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_accel_networking.py 1970-01-01 01:00:00.000000000 +0100 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/Azure/test_sles_azure_accel_networking.py 2018-09-26 21:35:52.000000000 +0200 @@ -0,0 +1,5 @@ +def test_sles_azure_accel_networking(host): + has_mellanox_hw = 'Mellanox' in host.run('sudo lspci').stdout + + if has_mellanox_hw: + assert 'mlx' in host.run('sudo lsmod').stdout diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_services.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_services.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_services.py 2017-09-20 20:58:18.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/EC2/test_sles_ec2_services.py 2018-09-21 00:21:52.000000000 +0200 @@ -2,10 +2,17 @@ @pytest.mark.parametrize('name', [ - ('cloud-init-local.service'), - ('cloud-init.service'), - ('cloud-config.service'), - ('cloud-final.service') + ('cloud-init-local'), + ('cloud-init'), + ('cloud-config'), + ('cloud-final') ]) -def test_sles_ec2_services(check_service, name): - assert check_service(name) +def test_sles_ec2_services(check_service, host, name): + assert check_service(name, running=None) + + if host.exists('systemctl'): + # No clear way to check a service exited successfully using sysvinit + output = host.run( + "systemctl show -p Result {0} | sed 's/Result=//g'".format(name) + ) + assert output.stdout.strip() == 'success' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/GCE/test_sles_gce_services.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/GCE/test_sles_gce_services.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/GCE/test_sles_gce_services.py 2018-08-15 16:27:14.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/GCE/test_sles_gce_services.py 2018-08-22 16:09:15.000000000 +0200 @@ -2,25 +2,25 @@ @pytest.mark.parametrize('name', [ - 'google-accounts-daemon.service', - 'google-clock-skew-daemon.service', - 'google-network-daemon.service', - 'google-shutdown-scripts.service' + 'google-accounts-daemon', + 'google-clock-skew-daemon', + 'google-network-daemon' ]) def test_sles_gce_running_services(check_service, name): assert check_service(name) @pytest.mark.parametrize('name', [ - 'google-instance-setup.service', - 'google-startup-scripts.service', - 'google-shutdown-scripts.service' # Exits but remains active + 'google-instance-setup', + 'google-startup-scripts', + 'google-shutdown-scripts' ]) -def test_sles_gce_one_shot_services(host, name): - service = host.service(name) - assert service.is_enabled +def test_sles_gce_one_shot_services(check_service, host, name): + assert check_service(name, running=None) - output = host.run( - "systemctl show -p Result {0} | sed 's/Result=//g'".format(name) - ) - assert output.stdout.strip() == 'success' + if host.exists('systemctl'): + # No clear way to check a service exited successfully using sysvinit + output = host.run( + "systemctl show -p Result {0} | sed 's/Result=//g'".format(name) + ) + assert output.stdout.strip() == 'success' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_guestregister.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_guestregister.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_guestregister.py 2017-09-20 20:58:18.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_guestregister.py 2018-08-22 16:09:15.000000000 +0200 @@ -1,2 +1,2 @@ def test_sles_guestregister(check_service): - assert check_service('guestregister.service', running=False) + assert check_service('guestregister', running=False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_haveged.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_haveged.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_haveged.py 2017-09-20 20:58:18.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_haveged.py 2018-08-22 16:09:15.000000000 +0200 @@ -1,2 +1,2 @@ def test_sles_haveged(check_service): - assert check_service('haveged.service') + assert check_service('haveged') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_root_pass.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_root_pass.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/SLES/test_sles_root_pass.py 2018-06-18 23:44:48.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/SLES/test_sles_root_pass.py 2018-08-22 16:09:15.000000000 +0200 @@ -4,6 +4,6 @@ def test_sles_root_pass(host): # Ensure root does not have a password result = host.run( - 'sudo passwd --status root' + 'sudo passwd -S root' ) - assert shlex.split(result.stdout.strip())[1] in ['L', 'NP'] + assert shlex.split(result.stdout.strip())[1] in ['L', 'LK', 'NP'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/conftest.py new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/conftest.py --- old/python3-ipa-2.0.0/usr/share/lib/ipa/tests/conftest.py 2018-08-15 16:27:14.000000000 +0200 +++ new/python3-ipa-2.1.0/usr/share/lib/ipa/tests/conftest.py 2018-09-28 17:14:54.000000000 +0200 @@ -3,6 +3,55 @@ from susepubliccloudinfoclient import infoserverrequests +azure_regions = { + 'centralus': 'Central US', + 'eastus': 'East US', + 'eastus2': 'East US 2', + 'northcentralus': 'North Central US', + 'southcentralus': 'South Central US', + 'westus': 'West US', + 'northeurope': 'North Europe', + 'westeurope': 'West Europe', + 'eastasia': 'East Asia', + 'southeastasia': 'Southeast Asia', + 'japaneast': 'Japan East', + 'japanwest': 'Japan West', + 'brazilsouth': 'Brazil South', + 'australiaeast': 'Australia East', + 'australiasoutheast': 'Australia Southeast', + 'centralindia': 'Central India', + 'southindia': 'South India', + 'westindia': 'West India', + 'canadacentral': 'Canada Central', + 'canadaeast': 'Canada East', + 'westcentralus': 'West Central US', + 'westus2': 'West US 2', + 'uknorth': 'UK North', + 'uksouth': 'UK South', + 'uksouth2': 'UK South 2', + 'ukwest': 'UK West', + 'uscentraleuap': 'Central US EUAP', + 'useast2euap': 'East US 2 EUAP', + 'koreacentral': 'Korea Central', + 'koreasouth': 'Korea South', + 'francecentral': 'France Central', + 'francesouth': 'France South', + 'australiacentral': 'Australia Central', + 'australiacentral2': 'Australia Central 2', + 'germanycentral': 'Germany Central', + 'germanynortheast': 'Germany Northeast', + 'chinanorth': 'China North', + 'chinaeast': 'China East', + 'chinanorth2': 'China North 2', + 'chinaeast2': 'China East 2', + 'usgoviowa': 'US Gov Iowa', + 'usgovvirginia': 'US Gov Virginia', + 'usgovarizona': 'US Gov Arizona', + 'usgovtexas': 'US Gov Texas', + 'usdodeast': 'US DoD East', + 'usdodcentral': 'US DoD Central' +} + @pytest.fixture() def check_cloud_register(host): @@ -18,10 +67,35 @@ @pytest.fixture() def check_service(host): def f(service_name, running=True, enabled=True): - service = host.service(service_name) + is_running = None + is_enabled = None + + if host.exists('systemctl'): + service = host.service(service_name) + + if running is not None: + is_running = service.is_running + + if enabled is not None: + is_enabled = service.is_enabled + else: + # SystemV Init + if running is not None: + is_running = host.run_expect( + [0, 1, 3], + 'sudo /sbin/service {0} status'.format(service_name) + ).rc == 0 + + if enabled is not None: + is_enabled = bool(host.check_output( + 'find -L /etc/init.d/rc?.d/ -name S??{0}'.format( + service_name + ), + )) + return all([ - service.is_running == running, - service.is_enabled == enabled + is_running == running, + is_enabled == enabled ]) return f @@ -55,10 +129,16 @@ def determine_region(host): def f(provider): if provider == 'ec2': - result = host.run('ec2metadata --availability-zone') + result = host.run( + 'curl http://169.254.169.254/latest/meta-data/placement/' + 'availability-zone' + ) region = result.stdout.strip()[:-1] elif provider == 'gce': - result = host.run('gcemetadata --query instance --zone') + result = host.run( + 'curl "http://metadata.google.internal/computeMetadata/v1/' + 'instance/zone" -H "Metadata-Flavor: Google"' + ) # returns zone like: us-west1-a region = result.stdout.strip().rsplit('/', maxsplit=1)[-1] # returns region: us-west1 @@ -70,6 +150,7 @@ '?api-version=2017-12-01"' ) region = json.loads(result.stdout)['compute']['location'] + region = azure_regions[region] # Convert to display name format return region return f