Class: Fog::Compute::Proxmox::Node

Inherits:
Proxmox::Model show all
Defined in:
lib/fog/compute/proxmox/models/node.rb

Overview

class Node model of VMs

Instance Method Summary collapse

Methods inherited from Proxmox::Model

#create, #destroy, #initialize, #inspect, #update

Constructor Details

This class inherits a constructor from Fog::Proxmox::Model

Instance Method Details

#backup(options = {}) ⇒ Object


86
87
88
89
# File 'lib/fog/compute/proxmox/models/node.rb', line 86

def backup(options = {})
  task_upid = service.backup({ node: node }, options)
  task_upid
end

#containersObject


72
73
74
75
76
77
# File 'lib/fog/compute/proxmox/models/node.rb', line 72

def containers
  @containers ||= begin
    Fog::Compute::Proxmox::Containers.new(service: service,
                                          node: self)
  end
end

#serversObject


65
66
67
68
69
70
# File 'lib/fog/compute/proxmox/models/node.rb', line 65

def servers
  @servers ||= begin
    Fog::Compute::Proxmox::Servers.new(service: service,
                                       node: self)
  end
end

#statistics(output = 'rrddata', options = { timeframe: 'hour', cf: 'AVERAGE'}) ⇒ Object


91
92
93
94
95
# File 'lib/fog/compute/proxmox/models/node.rb', line 91

def statistics(output = 'rrddata', options = { timeframe: 'hour', cf: 'AVERAGE'})
  path_params = { node: node, output: output }
  query_params = options
  service.get_node_statistics(path_params,query_params)
end

#storagesObject


79
80
81
82
83
84
# File 'lib/fog/compute/proxmox/models/node.rb', line 79

def storages
  @storages ||= begin
    Fog::Compute::Proxmox::Storages.new(service: service,
                                        node: self)
  end
end

#tasksObject


58
59
60
61
62
63
# File 'lib/fog/compute/proxmox/models/node.rb', line 58

def tasks
  @tasks ||= begin
    Fog::Compute::Proxmox::Tasks.new(service: service,
                                     node: self)
  end
end

#to_sObject


54
55
56
# File 'lib/fog/compute/proxmox/models/node.rb', line 54

def to_s
  node
end