d6ce3c5cb9
- update to 2.8.0 * Distribution now includes py.typed file which signals mypy that this package contains type annotations * Fix get_driver() bug / regression not working if the provider argument was a string and not a Provider ENUM. OBS-URL: https://build.opensuse.org/request/show/765058 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apache-libcloud?expand=0&rev=92
25 lines
879 B
Diff
25 lines
879 B
Diff
Index: apache-libcloud-2.8.0/libcloud/compute/drivers/ec2.py
|
|
===================================================================
|
|
--- apache-libcloud-2.8.0.orig/libcloud/compute/drivers/ec2.py
|
|
+++ apache-libcloud-2.8.0/libcloud/compute/drivers/ec2.py
|
|
@@ -1892,12 +1892,18 @@ class BaseEC2NodeDriver(NodeDriver):
|
|
for system shutdown.
|
|
:type ex_terminate_on_shutdown: ``bool``
|
|
"""
|
|
+
|
|
+ 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:
|