Method: Fog::OpenStack::Compute::Real#remote_consoles
- Defined in:
- lib/fog/openstack/compute/requests/remote_consoles.rb
#remote_consoles(server_id, protocol, type) ⇒ Object
Get a vnc console for an instance. For microversion >= 2.6
Parameters
-
server_id <~String> - The ID of the server.
-
protocol <~String> - The protocol of remote console. The valid values are vnc, spice, rdp, serial and mks. The protocol mks is added since Microversion 2.8.
-
type <~String> - The type of remote console. The valid values are novnc, xvpvnc, rdp-html5, spice-html5, serial, and webmks. The type webmks is added since Microversion 2.8.
Returns
-
response <~Excon::Response>:
-
body <~Hash>:
-
url <~String>
-
type <~String>
-
protocol <~String>
-
-
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fog/openstack/compute/requests/remote_consoles.rb', line 20 def remote_consoles(server_id, protocol, type) if microversion_newer_than?('2.6') body = { 'remote_console' => { 'protocol' => protocol, 'type' => type } } request( :body => Fog::JSON.encode(body), :expects => 200, :method => 'POST', :path => "servers/#{server_id}/remote-consoles" ) end end |