Commit Graph

10 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Rikimaru Honjo f9e0f8a976 Allow to evacuate without specifying a target host
When the evacuate is run without specifying a target host, horizon
sets an empty string for target host. But the evacuate api doesn't
allow an empty string. As a result, nova returns "HTTP 400 Bad
request".

So this patch sets None as the target host when it isn't specified.

Change-Id: Ia865a6c02e206fa49efc3095e8d3488f5638d0e3
Closes-Bug: 1793694
2020-01-17 08:47:00 +00:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
zhurong 4c81bc2993 Make evacuate target_host not required
Nova api can auto select target_host to evacuate,
So we should make target_host required=False.

Change-Id: Iff649b0b27a859fa85a985dfd2575e192806c291
Closes-Bug: #1652494
2017-01-04 09:26:01 +00:00
Diana Whitten d0ddd223cb Horizon selects are now themable: Admin Panels
Horizon was using a standard select input. Unfortunately
this type of input is only customizable to a small extent.

Co-Authored-By: Matthew Wood <woodm1979@gmail.com>
Co-Authored-By: Brian Tully <brian.tully@hp.com>

Change-Id: Id86abbf5e8f0fd9b4a7bab05f5b56e6d0d82b778
Partially-implements: blueprint horizon-theme-css-reorg
2016-06-13 20:55:03 +00:00
Bartosz Fic 2a7860b416 Migrate all instances from host marked for maintenance
This patch adds migrate capability to Horizon for host
already marked for maintenance.

All instances could be cold migrated.
There is an option also for running instance to allow
making live migration to them.
All running instances will be migrated as the same
migrating configuration, if the administrator wants to
migrate a specific instance in a specific configuration he
could do it from the instance dashboard.

blueprint migrate-all-instances-from-hosts-in-maintenance-mode

Change-Id: Ia1260831e79ede66a9d4320b092bebeb023796bc
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
2015-02-20 22:27:09 +01:00
liyingjun e81f42c9d4 Support nova service-disable/enable for Hypervisor
To prevent further scheduling of instance launch on a compute we
need to run:

* nova service-disable --reason REASON NODENAME nova-compute

It would be helpful if we can send this through the hypervisors menu.
New Actions: 'Disable Service' and 'Enable Service' will be added to
Admin -> Hypervisors -> Compute Host action menu to disable/enable
service. So this is a small but useful addition to horizon.

Implement blueprint: service-disable-enable

Change-Id: Ic58d6a6410ec640aecd808ef3e586026e562ac6a
2014-11-19 07:31:25 +08:00
Akihiro Motoki 393642fd02 Fix E128 errors in openstack_dashboard/dashboards/admin/
E128 continuation line under-indented for visual indent

Partial-Bug: #1375929
Change-Id: I7a258d624f35b602da07c9b8604fb26c63287824
2014-10-15 13:50:07 +09:00
Juan Manuel Olle a286e558c6 Need ability to evacuate host in syspanel
Implement host evacuate in the hypervisors panel.
An extra tab was added to show in the first one hypervisors
and on the second one compute host. on each compute host
that is down an evacuate host button was added.
If the user press the button a modal windows is shown to
request the needed data to perform the evacuation.

blueprint evacuate-host

Co-Authored-By: Leandro Costantino <leandro.i.costantino@intel.com>
Co-Authored-By: David Lyle <david.lyle@hp.com>

Change-Id: I57a16f99fddd84c287429085c7e90beb59a17aa3
2014-09-02 21:34:13 -06:00