server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
# List all datacenters managed by the vSphere or vCenter entrypoint.
List all datacenters managed by the vSphere or vCenter entrypoint.
List all datacenters managed by the vSphere or vCenter entrypoint .
def realms(credentials, opts={})
      vsphere = new_client(credentials)
      safely do
        if opts and opts[:id]
          datastore = find_datastore(credentials, opts[:id])
          [convert_realm(datastore)]
        else
          rootFolder = vsphere.serviceInstance.content.rootFolder
          rootFolder.childEntity.grep(RbVmomi::VIM::Datacenter).collect do |dc|
            dc.datastoreFolder.childEntity.collect { |ds| convert_realm(ds) }
          end.flatten
        end
      end
    end
def realms ( credentials , opts = { } ) vsphere = new_client ( credentials ) safely do if opts and opts [ :id ] datastore = find_datastore ( credentials , opts [ :id ] ) [ convert_realm ( datastore ) ] else rootFolder = vsphere . serviceInstance . content . rootFolder rootFolder . childEntity . grep ( RbVmomi :: VIM :: Datacenter ) . collect do | dc | dc . datastoreFolder . childEntity . collect { | ds | convert_realm ( ds ) } end . flatten end end end
List all datacenters managed by the vSphere or vCenter entrypoint.
List all datacenters managed by the vSphere or vCenter entrypoint .
credentials
<not_specific>
opts
<not_specific>