[PMSH] Bug fix on aai_event_handler 56/104756/3
authorefiacor <fiachra.corcoran@est.tech>
Tue, 31 Mar 2020 13:28:35 +0000 (14:28 +0100)
committerefiacor <fiachra.corcoran@est.tech>
Thu, 2 Apr 2020 09:42:12 +0000 (10:42 +0100)
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I97e1137f10b28cd4d5d2d95860fbf7fc5306ae38
Issue-ID: DCAEGEN2-2181

components/pm-subscription-handler/Changelog.md
components/pm-subscription-handler/pmsh_service/mod/aai_event_handler.py
components/pm-subscription-handler/pom.xml
components/pm-subscription-handler/version.properties

index e44539e..0ae0197 100755 (executable)
@@ -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
index e40060f..07de7d6 100755 (executable)
@@ -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:
index 64d3505..359b0c2 100644 (file)
@@ -31,7 +31,7 @@
   <groupId>org.onap.dcaegen2.services</groupId>
   <artifactId>pmsh</artifactId>
   <name>dcaegen2-services-pm-subscription-handler</name>
-  <version>1.0.2-SNAPSHOT</version>
+  <version>1.0.3-SNAPSHOT</version>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <sonar.sources>.</sonar.sources>
index c13587b..ab6cbfe 100644 (file)
@@ -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