mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
add support for 'metrics'
This commit is contained in:
parent
55d328b283
commit
1118bc5420
4 changed files with 16 additions and 1 deletions
|
@ -24,6 +24,9 @@ module Fog
|
||||||
collection :joyent_modules
|
collection :joyent_modules
|
||||||
model :joyent_module
|
model :joyent_module
|
||||||
|
|
||||||
|
collection :metrics
|
||||||
|
model :metric
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, key|
|
@data ||= Hash.new do |hash, key|
|
||||||
|
|
|
@ -16,7 +16,6 @@ module Fog
|
||||||
# { 'apache' => {'label' => 'Apache'}}
|
# { 'apache' => {'label' => 'Apache'}}
|
||||||
# where the key is the name of the module
|
# where the key is the name of the module
|
||||||
def new(attributes = {})
|
def new(attributes = {})
|
||||||
puts attributes.inspect
|
|
||||||
name, other_attributes = attributes
|
name, other_attributes = attributes
|
||||||
super(other_attributes.merge('name' => name))
|
super(other_attributes.merge('name' => name))
|
||||||
end
|
end
|
||||||
|
|
13
lib/fog/joyent/models/analytics/metric.rb
Normal file
13
lib/fog/joyent/models/analytics/metric.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
require 'fog/core/model'
|
||||||
|
|
||||||
|
module Fog
|
||||||
|
module Joyent
|
||||||
|
class Analytics
|
||||||
|
class Metric < Fog::Model
|
||||||
|
attribute :name
|
||||||
|
attribute :label
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
0
lib/fog/joyent/models/analytics/metrics.rb
Normal file
0
lib/fog/joyent/models/analytics/metrics.rb
Normal file
Loading…
Add table
Reference in a new issue