Class: Fog::Monitoring::OpenStack::Metric

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/monitoring/openstack/models/metric.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#destroy, #initialize, #save, #update

Constructor Details

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

Instance Method Details

#createObject



19
20
21
22
23
# File 'lib/fog/monitoring/openstack/models/metric.rb', line 19

def create
  requires :name, :timestamp, :value
  service.create_metric(attributes).body['metric']
  self
end

#to_sObject



15
16
17
# File 'lib/fog/monitoring/openstack/models/metric.rb', line 15

def to_s
  name
end