Class: One2Influx::VirtualMachine
- Defined in:
- lib/one2influx/one_object/virtual_machine.rb
Overview
Representation of ONE virtual machine
Instance Attribute Summary
Attributes inherited from OneObject
Instance Method Summary collapse
-
#initialize(xml, client, parent_host) ⇒ VirtualMachine
constructor
A new instance of VirtualMachine.
Methods inherited from OneObject
#method_missing, #serialize_as_points
Constructor Details
#initialize(xml, client, parent_host) ⇒ VirtualMachine
Returns a new instance of VirtualMachine.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/one2influx/one_object/virtual_machine.rb', line 8 def initialize(xml, client, parent_host) # Load configuration @tag_names = $CFG.storage[:vm][:tags] @metric_names = $CFG.storage[:vm][:metrics] @custom_metric_names = $CFG.storage[:vm][:cust_metrics] # Assign tags inherited from parent host @tags = Hash.new $CFG.storage[:vm][:inh_tags].each do |name, value| @tags[name] = parent_host.[value.to_sym] end super(xml, client) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class One2Influx::OneObject