aboutsummaryrefslogtreecommitdiffstats
path: root/lcm/ns_pnfs/views/pnf_view.py
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/ns_pnfs/views/pnf_view.py')
-rw-r--r--lcm/ns_pnfs/views/pnf_view.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lcm/ns_pnfs/views/pnf_view.py b/lcm/ns_pnfs/views/pnf_view.py
index c6f2694d..ad435f9b 100644
--- a/lcm/ns_pnfs/views/pnf_view.py
+++ b/lcm/ns_pnfs/views/pnf_view.py
@@ -63,7 +63,12 @@ class PnfView(APIView):
def get(self, request):
try:
logger.debug("PnfView::get")
- pnfInstDataSet = GetPnf().do_biz()
+ nsInstanceId = request.query_params.get('nsInstanceId', None)
+ if nsInstanceId is not None:
+ filter = {"nsInstanceId": nsInstanceId}
+ pnfInstDataSet = GetPnf(filter).do_biz()
+ else:
+ pnfInstDataSet = GetPnf().do_biz()
logger.debug("PnfView::get::ret=%s", pnfInstDataSet)
resp_serializer = PnfInstancesSerializer(data=[pnfInstData.__dict__ for pnfInstData in pnfInstDataSet])
if not resp_serializer.is_valid():