Comment 30 for bug 1227575

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Hi,

To bypass the session management for spice console, we can use template-method design pattern in NovaWebSocketProxy class.
Implement "new_client" as a template method in the NovaWebSocketProxy class.
From this method, invoke create_console/remove_console method to manage sessions.
We can now create two new classes one for NoVncConsole and another for SpiceConsole in websocketproxy.py; extending NovaWebSocketProxy class and implements create_console/remove_console methods as per our need.

The advantage of using template method design pattern is new_client method will be common for NoVncConsole and SpiceConsole.

Please let me know if you have any suggestions for the same.