python-apache-libcloud/ec2_create_node.patch
Niels Abspoel 02d820aeb8 Accepting request 679073 from home:jayvdb:django
- 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, notably
  * Refuse installation with Python 2.6 and Python 3.3
  * Support Python 3.7

OBS-URL: https://build.opensuse.org/request/show/679073
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apache-libcloud?expand=0&rev=83
2019-03-02 08:50:58 +00:00

23 lines
784 B
Diff

--- 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"]
+
+ try:
+ instance_type = size.id
+ except AttributeError:
+ instance_type = size
+
params = {
'Action': 'RunInstances',
'ImageId': image.id,
'MinCount': str(kwargs.get('ex_mincount', '1')),
'MaxCount': str(kwargs.get('ex_maxcount', '1')),
- 'InstanceType': size.id
+ 'InstanceType': instance_type
}
if kwargs.get("ex_terminate_on_shutdown", False):