components/openstack/horizon/patches/05-disable-unsupported-bootsource.patch
author Laszlo Peter <laszlo.peter@oracle.com>
Wed, 07 Sep 2016 14:48:42 -0700
changeset 6856 356aeea98c39
parent 5800 65c7ff58de8e
permissions -rw-r--r--
24465729 Update Horizon for the Mitaka release 22955127 Error:Unauthorized when admin removed as project member of service project 22997164 xstatic package version numbers must match TPNO version

Internal patch to only enable the current supported boot source option (Boot
from Image).  This patch will not be committed upstream.

--- horizon-9.0.0.0rc1/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py.~1~	2016-03-30 02:39:18.483954433 -0700
+++ horizon-9.0.0.0rc1/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py	2016-03-30 02:41:14.550222691 -0700
@@ -154,25 +154,9 @@ class SetInstanceDetailsAction(workflows
         source_type_choices = [
             ('', _("Select source")),
             ("image_id", _("Boot from image")),
-            ("instance_snapshot_id", _("Boot from snapshot")),
         ]
-        if cinder.is_volume_service_enabled(request):
-            source_type_choices.append(("volume_id", _("Boot from volume")))
-
-            try:
-                if api.nova.extension_supported("BlockDeviceMappingV2Boot",
-                                                request):
-                    source_type_choices.append(
-                        ("volume_image_id",
-                         _("Boot from image (creates a new volume)")))
-            except Exception:
-                exceptions.handle(request, _('Unable to retrieve extensions '
-                                             'information.'))
-
-            source_type_choices.append(
-                ("volume_snapshot_id",
-                 _("Boot from volume snapshot (creates a new volume)")))
         self.fields['source_type'].choices = source_type_choices
+        self.fields['source_type'].initial = source_type_choices[1][0]

     @memoized.memoized_method
     def _get_flavor(self, flavor_id):