2011-09-07 16:22:31 -04:00
|
|
|
require 'fog/core/collection'
|
|
|
|
require 'fog/aws/models/elasticache/cluster'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class Elasticache
|
|
|
|
|
|
|
|
class Clusters < Fog::Collection
|
|
|
|
model Fog::AWS::Elasticache::Cluster
|
|
|
|
|
|
|
|
def all
|
|
|
|
load(
|
|
|
|
connection.describe_cache_clusters.body['CacheClusters']
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2011-09-09 10:52:40 -04:00
|
|
|
def get(identity, show_node_info = false)
|
2011-09-07 16:22:31 -04:00
|
|
|
new(
|
2011-09-08 12:04:07 -04:00
|
|
|
connection.describe_cache_clusters(
|
2011-09-09 10:52:40 -04:00
|
|
|
identity, :show_node_info => show_node_info
|
2011-09-08 12:04:07 -04:00
|
|
|
).body['CacheClusters'].first
|
2011-09-07 16:22:31 -04:00
|
|
|
)
|
|
|
|
rescue Fog::AWS::Elasticache::NotFound
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|