code: def avail_locations(call=None):
      '''
      Return available OpenNebula locations.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud --list-locations opennebula
          salt-cloud --function avail_locations opennebula
          salt-cloud -f avail_locations opennebula
  
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option.'
          )
  
      server, user, password = _get_xml_rpc()
      auth = ':'.join([user, password])
      host_pool = server.one.hostpool.info(auth)[1]
  
      locations = {}
      for host in _get_xml(host_pool):
          locations[host.find('NAME').text] = _xml_to_dict(host)
  
      return locationf avail_locations(call=None):
      '''
      Return available OpenNebula locations.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud --list-locations opennebula
          salt-cloud --function avail_locations opennebula
          salt-cloud -f avail_locations opennebula
  
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option.'
          )
  
      server, user, password = _get_xml_rpc()
      auth = ':'.join([user, password])
      host_pool = server.one.hostpool.info(auth)[1]
  
      locations = {}
      for host in _get_xml(host_pool):
          locations[host.find('NAME').text] = _xml_to_dict(host)
  
      return locations
docs: Return available OpenNebula locations.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud --list-locations opennebula
          salt-cloud --function avail_locations opennebula
          salt-cloud -f avail_locations opennebula