From c3ab68bdccbff73659ceb1fe196e2d53d141e38f Mon Sep 17 00:00:00 2001 From: efiacor Date: Tue, 31 Mar 2020 14:28:35 +0100 Subject: [PMSH] Bug fix on aai_event_handler Signed-off-by: efiacor Change-Id: I97e1137f10b28cd4d5d2d95860fbf7fc5306ae38 Issue-ID: DCAEGEN2-2181 --- components/pm-subscription-handler/Changelog.md | 1 + .../pm-subscription-handler/pmsh_service/mod/aai_event_handler.py | 2 ++ components/pm-subscription-handler/pom.xml | 2 +- components/pm-subscription-handler/version.properties | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/pm-subscription-handler/Changelog.md b/components/pm-subscription-handler/Changelog.md index e44539eb..0ae01975 100755 --- a/components/pm-subscription-handler/Changelog.md +++ b/components/pm-subscription-handler/Changelog.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [1.0.3] ### Fixed * Fixed bug where PMSH pushes subscription to xnf regardless of it's orchestration status (DCAEGEN2-2173) +* Bug fix to prevent aai_event handler from incorrectly LOCKING the subscription (DCAEGEN2-2181) ## [1.0.2] ### Changed diff --git a/components/pm-subscription-handler/pmsh_service/mod/aai_event_handler.py b/components/pm-subscription-handler/pmsh_service/mod/aai_event_handler.py index e40060f0..07de7d68 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/aai_event_handler.py +++ b/components/pm-subscription-handler/pmsh_service/mod/aai_event_handler.py @@ -21,6 +21,7 @@ from enum import Enum from mod import pmsh_logging as logger from mod.network_function import NetworkFunction, NetworkFunctionFilter +from mod.subscription import AdministrativeState class XNFType(Enum): @@ -70,6 +71,7 @@ def _process_event(action, new_status, xnf_name, subscription, mr_pub, app_conf) if local_xnf is None: logger.debug(f'Activating subscription for network function {xnf_name}') + subscription.administrativeState = AdministrativeState.UNLOCKED.value subscription.process_subscription([NetworkFunction( nf_name=xnf_name, orchestration_status=new_status)], mr_pub, app_conf) else: diff --git a/components/pm-subscription-handler/pom.xml b/components/pm-subscription-handler/pom.xml index 64d35056..359b0c2e 100644 --- a/components/pm-subscription-handler/pom.xml +++ b/components/pm-subscription-handler/pom.xml @@ -31,7 +31,7 @@ org.onap.dcaegen2.services pmsh dcaegen2-services-pm-subscription-handler - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT UTF-8 . diff --git a/components/pm-subscription-handler/version.properties b/components/pm-subscription-handler/version.properties index c13587b4..ab6cbfe5 100644 --- a/components/pm-subscription-handler/version.properties +++ b/components/pm-subscription-handler/version.properties @@ -1,6 +1,6 @@ major=1 minor=0 -patch=2 +patch=3 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg