class Fog::Network::Proxmox::Networks

class Networks Collection of nodes of cluster

Public Instance Methods

all(options = {}) click to toggle source
# File lib/fog/network/proxmox/models/networks.rb, line 35
def all(options = {})
  requires :node
  path_params = { node: node }
  query_params = options
  load_response(service.list_networks(path_params, query_params), 'networks')
end
find_by_id(id) click to toggle source
# File lib/fog/network/proxmox/models/networks.rb, line 42
def find_by_id(id)
  cached_network = find { |network| network.iface == id }
  return cached_network if cached_network
  network_hash = service.get_network(id)
  Fog::Network::Proxmox::Network.new(
    network_hash.merge(service: service, node: node, iface: id)
  )
end
new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/network/proxmox/models/networks.rb, line 30
def new(attributes = {})
  requires :node
  super({ node: node }.merge(attributes))
end