File ec2_create_node.patch of Package python-apache-libcloud
Index: apache_libcloud-3.9.0/libcloud/compute/drivers/ec2.py
===================================================================
--- apache_libcloud-3.9.0.orig/libcloud/compute/drivers/ec2.py
+++ apache_libcloud-3.9.0/libcloud/compute/drivers/ec2.py
@@ -1620,12 +1620,18 @@ class BaseEC2NodeDriver(NodeDriver):
on-demand price will be used.
:type ex_spot_max_price: ``float``
"""
+
+ try:
+ instance_type = size.id
+ except AttributeError:
+ instance_type = size
+
params = {
"Action": "RunInstances",
"ImageId": image.id,
"MinCount": str(ex_mincount),
"MaxCount": str(ex_maxcount),
- "InstanceType": size.id,
+ "InstanceType": instance_type,
}
if ex_terminate_on_shutdown: