diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2021-03-08 12:52:53 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2021-03-09 15:55:35 +0900 |
commit | 57380fae71a6e6428da234db65228fe95656e7b4 (patch) | |
tree | 569a08118f8c702b459a7bbe9676ca188708dd88 | |
parent | 87edcb619394aebdd022683441f66536f7d3a9c0 (diff) | |
download | horizon-57380fae71a6e6428da234db65228fe95656e7b4.tar.gz |
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
4 files changed, 37 insertions, 0 deletions
diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst index 466347d44..935ba566e 100644 --- a/doc/source/configuration/settings.rst +++ b/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. diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py index 8217c540f..f767c538f 100644 --- a/openstack_dashboard/dashboards/project/instances/views.py +++ b/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 diff --git a/openstack_dashboard/management/commands/upgrade_check.py b/openstack_dashboard/management/commands/upgrade_check.py index 2f0c07a94..4b6a35ae2 100644 --- a/openstack_dashboard/management/commands/upgrade_check.py +++ b/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 diff --git a/releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml b/releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml new file mode 100644 index 000000000..b73f18d61 --- /dev/null +++ b/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. |