2020-03-06 08:37:32 +01:00
|
|
|
Index: apache-libcloud-2.8.1/libcloud/compute/drivers/ec2.py
|
2020-01-16 20:25:37 +01:00
|
|
|
===================================================================
|
2020-03-06 08:37:32 +01:00
|
|
|
--- apache-libcloud-2.8.1.orig/libcloud/compute/drivers/ec2.py
|
|
|
|
+++ apache-libcloud-2.8.1/libcloud/compute/drivers/ec2.py
|
2020-01-16 20:25:37 +01:00
|
|
|
@@ -1892,12 +1892,18 @@ class BaseEC2NodeDriver(NodeDriver):
|
|
|
|
for system shutdown.
|
|
|
|
:type ex_terminate_on_shutdown: ``bool``
|
2018-09-28 22:50:48 +02:00
|
|
|
"""
|
|
|
|
+
|
|
|
|
+ try:
|
|
|
|
+ instance_type = size.id
|
|
|
|
+ except AttributeError:
|
|
|
|
+ instance_type = size
|
|
|
|
+
|
|
|
|
params = {
|
|
|
|
'Action': 'RunInstances',
|
|
|
|
'ImageId': image.id,
|
2020-01-16 20:25:37 +01:00
|
|
|
'MinCount': str(ex_mincount),
|
|
|
|
'MaxCount': str(ex_maxcount),
|
2018-09-28 22:50:48 +02:00
|
|
|
- 'InstanceType': size.id
|
|
|
|
+ 'InstanceType': instance_type
|
|
|
|
}
|
|
|
|
|
2020-01-16 20:25:37 +01:00
|
|
|
if ex_terminate_on_shutdown:
|