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

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

Instance Attribute Summary

Attributes inherited from Fog::OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from Fog::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/openstack/monitoring/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/openstack/monitoring/models/metric.rb', line 15

def to_s
  name
end