File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ class Storage < Fog::Service
3131 request_path 'fog/proxmox/storage/requests'
3232
3333 request :upload
34+ request :list_appliances
35+ request :download_appliance
3436
3537 # Mock class
3638 class Mock
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ module Fog
4+ module Proxmox
5+ class Storage
6+ # class Real download_appliance
7+ class Real
8+ def download_appliance ( path_params , body_params )
9+ node = path_params [ :node ]
10+ request (
11+ expects : [ 200 ] ,
12+ method : 'POST' ,
13+ path : "nodes/#{ node } /aplinfo" ,
14+ body : URI . encode_www_form ( body_params )
15+ )
16+ end
17+ end
18+
19+ # class Mock download_appliance
20+ class Mock
21+ end
22+ end
23+ end
24+ end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ module Fog
4+ module Proxmox
5+ class Storage
6+ # class Real list_appliances
7+ class Real
8+ def list_appliances ( options )
9+ node = options [ :node ]
10+ request (
11+ expects : [ 200 ] ,
12+ method : 'GET' ,
13+ path : "nodes/#{ node } /aplinfo"
14+ )
15+ end
16+ end
17+
18+ # class Mock list_appliances
19+ class Mock
20+ end
21+ end
22+ end
23+ end
You can’t perform that action at this time.
0 commit comments