1 Internal patch to only enable the current supported boot source option (Boot |
1 Internal patch to only enable the current supported boot source option (Boot |
2 from Image). This patch will not be committed upstream. |
2 from Image). This patch will not be committed upstream. |
3 |
3 |
4 --- horizon-2015.1.2/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py.orig 2016-04-12 07:19:45.259440809 -0700 |
4 --- horizon-9.0.0.0rc1/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py.~1~ 2016-03-30 02:39:18.483954433 -0700 |
5 +++ horizon-2015.1.2/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py 2016-04-12 07:22:38.755245076 -0700 |
5 +++ horizon-9.0.0.0rc1/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py 2016-03-30 02:41:14.550222691 -0700 |
6 @@ -153,25 +153,9 @@ class SetInstanceDetailsAction(workflows |
6 @@ -154,25 +154,9 @@ class SetInstanceDetailsAction(workflows |
7 source_type_choices = [ |
7 source_type_choices = [ |
8 ('', _("Select source")), |
8 ('', _("Select source")), |
9 ("image_id", _("Boot from image")), |
9 ("image_id", _("Boot from image")), |
10 - ("instance_snapshot_id", _("Boot from snapshot")), |
10 - ("instance_snapshot_id", _("Boot from snapshot")), |
11 ] |
11 ] |
12 - if base.is_service_enabled(request, 'volume'): |
12 - if cinder.is_volume_service_enabled(request): |
13 - source_type_choices.append(("volume_id", _("Boot from volume"))) |
13 - source_type_choices.append(("volume_id", _("Boot from volume"))) |
14 - |
14 - |
15 - try: |
15 - try: |
16 - if api.nova.extension_supported("BlockDeviceMappingV2Boot", |
16 - if api.nova.extension_supported("BlockDeviceMappingV2Boot", |
17 - request): |
17 - request): |
25 - source_type_choices.append( |
25 - source_type_choices.append( |
26 - ("volume_snapshot_id", |
26 - ("volume_snapshot_id", |
27 - _("Boot from volume snapshot (creates a new volume)"))) |
27 - _("Boot from volume snapshot (creates a new volume)"))) |
28 self.fields['source_type'].choices = source_type_choices |
28 self.fields['source_type'].choices = source_type_choices |
29 + self.fields['source_type'].initial = source_type_choices[1][0] |
29 + self.fields['source_type'].initial = source_type_choices[1][0] |
30 |
30 |
31 @memoized.memoized_method |
31 @memoized.memoized_method |
32 def _get_flavor(self, flavor_id): |
32 def _get_flavor(self, flavor_id): |