Sha256: 3d068f4538761c8be7408ba4cf027e5ecfc007bad26e96797df9cb2c0134f8de
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
module Fog module VcloudDirector class Compute class Real # Retrieve a list of all VMs attached to a disk. # # @param [String] id Object identifier of the disk. # @return [Excon::Response] # * body<~Hash>: # # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VmsDisksAttachedTo.html # @since vCloud API version 5.1 def get_vms_disk_attached_to(id) response = request( :expects => 200, :idempotent => true, :method => 'GET', :parser => Fog::ToHashDocument.new, :path => "disk/#{id}/attachedVms" ) ensure_list! response.body, :VmReference response end end class Mock def get_vms_disk_attached_to(id) unless data[:disks][id] raise Fog::VcloudDirector::Compute::Forbidden.new( 'No access to entity "com.vmware.vcloud.entity.disk:%s".' % id ) end Fog::Mock.not_implemented end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems