File ec2_create_node.patch of Package python-apache-libcloud.openSUSE_Leap_15.1_Update

Index: apache-libcloud-2.8.3/libcloud/compute/drivers/ec2.py
===================================================================
--- apache-libcloud-2.8.3.orig/libcloud/compute/drivers/ec2.py
+++ apache-libcloud-2.8.3/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:
openSUSE Build Service is sponsored by