libvirt: allow direct SPICE connections to qemu
This patch adds a new console type, "spice-direct", which provides
the connection information required to talk the native SPICE protocol
directly to qemu on the hypervisor. This is intended to be fronted
by a proxy which will handle authentication separately.
A new microversion is introduced which adds the type "spice-direct"
to the existing "spice" protocol.
An example request:
POST /servers/<uuid>/remote-consoles
{
"remote_console": {
"protocol": "spice",
"type": "spice-direct"
}
}
An example response:
{
"remote_console": {
"protocol": "spice",
"type": "spice-direct",
"url": "http://localhost:13200/nova?token=XXX";
}
}
This token can then be used to lookup connection details for the
console using a request like this:
GET /os-console-auth-tokens/<consoletoken>
Which returns something like this:
{
"console": {
"instance_uuid": <uuid>,
"host": <hypervisor>,
"port": <a TCP port number>,
"tls_port": <another TCP port number>,
"internal_access_path": null
}
}
APIImpact
Change-Id: I1e701cbabc0e2c435685e31465159eec09e3b1a0
This commit is contained in:
@@ -5993,8 +5993,9 @@ remote_console_protocol:
|
||||
remote_console_type:
|
||||
description: |
|
||||
The type of remote console. The valid values are ``novnc``,
|
||||
``spice-html5``, ``serial``, and ``webmks``. The type
|
||||
``webmks`` is added since Microversion ``2.8``.
|
||||
``spice-html5``, ``spice-direct``, ``serial``, and ``webmks``. The type
|
||||
``webmks`` was added in Microversion ``2.8``, and the type
|
||||
``spice-direct`` was added in Microversion ``2.99``.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
@@ -7102,6 +7103,12 @@ tenant_usages:
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
tls_port_number:
|
||||
description: |
|
||||
The port number of a port requiring a TLS connection.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
to_port:
|
||||
description: |
|
||||
The port at end of range.
|
||||
|
||||
Reference in New Issue
Block a user