Browse Source

Deprecate Django launch instance form

As discussed in the horizon meeting, we think that feature gaps
between the two implementations have been closed. Let's mark
the Django version as deprecated and gather more attentions
from operators.

Change-Id: I55379c0897bad46decfabb443afe9439a31a3164
changes/25/779125/2
Akihiro Motoki 5 months ago
parent
commit
57380fae71
  1. 5
      doc/source/configuration/settings.rst
  2. 8
      openstack_dashboard/dashboards/project/instances/views.py
  3. 13
      openstack_dashboard/management/commands/upgrade_check.py
  4. 11
      releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml

5
doc/source/configuration/settings.rst

@ -2233,6 +2233,11 @@ LAUNCH_INSTANCE_LEGACY_ENABLED
The default value for this setting has been changed to ``False``
.. deprecated:: 19.1.0(Wallaby)
The Python Launch Instance workflow is deprecated.
Consider switching to the AngujarJS workflow instead.
Default: ``False``
This setting enables the Python Launch Instance workflow.

8
openstack_dashboard/dashboards/project/instances/views.py

@ -263,6 +263,14 @@ def _swap_filter(resources, search_opts, fake_field, real_field):
class LaunchInstanceView(workflows.WorkflowView):
workflow_class = project_workflows.LaunchInstance
def __init__(self):
super().__init__()
LOG.warning('Django version of the launch instance form is '
'deprecated since Wallaby release. Switch to '
'the AngularJS version of the form by setting '
'LAUNCH_INSTANCE_NG_ENABLED to True and '
'LAUNCH_INSTANCE_LEGACY_ENABLED to False.')
def get_initial(self):
initial = super().get_initial()
initial['project_id'] = self.request.user.tenant_id

13
openstack_dashboard/management/commands/upgrade_check.py

@ -299,6 +299,19 @@ def check_chinese_locale_rename(dummy):
return upgradecheck.Result(upgradecheck.Code.SUCCESS)
@register_check(_("Django launch instance form"))
def check_django_launch_instance_form(dummy):
if settings.LAUNCH_INSTANCE_LEGACY_ENABLED:
return upgradecheck.Result(
upgradecheck.Code.WARNING,
_("The Django version of the launch instance form is deprecated "
"since Wallaby release. Switch to the AngularJS version of the "
"form by setting LAUNCH_INSTANCE_NG_ENABLED to True and "
"LAUNCH_INSTANCE_LEGACY_ENABLED to False.")
)
return upgradecheck.Result(upgradecheck.Code.SUCCESS)
class UpgradeCheckTable(upgradecheck.UpgradeCommands):
_upgrade_checks = CHECKS

11
releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml

@ -0,0 +1,11 @@
---
deprecations:
- |
The Django version of the launch instance form is deprecated now.
Switch to the AngularJS version of the form by setting
``LAUNCH_INSTANCE_NG_ENABLED`` to ``True`` and
``LAUNCH_INSTANCE_LEGACY_ENABLED`` to ``False``.
The horizon team believes that feature gaps between Django and
AngularJS implementations have been closed and we can drop the
Django version. If you see any feature gap, please file a bug to
horizon or contact the horizon team.
Loading…
Cancel
Save