Sha256: 42a2c909fd87559564a2835c463cfbc022ed6b133693cbad47ad041d40d7afc6

Contents?: true

Size: 544 Bytes

Versions: 5

Compression:

Stored size: 544 Bytes

Contents

require 'fog/core/collection'
require 'fog/vsphere/models/compute/cluster'

module Fog
  module Compute
    class Vsphere

      class Clusters < Fog::Collection

        model Fog::Compute::Vsphere::Cluster
        attr_accessor :datacenter

        def all(filters = {})
          requires :datacenter
          load connection.list_clusters(filters.merge(:datacenter => datacenter))
        end

        def get(id)
          requires :datacenter
          new connection.get_cluster(id, datacenter)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/vsphere/models/compute/clusters.rb
fog-nirvanix-1.8.1 lib/fog/vsphere/models/compute/clusters.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/vsphere/models/compute/clusters.rb
fog-sgonyea-1.8.1 lib/fog/vsphere/models/compute/clusters.rb
fog-1.8.0 lib/fog/vsphere/models/compute/clusters.rb