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)
2626 node = path_params [ :node ]
2727 type = path_params [ :type ]
2828 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
2934 request (
3035 expects : [ 200 ] ,
3136 method : 'POST' ,
32- path : "nodes/ #{ node } / #{ type } / #{ vmid } /termproxy" ,
37+ path : path ,
3338 body : URI . encode_www_form ( body_params )
3439 )
3540 end
Original file line number Diff line number Diff line change @@ -26,10 +26,15 @@ def get_vnc(path_params, query_params)
2626 node = path_params [ :node ]
2727 type = path_params [ :type ]
2828 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
2934 request (
3035 expects : [ 101 , 200 ] ,
3136 method : 'GET' ,
32- path : "nodes/ #{ node } / #{ type } / #{ vmid } /vncwebsocket" ,
37+ path : path ,
3338 query : URI . encode_www_form ( query_params )
3439 )
3540 end
You can’t perform that action at this time.
0 commit comments