Sha256: b858722cd73b59ee7011feab231aadcc7ff1a55770340f696416c91e30cfa203

Contents?: true

Size: 534 Bytes

Versions: 10

Compression:

Stored size: 534 Bytes

Contents

module Fog
  module Vsphere
    class Compute
      class Datastores < Fog::Collection
        autoload :Datastore, File.expand_path('../datastore', __FILE__)

        model Fog::Vsphere::Compute::Datastore
        attr_accessor :datacenter, :cluster

        def all(filters = {})
          load service.list_datastores(filters.merge(datacenter: datacenter, cluster: cluster))
        end

        def get(id)
          requires :datacenter
          new service.get_datastore(id, datacenter)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-vsphere-3.4.0 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.3.1 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.3.0 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.2.5 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.2.2 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.2.1 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.2.0 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.1.1 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.1.0 lib/fog/vsphere/models/compute/datastores.rb
fog-vsphere-3.0.0 lib/fog/vsphere/models/compute/datastores.rb