Commit Graph

12 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
yong sheng gong 1f41f29f0b Add MKS console support
Co-Authored-By: jinke <jin.ke@99cloud.net>
Co-Authored-By: yong sheng gong <gong.yongsheng@99cloud.net>

Change-Id: Id8ee4a28a09eb3d7f7598c507c0a4320a97cd01c
implements: bp support-mks-console-type
2017-11-29 21:06:38 -05:00
Akihiro Motoki af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
Cady_Chen 51fe944449 Replace six.iteritems(iter) with iter.items()
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
2016-12-14 11:13:20 +08:00
Masco Kaliyamoorthy 4e8549ee9a Replace SortedDict with OrderedDict
From django V1.9 django.utils.datastructures.SortedDict
will be removed and it is deprecated in V1.7.

The similar functionality is added in collections.OrderedDict
from python 2.7.

Horizon code also should avoid the SortedDict class and
start using the OrderedDict class.

This patch replacing the SortedDict with OrderedDict.

Change-Id: I8dfcf7c29fc49b6215451f160cf7a951bf11b5ad
Closes-Bug: #1492270
2015-09-04 18:39:15 +00:00
Victor Stinner 070bde3e21 Replace dict.iteritems() with six.iteritems(dict)
The iteritems() method of Python 2 dictionaries was renamed to items()
on Python 3. The overhead of creating a temporary list for items() on
Python 2 is negligible.

Replace also dict.itervalues() with six.itervalues(dict) in
horizon/test/utils.py.

Partial-Implements: blueprint porting-python3
Change-Id: Ib2d62236be2620c4626099ce80e6c8a9397a4533
2015-07-24 12:20:56 +02:00
Randy Bertram 6ab60fde7f Serial Console
Adds support for serial console, in addition to VNC,
SPICE, and RDP.

Depends on term.js being added to OpenStack global
requirements: https://review.openstack.org/#/c/145825

To try this patch:
1. In `nova.conf`:
     [serial_console]
     enable=True
     base_url =
       ws://<location-of-serial-console-proxy>:6083/
2. Set CONSOLE_TYPE = "SERIAL" in local_settings.py.
3. You may need to start nova-serialproxy.
4. You may need to port-forward 6083.

https://review.openstack.org/#/c/143615 will make the
serial console available from Network Topology,
along with other consoles.

Co-Authored-By: Richard Jones<r1chardj0n3s@gmail.com>

Implements blueprint serial-console

Change-Id: If83c4efa1a96f9d393110af27f90a0808a23e641
2015-02-19 04:49:11 +00:00
liyingjun a9b2f7b3cc Make auto console type in network topology work
The "open console" link in "Network Topology" does not autodetect
console type. This can be reproduced by setting CONSOLE_TYPE="AUTO" (or
ommiting the setting as AUTO is default value) while using SPICE
console.

Autodetection is correctly implemented in Instances view
(openstack_dashboard/dashboards/project/instances/console.py), but in
network topology
(openstack_dashboard/dashboards/project/network_topology/views.py in
JSONView) is only simple check, that ignore "RDP" and "AUTO".

Refactor get_console method, to return a tuple of console type and
console url, so other places can also use the method.

Change-Id: I064db5f1e5d363c9e6736703b66e78ad4e3de4d0
Closes-bug: #1403922
2015-02-12 10:51:38 -05:00
Radomir Dopieralski 0eca7449cc Fix Flake8 style warnings in openstack_dashboard/
Warnings H904, H307 and H405 are new or considerably changed, and will
be fixed in a separate patch.

Closes-bug: #1349820
Partial-bug: #1347472

Change-Id: I4fd28990dacf16f03a4eaa6074ef59c37f1a2c14
2014-07-30 14:13:24 +02:00
Matthias Runge 322004f848 adapt to python-novaclient-2.18.0
Novaclient renamed HTTPNotImplemented to HttpNotImplemented
and changed the attribute code to status in exceptions

This change should make the code work on newer and older versions.

Change-Id: Ifef6c4c1b2924b03df00f427cfe3e6a7f415e569
Closes-Bug: #1340596
2014-07-11 14:04:09 +02:00
David Lapsley 5955f52c6b Exception traces in the test output
Console type "FAKE" not supported.

A unit test calls get_console() with a "FAKE" console type. The get_console()
call is logging both the key error and exception generated. Looking at the
get_console code, it doesn't seem necessary to log these exceptions at such a
high level at this point in the code.

Change-Id: Ibb96a4a483b71b5d4b8542b38f4e261ad50ea6d3
Closes-Bug: #1322262
2014-06-18 08:33:05 -07:00
Leandro I. Costantino ded54e6f5d Refactor code around Console support
Add a console module to handle the different kinds on remote consoles
supported (vnc, rdp, spice ) and refactor the code
to use console.get_console.

In the future, a matrix based on HyperVisor could be added
in case that only one type of console is supported.
Ex: HyperV <=> RDP

Change-Id: If448b7c9d953765b9b56ee14b39975d951ffd92c
Implements: blueprint refactor-console-support
Closes-Bug: #1287881
2014-05-20 03:00:28 +00:00