Class: Fog::Proxmox::Compute::Storage

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/proxmox/compute/models/storage.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(new_attributes = {}) ⇒ Storage

Returns a new instance of Storage.



49
50
51
52
53
54
55
56
# File 'lib/fog/proxmox/compute/models/storage.rb', line 49

def initialize(new_attributes = {})
  prepare_service_value(new_attributes)
  Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
  Fog::Proxmox::Attributes.set_attr_and_sym('storage', attributes, new_attributes)
  requires :node_id, :storage
  initialize_volumes
  super(new_attributes)
end

Instance Method Details

#upload_iso(path) ⇒ Object



58
59
60
# File 'lib/fog/proxmox/compute/models/storage.rb', line 58

def upload_iso(path)
  Fog::Proxmox::Storage::IsoUpload.new(service: service, node_id: node_id, storage_id: identity, path: path).upload
end