summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service/mod
diff options
context:
space:
mode:
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod')
-rw-r--r--components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py5
-rw-r--r--components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py b/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py
index 6d431473..ce463ed0 100644
--- a/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py
+++ b/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py
@@ -1,5 +1,5 @@
# ============LICENSE_START===================================================
-# Copyright (C) 2021 Nordix Foundation.
+# Copyright (C) 2021-2022 Nordix Foundation.
# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -30,7 +30,8 @@ def capture_filtered_nfs(sub_name):
Args:
sub_name (string): The name of subscription inorder to perform filtering
Returns:
- list[NetworkFunction]: a list of filtered NetworkFunction Objects.
+ list[NetworkFunction]: a list of filtered NetworkFunction Objects
+ or an empty list if no network function is filtered.
"""
logger.info(f'Getting filtered nfs for subscription: {sub_name}')
nf_filter = NetworkFunctionFilter.get_network_function_filter(sub_name)
diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py b/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py
index fc27f992..d9f44001 100644
--- a/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py
+++ b/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py
@@ -1,5 +1,5 @@
# ============LICENSE_START===================================================
-# Copyright (C) 2021 Nordix Foundation.
+# Copyright (C) 2021-2022 Nordix Foundation.
# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -323,7 +323,8 @@ def query_all_subscriptions():
logger.info('Attempting to fetch all the subscriptions')
subscriptions = db.session.query(SubscriptionModel) \
.options(joinedload(SubscriptionModel.network_filter),
- joinedload(SubscriptionModel.measurement_groups)) \
+ joinedload(SubscriptionModel.measurement_groups),
+ joinedload(SubscriptionModel.nfs)) \
.all()
db.session.remove()
return subscriptions