code: def _get_datacenter_name():
      '''
      Returns the datacenter name configured on the proxy
  
      Supported proxies: esxcluster, esxdatacenter
      '''
  
      proxy_type = __salt__['vsphere.get_proxy_type']()
      details = None
      if proxy_type == 'esxcluster':
          details = __salt__['esxcluster.get_details']()
      elif proxy_type == 'esxdatacenter':
          details = __salt__['esxdatacenter.get_details']()
      if not details:
          raise salt.exceptions.CommandExecutionError(
              'details for proxy type \'{0}\' not loaded'.format(proxy_type))
      return details['datacenter'f _get_datacenter_name():
      '''
      Returns the datacenter name configured on the proxy
  
      Supported proxies: esxcluster, esxdatacenter
      '''
  
      proxy_type = __salt__['vsphere.get_proxy_type']()
      details = None
      if proxy_type == 'esxcluster':
          details = __salt__['esxcluster.get_details']()
      elif proxy_type == 'esxdatacenter':
          details = __salt__['esxdatacenter.get_details']()
      if not details:
          raise salt.exceptions.CommandExecutionError(
              'details for proxy type \'{0}\' not loaded'.format(proxy_type))
      return details['datacenter']
docs: Returns the datacenter name configured on the proxy
  
      Supported proxies: esxcluster, esxdatacenter