summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service/mod/aai_client.py
diff options
context:
space:
mode:
authorJoseph O'Leary <joseph.o.leary@est.tech>2020-02-21 08:44:13 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-21 08:44:13 +0000
commit06d595819918da57b6ce3ffeb9346c7913f2c66b (patch)
tree2e6429d28d6ca3a02e40fb18c047e71fe3eeb01a /components/pm-subscription-handler/pmsh_service/mod/aai_client.py
parentc462be48a8b56a7e925315d79f18c5c97123459f (diff)
parent26b76c02052269ea850d8d4efd6deb536115a0af (diff)
Merge "Add Support for Activation and Deactivation"
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/aai_client.py')
-rwxr-xr-xcomponents/pm-subscription-handler/pmsh_service/mod/aai_client.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/aai_client.py b/components/pm-subscription-handler/pmsh_service/mod/aai_client.py
index 747846f1..f0f20566 100755
--- a/components/pm-subscription-handler/pmsh_service/mod/aai_client.py
+++ b/components/pm-subscription-handler/pmsh_service/mod/aai_client.py
@@ -119,10 +119,12 @@ def _filter_nf_data(nf_data, nf_filter):
try:
for nf in nf_data['results']:
name_identifier = 'pnf-name' if nf['node-type'] == 'pnf' else 'vnf-name'
- if nf_filter.is_nf_in_filter(nf['properties'].get(name_identifier)):
+ orchestration_status = nf['properties'].get('orchestration-status')
+ if nf_filter.is_nf_in_filter(nf['properties'].get(name_identifier)) \
+ and orchestration_status == 'Active':
nf_set.add(NetworkFunction(
nf_name=nf['properties'].get(name_identifier),
- orchestration_status=nf['properties'].get('orchestration-status')))
+ orchestration_status=orchestration_status))
except KeyError as e:
logger.debug(f'Failed to parse AAI data: {e}')
raise