Class: Fog::Proxmox::Compute::Node
- Inherits:
-
Model
- Object
- Model
- Fog::Proxmox::Compute::Node
- Defined in:
- lib/fog/compute/proxmox/models/node.rb
Overview
class Node model of VMs
Instance Method Summary collapse
- #backup(options = {}) ⇒ Object
-
#initialize(new_attributes = {}) ⇒ Node
constructor
A new instance of Node.
- #statistics(output = 'rrddata', options = { timeframe: 'hour', cf: 'AVERAGE'}) ⇒ Object
Constructor Details
#initialize(new_attributes = {}) ⇒ Node
Returns a new instance of Node.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/fog/compute/proxmox/models/node.rb', line 52 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 |
Instance Method Details
#backup(options = {}) ⇒ Object
63 64 65 66 |
# File 'lib/fog/compute/proxmox/models/node.rb', line 63 def backup( = {}) task_upid = service.backup({ node: node }, ) task_upid end |
#statistics(output = 'rrddata', options = { timeframe: 'hour', cf: 'AVERAGE'}) ⇒ Object
68 69 70 71 72 |
# File 'lib/fog/compute/proxmox/models/node.rb', line 68 def statistics(output = 'rrddata', = { timeframe: 'hour', cf: 'AVERAGE'}) path_params = { node: node, output: output } query_params = service.get_node_statistics(path_params,query_params) end |