class Fog::Compute::Proxmox::Volumes

class Volumes Collection of volumes

Public Instance Methods

all(filters = {}) click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 34
def all(filters = {})
  load service.list_volumes(node_id, storage_id, filters)
end
destroy(id) click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 50
def destroy(id)
  volume = get(id)
  volume.destroy
end
get(id) click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 46
def get(id)
  new service.get_volume(node: node_id, storage: storage_id, volume: id)
end
list_by_content_type(content) click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 38
def list_by_content_type(content)
  all.select { |volume| volume.content.include? content}
end
list_by_content_type_and_by_server(content, vmid) click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 42
def list_by_content_type_and_by_server(content, vmid)
  all(vmid: vmid)
end
new(new_attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/compute/proxmox/models/volumes.rb, line 30
def new(new_attributes = {})
  super({ node_id: node_id, storage_id: storage_id }.merge(new_attributes))
end