class Fog::Proxmox::Compute::Volumes
class Volumes
Collection of volumes
Public Instance Methods
all(filters = {})
click to toggle source
# File lib/fog/proxmox/compute/models/volumes.rb, line 35 def all(filters = {}) load service.list_volumes(node_id, storage_id, filters) end
destroy(id)
click to toggle source
# File lib/fog/proxmox/compute/models/volumes.rb, line 51 def destroy(id) volume = get(id) volume.destroy end
get(id)
click to toggle source
# File lib/fog/proxmox/compute/models/volumes.rb, line 47 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/proxmox/compute/models/volumes.rb, line 39 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/proxmox/compute/models/volumes.rb, line 43 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/proxmox/compute/models/volumes.rb, line 31 def new(new_attributes = {}) super({ node_id: node_id, storage_id: storage_id }.merge(new_attributes)) end