class Fog::Identity::Proxmox::Pools

class Pools Collection of pools of VMs

Public Instance Methods

all(_options = {}) click to toggle source
# File lib/fog/identity/proxmox/models/pools.rb, line 29
def all(_options = {})
  load_response(service.list_pools, 'pools')
end
destroy(id) click to toggle source
# File lib/fog/identity/proxmox/models/pools.rb, line 42
def destroy(id)
  pool = find_by_id(id)
  pool.destroy
end
find_by_id(id) click to toggle source
# File lib/fog/identity/proxmox/models/pools.rb, line 33
def find_by_id(id)
  cached_pool = find { |pool| pool.poolid == id }
  return cached_pool if cached_pool
  pool_hash = service.get_pool(id)
  Fog::Identity::Proxmox::Pool.new(
    pool_hash.merge(service: service)
  )
end