dashboard/state_aggregator.py
async def list_placement_groups(self, *, option: ListApiOptions) -> dict:
        """List all placement group information from the cluster.

        Returns:
            {pg_id -> pg_data_in_dict}
            pg_data_in_dict's schema is in PlacementGroupState
        """
        reply = await self._client.get_all_placement_group_info(timeout=option.timeout)
        result = []
        for message in reply.placement_group_table_data:

            data = self._message_to_dict(
                message=message,
                fields_to_decode=["placement_group_id"],
            )
            data = filter_fields(data, PlacementGroupState)
            result.append(data)

        # Sort to make the output deterministic.
        result.sort(key=lambda entry: entry["placement_group_id"])
        return {d["placement_group_id"]: d for d in islice(result, option.limit)}
List all placement group information from the cluster.

        Returns:
            {pg_id -> pg_data_in_dict}
            pg_data_in_dict's schema is in PlacementGroupState
        
List all placement group information from the cluster.
List all placement group information from the cluster .
async def list_placement_groups(self, *, option: ListApiOptions) -> dict:
        reply = await self._client.get_all_placement_group_info(timeout=option.timeout)
        result = []
        for message in reply.placement_group_table_data:
            data = self._message_to_dict(
                message=message,
                fields_to_decode=["placement_group_id"],
            )
            data = filter_fields(data, PlacementGroupState)
            result.append(data)
        result.sort(key=lambda entry: entry["placement_group_id"])
        return {d["placement_group_id"]: d for d in islice(result, option.limit)}
async def list_placement_groups ( self , * , option : ListApiOptions ) -> dict : reply = await self . _client . get_all_placement_group_info ( timeout = option . timeout ) result = [ ] for message in reply . placement_group_table_data : data = self . _message_to_dict ( message = message , fields_to_decode = [ "placement_group_id" ] , ) data = filter_fields ( data , PlacementGroupState ) result . append ( data ) result . sort ( key = lambda entry : entry [ "placement_group_id" ] ) return { d [ "placement_group_id" ] : d for d in islice ( result , option . limit ) }
List all placement group information from the cluster.
List all placement group information from the cluster .
"""List all placement group information from the cluster.

        Returns:
            {pg_id -> pg_data_in_dict}
            pg_data_in_dict's schema is in PlacementGroupState
        """ # Sort to make the output deterministic.
{pg_id -> pg_data_in_dict}
pg_data_in_dict's schema is in PlacementGroupState
{ pg_id - > pg_data_in_dict } pg_data_in_dict ' s schema is in PlacementGroupState
self
option
ListApiOptions