nova/nova/tests/unit/console
melanie witt e4fa061f17 Move create of ComputeAPI object in websocketproxy
Currently, we create a compute.rpcapi.ComputeAPI object during
NovaProxyRequestHandler.__init__ in order to make calls to nova-compute
for console token authorizations (port validation). This is problematic
in the event that we receive a TCP RST as it results in constructing a
ComputeAPI object only to throw it away and a large number of TCP RST
sent can cause excessive resource consumption.

This moves the creation of the ComputeAPI object from __init__ to being
lazily instantiated upon first use by access of a property, thus
avoiding creation of ComputeAPI objects when we receive TCP RST
messages.

Closes-Bug: #1816727

Change-Id: I3fe5540ea460fb32767b5e681295fdaf89ce17c5
2019-03-27 21:45:52 +00:00
..
rfb Fix accumulated nits 2018-01-16 14:54:04 +00:00
securityproxy Fix accumulated nits 2018-01-16 14:54:04 +00:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_console.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_rpcapi.py conf: remove *_topic config opts 2017-07-17 21:27:02 -07:00
test_serial.py Remove invalid test methods for config option port_range 2016-06-10 22:32:25 +08:00
test_type.py Make unit tests inherit from test.NoDBTestCase 2015-03-06 09:46:31 +02:00
test_websocketproxy.py Move create of ComputeAPI object in websocketproxy 2019-03-27 21:45:52 +00:00