Exemplo n.º 1
0
    def list(self, request, fsid):
        cluster = self.client.get_cluster(fsid)
        pools = [
            self.pool_object(p, cluster)
            for p in self.client.list(fsid, POOL, {})
        ]

        return Response(PoolSerializer(pools, many=True).data)
Exemplo n.º 2
0
 def retrieve(self, request, fsid, pool_id):
     cluster = self.client.get_cluster(fsid)
     pool = self.pool_object(self.client.get(fsid, POOL, int(pool_id)),
                             cluster)
     return Response(PoolSerializer(pool).data)