class Fog::Compute::Proxmox::Node
class Node model of VMs
Public Class Methods
new(new_attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/proxmox/models/node.rb, line 51 def initialize(new_attributes = {}) prepare_service_value(new_attributes) Fog::Proxmox::Attributes.set_attr_and_sym('node', attributes, new_attributes) requires :node initialize_tasks initialize_servers initialize_containers initialize_storages super(new_attributes) end
Public Instance Methods
backup(options = {})
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 62 def backup(options = {}) task_upid = service.backup({ node: node }, options) task_upid end
statistics(output = 'rrddata', options = { timeframe: 'hour', cf: 'AVERAGE'})
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 67 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
Private Instance Methods
initialize_containers()
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 83 def initialize_containers attributes[:containers] = Fog::Compute::Proxmox::Servers.new(service: service, node_id: node, type: 'lxc') end
initialize_servers()
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 79 def initialize_servers attributes[:servers] = Fog::Compute::Proxmox::Servers.new(service: service, node_id: node, type: 'qemu') end
initialize_storages()
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 87 def initialize_storages attributes[:storages] = Fog::Compute::Proxmox::Storages.new(service: service, node_id: node) end
initialize_tasks()
click to toggle source
# File lib/fog/compute/proxmox/models/node.rb, line 75 def initialize_tasks attributes[:tasks] = Fog::Compute::Proxmox::Tasks.new(service: service, node_id: node) end