Handle empty UserData for instance
UserData is not required, so handle the case where it is not supplied (i.e. is None). bug 1090544 Change-Id: If8bfe9ba2aafe3bb2e9de14b01c57d1ddcf9b21d Signed-off-by: Zane Bitter <zbitter@redhat.com>
This commit is contained in:
parent
d9105f57e1
commit
a64fc0bc4b
@ -214,7 +214,7 @@ class Instance(resource.Resource):
|
|||||||
security_groups = [self.physical_resource_name_find(sg) for sg in
|
security_groups = [self.physical_resource_name_find(sg) for sg in
|
||||||
self.properties.get('SecurityGroups')]
|
self.properties.get('SecurityGroups')]
|
||||||
|
|
||||||
userdata = self.properties['UserData']
|
userdata = self.properties['UserData'] or ''
|
||||||
userdata += '\ntouch /var/lib/cloud/instance/provision-finished\n'
|
userdata += '\ntouch /var/lib/cloud/instance/provision-finished\n'
|
||||||
flavor = self.properties['InstanceType']
|
flavor = self.properties['InstanceType']
|
||||||
key_name = self.properties['KeyName']
|
key_name = self.properties['KeyName']
|
||||||
|
Loading…
Reference in New Issue
Block a user