Преглед изворни кода

Set a default on BlockDeviceMapping delete flag

Enis Afgan пре 8 година
родитељ
комит
6fb27a8818
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      cloudbridge/cloud/providers/aws/services.py

+ 2 - 1
cloudbridge/cloud/providers/aws/services.py

@@ -523,7 +523,8 @@ class AWSInstanceService(BaseInstanceService):
                         raise InvalidConfigurationException(
                             "The source is none and the destination is a"
                             " volume. Therefore, you must specify a size.")
-                ebs_def['DeleteOnTermination'] = device.delete_on_terminate
+                ebs_def['DeleteOnTermination'] = device.delete_on_terminate \
+                    or True
                 if device.size:
                     ebs_def['VolumeSize'] = device.size
                 if ebs_def: