Sha256: a68ce36f16d7962301a012a584a6114cbff8491c00e871b31b6f9d9a4b5b1134

Contents?: true

Size: 516 Bytes

Versions: 43

Compression:

Stored size: 516 Bytes

Contents

require 'fog/openstack/models/model'

module Fog
  module Monitoring
    class OpenStack
      class Metric < Fog::OpenStack::Model
        identity :id

        attribute :name
        attribute :dimensions
        attribute :timestamp
        attribute :value
        attribute :value_meta

        def to_s
          name
        end

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

Version data entries

43 entries across 41 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.10 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.1.30 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.1.29 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.9 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.1.28 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.8 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.7 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.6 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.5 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.4 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.3 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.2 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.3.0 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.2.4 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.2.3 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.2.2 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.2.1 lib/fog/monitoring/openstack/models/metric.rb
fog-openstack-0.2.0 lib/fog/monitoring/openstack/models/metric.rb
fog-zj-0.1.28 lib/fog/monitoring/openstack/models/metric.rb