def __name_match(name):
  """ Convert a template name to a pattern matching all instances of the
      service.

  Args:
    name: A unit name without type suffix
  Returns:
    The name, possibly modified for matching
  """
  service_name_match = name
  if name.endswith('@'):
    service_name_match = '{0}*'.format(name)
  return service_name_match