diff options
author | Zuul <zuul@review.opendev.org> | 2022-02-02 11:33:50 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-02-02 11:33:50 +0000 |
commit | 664d40a748c73be4fcbdcfd04c0339ed0b0988ff (patch) | |
tree | 6096bb75480b82fad08fc56e3cdb7debaa04e6c4 /openstack_dashboard | |
parent | e34e0ea73f638b1e4f5af56e2c429bf16b6468bb (diff) | |
parent | b430d5aa438babc0779cd732ab8d2fa9f097be2a (diff) | |
download | horizon-664d40a748c73be4fcbdcfd04c0339ed0b0988ff.tar.gz |
Merge "Follow-up: Drop Django based implementation of launch instance"
Diffstat (limited to 'openstack_dashboard')
7 files changed, 3 insertions, 91 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_advanced_help.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_advanced_help.html deleted file mode 100644 index 0b43a16c2..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_advanced_help.html +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -<p>{% blocktrans %}Specify advanced options to use when launching an instance.{% endblocktrans %}</p> diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_details_help.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_details_help.html deleted file mode 100644 index b05b017fc..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_details_help.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends 'project/instances/_flavors_and_quotas.html' %} -{% load i18n %} - -{% block help_message %} -<p>{% blocktrans %}Specify the details for launching an instance.{% endblocktrans %}</p> -<p>{% blocktrans %}The chart below shows the resources used by this project in relation to the project's quotas.{% endblocktrans %}</p> -{% endblock %} diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_help.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_help.html deleted file mode 100644 index 5860a43f3..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_help.html +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n horizon %} - -<p>{% blocktrans %}Choose network from Available networks to Selected networks by push button or drag and drop, you may change NIC order by drag and drop as well. {% endblocktrans %}</p> diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_ports_help.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_ports_help.html deleted file mode 100644 index 7f91c2054..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_network_ports_help.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load i18n %} - -{% block help_message %} -<p>{% blocktrans %}A port is a connection point for attaching a single device, such as the NIC of a virtual server, to a virtual network.{% endblocktrans %}</p> -<p>{% blocktrans %}The port also describes the associated network configuration, such as the MAC and IP addresses to be used on that port.{% endblocktrans %}</p> -<p>{% blocktrans %}Ports are optional and can be used with networks to add extra IP addresses to your instances or select specific types of ports.{% endblocktrans %}</p> -{% endblock %} diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_volumes_help.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_volumes_help.html deleted file mode 100644 index 26f4429cb..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_launch_volumes_help.html +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n horizon %} - -<p>{% blocktrans %}An instance can be launched with varying types of attached storage. You may select from those options here.{% endblocktrans %}</p> diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_update_networks.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_update_networks.html deleted file mode 100644 index cf84caf39..000000000 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_update_networks.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} - -<noscript><h3>{{ step }}</h3></noscript> -<div id="networkListSortContainer" class="sort-container"> - <div class="col-sm-6"> - <label id="selected_network_label">{% trans "Selected networks" %}</label> - <ul id="selected_network" class="networklist box-list"></ul> - <label>{% trans "Available networks" %}</label> - <ul id="available_network" class="networklist box-list"></ul> - </div> - <div class="col-sm-6"> - {% include "project/instances/_launch_network_help.html" %} - </div> -</div> - -<div id="networkListIdContainer"> - <div class="actions"> - <div id="networkListId"> - {% include "horizon/common/_form_fields.html" %} - </div> - </div> - <div class="help_text"> - {{ step.get_help_text }} - </div> -</div> - - -<script> - if (typeof $ !== 'undefined') { - horizon.instances.workflow_init($(".workflow")); - } else { - addHorizonLoadEvent(function() { - horizon.instances.workflow_init($(".workflow")); - }); - } -</script> diff --git a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py index 00d25938f..fd9bf7adc 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py @@ -32,46 +32,16 @@ class SetAdvancedAction(workflows.Action): label=_("Disk Partition"), required=False, help_text=_("Automatic: The entire disk is a single partition and " "automatically resizes. Manual: Results in faster build " - "times but requires manual partitioning.")) - config_drive = forms.BooleanField( - label=_("Configuration Drive"), - required=False, help_text=_("Configure OpenStack to write metadata to " - "a special configuration drive that " - "attaches to the instance when it boots.")) - - def __init__(self, request, context, *args, **kwargs): - super().__init__(request, context, *args, **kwargs) - try: - config_choices = [("AUTO", _("Automatic")), - ("MANUAL", _("Manual"))] - self.fields['disk_config'].choices = config_choices - - # Only show the Config Drive option for the Launch Instance - # is supported. - if context.get('workflow_slug') != 'launch_instance': - del self.fields['config_drive'] - - except Exception: - exceptions.handle(request, _('Unable to retrieve extensions ' - 'information.')) + "times but requires manual partitioning."), + choices=[("AUTO", _("Automatic")), ("MANUAL", _("Manual"))]) class Meta(object): name = _("Advanced Options") - help_text_template = ("project/instances/" - "_launch_advanced_help.html") class SetAdvanced(workflows.Step): action_class = SetAdvancedAction - contributes = ("disk_config", "config_drive",) - - def prepare_action_context(self, request, context): - context = super().prepare_action_context(request, context) - # Add the workflow slug to the context so that we can tell which - # workflow is being used when creating the action. This step is - # used by both the Launch Instance and Resize Instance workflows. - context['workflow_slug'] = self.workflow.slug - return context + contributes = ("disk_config",) class SetFlavorChoiceAction(workflows.Action): |