Skip to content

Commit f69e998

Browse files
committed
Support create_term and get_vnc API for Node itself
1 parent 756d123 commit f69e998

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/fog/proxmox/compute/requests/create_term.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def create_term(path_params, body_params)
2626
node = path_params[:node]
2727
type = path_params[:type]
2828
vmid = path_params[:vmid]
29+
path = type && vmid ? "nodes/#{node}/#{type}/#{vmid}/termproxy" : "nodes/#{node}/termproxy"
2930
request(
3031
expects: [200],
3132
method: 'POST',
32-
path: "nodes/#{node}/#{type}/#{vmid}/termproxy",
33+
path: path,
3334
body: URI.encode_www_form(body_params)
3435
)
3536
end

lib/fog/proxmox/compute/requests/get_vnc.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def get_vnc(path_params, query_params)
2626
node = path_params[:node]
2727
type = path_params[:type]
2828
vmid = path_params[:vmid]
29+
path = type && vmid ? "nodes/#{node}/#{type}/#{vmid}/vncwebsocket" : "nodes/#{node}/vncwebsocket"
2930
request(
3031
expects: [101, 200],
3132
method: 'GET',
32-
path: "nodes/#{node}/#{type}/#{vmid}/vncwebsocket",
33+
path: path,
3334
query: URI.encode_www_form(query_params)
3435
)
3536
end

0 commit comments

Comments
 (0)