diff --git a/apache-libcloud-2.3.0.tar.gz b/apache-libcloud-2.3.0.tar.gz deleted file mode 100644 index 4ac1a8d..0000000 --- a/apache-libcloud-2.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e2eee3802163bd0605975ed1e284cafc23203919bfa80c0cc5d3cd2543aaf97 -size 1801711 diff --git a/apache-libcloud-2.4.0.tar.gz b/apache-libcloud-2.4.0.tar.gz new file mode 100644 index 0000000..186d184 --- /dev/null +++ b/apache-libcloud-2.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:125c410996b84464b426922f1398a317869f27173a6461e32f3b1dfe671d5235 +size 1786225 diff --git a/ec2_create_node.patch b/ec2_create_node.patch index f333252..d5c87e4 100644 --- a/ec2_create_node.patch +++ b/ec2_create_node.patch @@ -1,8 +1,6 @@ -Index: apache-libcloud-2.3.0/libcloud/compute/drivers/ec2.py -=================================================================== ---- apache-libcloud-2.3.0.orig/libcloud/compute/drivers/ec2.py -+++ apache-libcloud-2.3.0/libcloud/compute/drivers/ec2.py -@@ -3907,12 +3907,18 @@ class BaseEC2NodeDriver(NodeDriver): +--- apache-libcloud-2.4.0/libcloud/compute/drivers/ec2.py.orig 2019-02-25 17:38:58.959040486 +0700 ++++ apache-libcloud-2.4.0/libcloud/compute/drivers/ec2.py 2019-02-25 17:39:13.791169683 +0700 +@@ -1865,12 +1865,18 @@ """ image = kwargs["image"] size = kwargs["size"] diff --git a/image_projects.patch b/image_projects.patch deleted file mode 100644 index 0d43749..0000000 --- a/image_projects.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: apache-libcloud-2.3.0/libcloud/compute/drivers/gce.py -=================================================================== ---- apache-libcloud-2.3.0.orig/libcloud/compute/drivers/gce.py -+++ apache-libcloud-2.3.0/libcloud/compute/drivers/gce.py -@@ -1751,16 +1751,42 @@ class GCENodeDriver(NodeDriver): - } - - IMAGE_PROJECTS = { -- "centos-cloud": ["centos"], -- "coreos-cloud": ["coreos"], -- "debian-cloud": ["debian", "backports"], -- "gce-nvme": ["nvme-backports"], -- "google-containers": ["container-vm"], -- "opensuse-cloud": ["opensuse"], -- "rhel-cloud": ["rhel"], -- "suse-cloud": ["sles", "suse"], -- "ubuntu-os-cloud": ["ubuntu"], -- "windows-cloud": ["windows"], -+ "centos-cloud": ["centos-6", "centos-7"], -+ "cos-cloud": ["cos-beta", "cos-dev", "cos-stable"], -+ "coreos-cloud": ["coreos-alpha", "coreos-beta", "coreos-stable"], -+ "debian-cloud": ["debian-8", "debian-9"], -+ "opensuse-cloud": ["opensuse-leap"], -+ "rhel-cloud": ["rhel-6", "rhel-7"], -+ "suse-cloud": ["sles-11", "sles-12", "sles-15"], -+ "suse-byos-cloud": [ -+ "sles-11-byos", "sles-12-byos", -+ "sles-12-sp2-sap-byos", "sles-12-sp3-sap-byos", -+ "sles-15-sap-byos", -+ "suse-manager-proxy-byos", "suse-manager-server-byos" -+ ], -+ "suse-sap-cloud": [ -+ "sles-12-sp2-sap", "sles-12-sp3-sap", -+ "sles-15-sap" -+ ], -+ "ubuntu-os-cloud": [ -+ "ubuntu-1404-lts", "ubuntu-1604-lts", "ubuntu-1710" -+ ], -+ "windows-cloud": [ -+ "windows-1709-core-for-containers", "windows-1709-core", -+ "windows-2008-r2", "windows-2012-r2-core", "windows-2012-r2", -+ "windows-2016-core", "windows-2016" -+ ], -+ "windows-sql-cloud": [ -+ "sql-ent-2012-win-2012-r2", "sql-std-2012-win-2012-r2", -+ "sql-web-2012-win-2012-r2", "sql-ent-2014-win-2012-r2", -+ "sql-ent-2014-win-2016", "sql-std-2014-win-2012-r2", -+ "sql-web-2014-win-2012-r2", "sql-ent-2016-win-2012-r2", -+ "sql-ent-2016-win-2016", "sql-std-2016-win-2012-r2", -+ "sql-std-2016-win-2016", "sql-web-2016-win-2012-r2", -+ "sql-web-2016-win-2016", "sql-ent-2017-win-2016", -+ "sql-exp-2017-win-2012-r2", "sql-exp-2017-win-2016", -+ "sql-std-2017-win-2016", "sql-web-2017-win-2016" -+ ], - } - - BACKEND_SERVICE_PROTOCOLS = ['HTTP', 'HTTPS', 'HTTP2', 'TCP', 'SSL'] diff --git a/python-apache-libcloud.changes b/python-apache-libcloud.changes index a5040e1..03e536e 100644 --- a/python-apache-libcloud.changes +++ b/python-apache-libcloud.changes @@ -1,3 +1,67 @@ +------------------------------------------------------------------- +Mon Feb 25 09:28:39 UTC 2019 - John Vandenberg + +- Activate test suite, deselecting one set of tests which ssh to localhost +- Remove image_projects.patch merged upstream +- Add Suggests for optional dependencies paramiko, lockfile, libvirt-python + and pysphere +- Add example code to %doc +- Update to v2.4.0 + * Refuse installation with Python 2.6 and Python 3.3 + * Support Python 3.7 + * Cleanup various Python files + * Allow running tests with http_proxy set + * Common + + Document openstack_connection_kwargs method + + Handle missing user email in OpenStackIdentityUser + * Compute + + [ARM] Support OS disk size definition on node creation + + [Digital Ocean] Support floating IPs + + [Digital Ocean] Support attach/detach for floating IPs + + [Digital Ocean] Add ex_get_node_details + + [Digital Ocean] Add tags extra attribute to create_node + + [Dimension Data] Fix IndexError in list_images + + [EC2] Add AWS eu-west-3 (Paris) region + + [EC2] Add description to ex_authorize_security_group_ingress + + [EC2] Added script to automatically get EC2 instance sizes + + [EC2] Update instance sizes + + [EC2] Accept tags when create a snapshot + + [GCE] Expand Firewall options coverage + + [GCE] Expand network and subnetwork options coverage + + [GCE] Extend ex_create_address to allow internal ip creation + + [GCE] Allow shared VPC in managed instance group creation + + [GCE] Support disk_size parameter for boot disk when creating instance + + [GCE] Update public image projects list + + [GCE] Fix _find_zone_or_region for >500 instances + + [GCE] Allow routing_mode=None in ex_create_network + + [OpenStack] Implement Glance Image API v2 + + [OpenStack] Fix spelling in ex_files description + + [OpenStack v2] Allow listing image members + + [OpenStack v2] Allow creating and accepting image members + + [OpenStack v2] Fix image members methods + + [OpenStack] Fix API doc for delete_floating_ip + + [OpenStack] Implement port attaching/detaching + + [OpenStack] Add methods for getting and creating ports + + [OpenStack] Add get_user method + + [OpenStack] Add ex_list_subnets to OpenStack_2_NodeDriver + + [OpenStack] The OpenStack_2_NodeDriver uses two connections + + [OpenStack] The OpenStack_2_NodeDriver /v2.0/networks instead of /os-networks + + [Scaleway] New Scaleway driver + + [Scaleway] Update Scaleway default API host + * DNS + + [Google Cloud DNS] Document driver instantiation + * Storage + + Update docstring for storage provider class + + [Azure Blob Storage] Allow filtering lists by prefix + + [Azure Blob Storage] Update driver documentation + + [Azure Blob Storage] Fix upload/download streams + + [Azure Blob Storage] Fix PageBlob headers + + [S3] Guess s3 upload content type + + [S3] Add Amazon S3 (cn-northwest-1) Storage Driver + * Other + + Fixed spelling in 2.0 changes documentation + + ------------------------------------------------------------------- Fri Sep 28 20:00:44 UTC 2018 - Sean Marlow diff --git a/python-apache-libcloud.spec b/python-apache-libcloud.spec index 9f9aa82..fe08376 100644 --- a/python-apache-libcloud.spec +++ b/python-apache-libcloud.spec @@ -1,7 +1,7 @@ # # spec file for package python-apache-libcloud # -# 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,16 +18,22 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-apache-libcloud -Version: 2.3.0 +Version: 2.4.0 Release: 0 Summary: Abstraction over multiple cloud provider APIs License: Apache-2.0 Group: System/Monitoring URL: https://libcloud.apache.org Source0: https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-%{version}.tar.gz -Patch1: image_projects.patch Patch2: ec2_create_node.patch +BuildRequires: %{python_module libvirt-python} +BuildRequires: %{python_module lockfile} BuildRequires: %{python_module lxml} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module paramiko} +BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests-mock} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module xml} BuildRequires: fdupes @@ -36,10 +42,11 @@ BuildRequires: python-rpm-macros BuildRequires: python2 Requires: python-lxml Requires: python-requests +Suggests: python-paramiko +Suggests: python-libvirt-python +Suggests: python-lockfile +Suggests: python-pysphere BuildArch: noarch -%ifpython2 -Requires: python2 -%endif %python_subpackages %description @@ -48,8 +55,11 @@ differences among multiple cloud provider APIs. %prep %setup -q -n apache-libcloud-%{version} -%patch1 -p1 %patch2 -p1 +sed -i '/^#!/d' demos/gce_demo.py +chmod a-x demos/gce_demo.py +# Setup tests +cp libcloud/test/secrets.py-dist libcloud/test/secrets.py %build %python_build @@ -61,9 +71,18 @@ find %{buildroot} -name '*.json' -size 0 -delete find %{buildroot} -name '*.pem' -size 0 -delete %python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%check +# Skip ShellOutSSHClientTests tests which attempt to ssh to localhost +python2 -m pytest -k 'not ShellOutSSHClientTests' +# Note these two extra py3 failures are undesirable and should be fixed +python3 -m pytest -k \ + 'not test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character and \ + not test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character and \ + not ShellOutSSHClientTests' + %files %{python_files} %license LICENSE -%doc CHANGES.rst README.rst +%doc CHANGES.rst README.rst demos/ example_*.py %{python_sitelib}/* %changelog