Class: Fog::Proxmox::Storage::Real
- Inherits:
-
Object
- Object
- Fog::Proxmox::Storage::Real
- Includes:
- Core
- Defined in:
- lib/fog/proxmox/storage.rb,
lib/fog/proxmox/storage/requests/upload_iso.rb
Overview
class Real upload_iso request
Instance Attribute Summary
Attributes included from Core
#auth_method, #current_user, #expires, #token
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
- #config_service? ⇒ Boolean
-
#initialize(options = {}) ⇒ Real
constructor
A new instance of Real.
- #upload_iso(path_params, body_params) ⇒ Object
Methods included from Core
#credentials, #reload, #setup, #user_token?
Constructor Details
#initialize(options = {}) ⇒ Real
Returns a new instance of Real.
57 58 59 60 61 62 63 |
# File 'lib/fog/proxmox/storage.rb', line 57 def initialize( = {}) if .respond_to?(:config_service?) && .config_service? configure() else super end end |
Class Method Details
.not_found_class ⇒ Object
65 66 67 |
# File 'lib/fog/proxmox/storage.rb', line 65 def self.not_found_class Fog::Proxmox::Storage::NotFound end |
Instance Method Details
#config ⇒ Object
69 70 71 |
# File 'lib/fog/proxmox/storage.rb', line 69 def config self end |
#config_service? ⇒ Boolean
73 74 75 |
# File 'lib/fog/proxmox/storage.rb', line 73 def config_service? true end |
#upload_iso(path_params, body_params) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fog/proxmox/storage/requests/upload_iso.rb', line 25 def upload_iso(path_params, body_params) node = path_params[:node] storage = path_params[:storage] upload = MultipartIsoUpload.new(body_params) request( expects: [200], method: 'POST', path: "nodes/#{node}/storage/#{storage}/upload", body: upload.body, headers: { 'Content-Type' => upload.content_type } ) end |