List/create consoles via REST api

asked 2017-03-21 07:30:10 -0500

seitan gravatar image

Hello,
I'm trying to understand the console management via OpenStack REST API. Documentation is very cheap on this. Lets say, I want to list all consoles for server:

Array
(
[url] => http://192.168.0.2:8774/v2.1/87f8c0ed08534b1da737f85d055a0912/servers/a17ac994-8311-42ab-84d0-614e1ef8f1cd/consoles
[content_type] => application/json
[http_code] => 200
[header_size] => 308
[request_size] => 346
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.028263
[namelookup_time] => 5.3E-5
[connect_time] => 0.000552
[pretransfer_time] => 0.000609
[size_upload] => 0
[size_download] => 16
[speed_download] => 566
[speed_upload] => 0
[download_content_length] => 16
[upload_content_length] => -1
[starttransfer_time] => 0.028232
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => 192.168.0.2
[certinfo] => Array
(
) ` [primary_port] => 8774` ` [local_ip] => 192.168.0.13` ` [local_port] => 51416` ` [request_header] => GET /v2.1/87f8c0ed08534b1da737f85d055a0912/servers/a17ac994-8311-42ab-84d0-614e1ef8f1cd/consoles HTTP/1.1` `Host: 192.168.0.2:8774` `Accept: */*` `X-Auth-Token: gAAAAABY0PIjJnRRH6alc8BFVY8j4xjBekjeUG58Chq-081BLZ-2ydiYw5t9vtH_7f8lzys2vECpa8moghsedatma18CCUrq6Z6Hqat1iAuccAJWKqVOOn91NRiz6ZJtHlUx_PEpIi84xhk28Trh08C09cU3kttoPP9FVpRzNwiuzBZEG7VuA0s`
)

The reply I get is empty console array:

{"consoles": []}

Though vm instance is accessible via SPICE-hml5 console. So is this normal?

Also, what does "Create Console" call do? If I post empty request to /servers/{server_id}/consoles I get no error, but i cant see any visible changes to virtual machine. Hope anyone can help me here. Thank you.

edit retag flag offensive close merge delete