File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
lib/fog/proxmox/compute/requests Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,15 @@ def create_term(path_params, body_params)
26
26
node = path_params [ :node ]
27
27
type = path_params [ :type ]
28
28
vmid = path_params [ :vmid ]
29
+ if type . nil? && vmid . nil?
30
+ path = "nodes/#{ node } /termproxy"
31
+ else
32
+ path = "nodes/#{ node } /#{ type } /#{ vmid } /termproxy"
33
+ end
29
34
request (
30
35
expects : [ 200 ] ,
31
36
method : 'POST' ,
32
- path : "nodes/ #{ node } / #{ type } / #{ vmid } /termproxy" ,
37
+ path : path ,
33
38
body : URI . encode_www_form ( body_params )
34
39
)
35
40
end
Original file line number Diff line number Diff line change @@ -26,10 +26,15 @@ def get_vnc(path_params, query_params)
26
26
node = path_params [ :node ]
27
27
type = path_params [ :type ]
28
28
vmid = path_params [ :vmid ]
29
+ if type . nil? && vmid . nil?
30
+ path = "nodes/#{ node } /vncwebsocket"
31
+ else
32
+ path = "nodes/#{ node } /#{ type } /#{ vmid } /vncwebsocket"
33
+ end
29
34
request (
30
35
expects : [ 101 , 200 ] ,
31
36
method : 'GET' ,
32
- path : "nodes/ #{ node } / #{ type } / #{ vmid } /vncwebsocket" ,
37
+ path : path ,
33
38
query : URI . encode_www_form ( query_params )
34
39
)
35
40
end
You can’t perform that action at this time.
0 commit comments