@classmethod
def list(cls, context, limit=None, marker=None, sort_key=None, sort_dir=None):
    """Return a list of Portgroup objects.

        :param cls: the :class:`Portgroup`
        :param context: Security context.
        :param limit: Maximum number of resources to return in a single result.
        :param marker: Pagination marker for large data sets.
        :param sort_key: Column to sort results by.
        :param sort_dir: Direction to sort. "asc" or "desc".
        :returns: A list of :class:`Portgroup` object.
        :raises: InvalidParameterValue

        """
    db_portgroups = cls.dbapi.get_portgroup_list(limit=limit, marker=marker,
        sort_key=sort_key, sort_dir=sort_dir)
    return cls._from_db_object_list(context, db_portgroups)
