Class: Fog::Compute::Proxmox::Interfaces

Inherits:
Proxmox::Collection show all
Defined in:
lib/fog/compute/proxmox/models/interfaces.rb

Overview

class Interfaces Collection of nodes of cluster

Instance Attribute Summary

Attributes inherited from Proxmox::Collection

#response

Instance Method Summary collapse

Methods inherited from Proxmox::Collection

#clear_ignored_attributes, #create, #destroy, #find_by_id, #load_response, #not_implemented, #read, #summary

Instance Method Details

#all(_options = {}) ⇒ Object


31
32
33
# File 'lib/fog/compute/proxmox/models/interfaces.rb', line 31

def all(_options = {})
  self
end

#get(id) ⇒ Object


35
36
37
38
# File 'lib/fog/compute/proxmox/models/interfaces.rb', line 35

def get(id)
  cached_interface = find { |interface| interface.id == id }
  return cached_interface if cached_interface
end

#next_nicidObject


40
41
42
# File 'lib/fog/compute/proxmox/models/interfaces.rb', line 40

def next_nicid
  Fog::Proxmox::ControllerHelper.last_index(Fog::Compute::Proxmox::Interface::NAME, self) + 1
end