-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
list_appliances
and download_appliance
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module Fog | ||
module Proxmox | ||
class Storage | ||
# class Real download_appliance | ||
class Real | ||
def download_appliance(path_params, body_params) | ||
node = path_params[:node] | ||
request( | ||
expects: [200], | ||
method: 'POST', | ||
path: "nodes/#{node}/aplinfo", | ||
body: URI.encode_www_form(body_params) | ||
) | ||
end | ||
end | ||
|
||
# class Mock download_appliance | ||
class Mock | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module Fog | ||
module Proxmox | ||
class Storage | ||
# class Real list_appliances | ||
class Real | ||
def list_appliances(options) | ||
node = options[:node] | ||
request( | ||
expects: [200], | ||
method: 'GET', | ||
path: "nodes/#{node}/aplinfo" | ||
) | ||
end | ||
end | ||
|
||
# class Mock list_appliances | ||
class Mock | ||
end | ||
end | ||
end | ||
end |