code: def avail_locations(call=None):
      '''
      Return a dict of all available locations on the provider with
      relevant data.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt-cloud --list-locations my-qingcloud
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option'
          )
  
      params = {
          'action': 'DescribeZones',
      }
      items = query(params=params)
  
      result = {}
      for region in items['zone_set']:
          result[region['zone_id']] = {}
          for key in region:
              result[region['zone_id']][key] = six.text_type(region[key])
  
      return resulf avail_locations(call=None):
      '''
      Return a dict of all available locations on the provider with
      relevant data.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt-cloud --list-locations my-qingcloud
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_locations function must be called with '
              '-f or --function, or with the --list-locations option'
          )
  
      params = {
          'action': 'DescribeZones',
      }
      items = query(params=params)
  
      result = {}
      for region in items['zone_set']:
          result[region['zone_id']] = {}
          for key in region:
              result[region['zone_id']][key] = six.text_type(region[key])
  
      return result
docs: Return a dict of all available locations on the provider with
      relevant data.
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt-cloud --list-locations my-qingcloud