components/openstack/horizon/patches/09-disable-unsupported-bootsource.patch
changeset 3998 5bd484384122
parent 3997 0ca3f3d6c919
child 4002 95b8f35fcdd5
equal deleted inserted replaced
3997:0ca3f3d6c919 3998:5bd484384122
     1 Internal patch to only enable the current supported boot source (Boot from Image).
       
     2 This patch will not be committed upsteam.
       
     3 
       
     4 --- horizon-2013.2.3/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py.orig	2014-04-03 11:45:53.000000000 -0700
       
     5 +++ horizon-2013.2.3/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py	2014-07-07 14:53:44.291365109 -0700
       
     6 @@ -137,22 +137,7 @@
       
     7          source_type_choices = [
       
     8              ('', _("--- Select source ---")),
       
     9              ("image_id", _("Boot from image")),
       
    10 -            ("instance_snapshot_id", _("Boot from snapshot")),
       
    11          ]
       
    12 -        if base.is_service_enabled(request, 'volume'):
       
    13 -            source_type_choices.append(("volume_id", _("Boot from volume")))
       
    14 -
       
    15 -            try:
       
    16 -                if api.nova.extension_supported("BlockDeviceMappingV2Boot",
       
    17 -                                                request):
       
    18 -                    source_type_choices.append(("volume_image_id",
       
    19 -                            _("Boot from image (creates a new volume).")))
       
    20 -            except Exception:
       
    21 -                exceptions.handle(request, _('Unable to retrieve extensions '
       
    22 -                                            'information.'))
       
    23 -
       
    24 -            source_type_choices.append(("volume_snapshot_id",
       
    25 -                    _("Boot from volume snapshot (creates a new volume).")))
       
    26          self.fields['source_type'].choices = source_type_choices
       
    27  
       
    28      def clean(self):