class Fog::Compute::Proxmox::Volumes
class Volumes Collection of volumes
Public Instance Methods
all()
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 36 def all search end
destroy(id)
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 59 def destroy(id) volume = get(id) volume.destroy end
get(id)
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 53 def get(id) all cached_volume = find { |volume| volume.id == id } return cached_volume if cached_volume end
list_by_content_type(content)
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 45 def list_by_content_type(content) search(content: content) end
list_by_content_type_and_by_server(content, vmid)
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 49 def list_by_content_type_and_by_server(content, vmid) search(content: content, vmid: vmid) end
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/proxmox/models/volumes.rb, line 31 def new(attributes = {}) requires :node, :storage super({ node: node, storage: storage }.merge(attributes)) end
search(options = {})
click to toggle source
# File lib/fog/compute/proxmox/models/volumes.rb, line 40 def search(options = {}) requires :node, :storage load_response(service.list_volumes(node, storage, options), 'volumes') end