Sha256: 365d357b2a0daafa08eed39ce8fded8ae3048b7ed439e499c40e734a38cbe099

Contents?: true

Size: 806 Bytes

Versions: 23

Compression:

Stored size: 806 Bytes

Contents

module Fog
  module Vsphere
    class Compute
      class Real
        def get_resource_pool(name, cluster_name, datacenter_name)
          resource_pool = get_raw_resource_pool(name, cluster_name, datacenter_name)
          raise(Fog::Vsphere::Compute::NotFound) unless resource_pool
          resource_pool_attributes(resource_pool, cluster_name, datacenter_name)
        end

        protected

        def get_raw_resource_pool(name, cluster_name, datacenter_name)
          dc      = find_raw_datacenter(datacenter_name)
          cluster = dc.find_compute_resource(cluster_name)
          name.nil? ? cluster.resourcePool : cluster.resourcePool.traverse(name)
        end
      end

      class Mock
        def get_resource_pool(name, cluster_name, datacenter_name); end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fog-vsphere-3.7.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.8 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.7 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.6 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.5 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.4 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.3 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.2 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.5.3 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.6.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.5.2 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.5.1 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.5.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.4.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.3.1 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.3.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.2.5 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.2.2 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.2.1 lib/fog/vsphere/requests/compute/get_resource_pool.rb
fog-vsphere-3.2.0 lib/fog/vsphere/requests/compute/get_resource_pool.rb