class Fog::Proxmox::Storage::Real

Real class

class Real upload_iso request

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method Fog::Proxmox::Core::new
# File lib/fog/proxmox/storage.rb, line 57
def initialize(options = {})
  if options.respond_to?(:config_service?) && options.config_service?
    configure(options)
  else
    super
  end
end
not_found_class() click to toggle source
# File lib/fog/proxmox/storage.rb, line 65
def self.not_found_class
  Fog::Proxmox::Storage::NotFound
end

Public Instance Methods

config() click to toggle source
# File lib/fog/proxmox/storage.rb, line 69
def config
  self
end
config_service?() click to toggle source
# File lib/fog/proxmox/storage.rb, line 73
def config_service?
  true
end
upload_iso(path_params, body_params) click to toggle source
# 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

Private Instance Methods

configure(source) click to toggle source
# File lib/fog/proxmox/storage.rb, line 79
def configure(source)
  source.instance_variables.each do |v|
    instance_variable_set(v, source.instance_variable_get(v))
  end
end