Merge "Remove volume source option on some dialogs"

This commit is contained in:
Jenkins 2014-03-14 14:33:07 +00:00 committed by Gerrit Code Review
commit 8feabb405f

View File

@ -110,6 +110,7 @@ class CreateForm(forms.SelfHandlingForm):
'to or greater than the snapshot size (%sGB)') \
% snapshot.size
del self.fields['image_source']
del self.fields['volume_source']
del self.fields['volume_source_type']
del self.fields['availability_zone']
except Exception:
@ -139,6 +140,7 @@ class CreateForm(forms.SelfHandlingForm):
self.fields['size'].help_text = size_help_text
self.fields['image_source'].choices = ((image.id, image),)
del self.fields['snapshot_source']
del self.fields['volume_source']
del self.fields['volume_source_type']
except Exception:
msg = _('Unable to load the specified image. %s')