Class: One2Influx::Cluster

Inherits:
OneObject show all
Defined in:
lib/one2influx/one_object/cluster.rb

Overview

Representation of ONE cluster

Instance Attribute Summary

Attributes inherited from OneObject

#doc, #metrics, #tags

Instance Method Summary collapse

Methods inherited from OneObject

#method_missing, #serialize_as_points

Constructor Details

#initialize(xml, client, oo_hosts) ⇒ Cluster

Returns a new instance of Cluster.

Parameters:

  • xml (string)

    representation of cluster

  • client (OpenNebula::Client)

    connection link to ONE API

  • oo_hosts (hash)

    hash in form => OneObject::Host of all hosts



8
9
10
11
12
13
14
15
16
# File 'lib/one2influx/one_object/cluster.rb', line 8

def initialize(xml, client, oo_hosts)
  # Load configuration
  @tag_names = $CFG.storage[:cluster][:tags]
  @metric_names = $CFG.storage[:cluster][:metrics]
  @custom_metric_names = $CFG.storage[:cluster][:cust_metrics]
  @hosts = oo_hosts

  super(xml, client)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class One2Influx::OneObject