diff options
author | 2020-02-12 11:35:20 +0000 | |
---|---|---|
committer | 2020-02-20 16:03:48 +0000 | |
commit | 26b76c02052269ea850d8d4efd6deb536115a0af (patch) | |
tree | f7485d7ccd0e7d95c000b9c05bce2c371c34581a /components/pm-subscription-handler/pmsh_service/mod/aai_client.py | |
parent | d42ac06c733c43e19a01b4203c1b987b4973ccfd (diff) |
Add Support for Activation and Deactivation
* Add support for reconfiguration of the administrativeState field
* Add support for policy feedback handling
* Fix network function filter applying to non active network functions
Signed-off-by: ERIMROB <robertas.rimkus@est.tech>
Change-Id: Ic1cfc3207b2495c1d8d10acd0ed1c40114cf4643
Issue-ID: DCAEGEN2-1830
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/aai_client.py')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/mod/aai_client.py | 6 |
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 |