diff options
author | 2020-02-27 13:56:52 +0000 | |
---|---|---|
committer | 2020-02-28 11:24:53 +0000 | |
commit | c19a0a85bbbc8dcf0633a32d26f4128f6c8c4544 (patch) | |
tree | 234c14ca8729b852f0ea229483807890b8f96362 /components/pm-subscription-handler/pmsh_service/pmsh_service_main.py | |
parent | 82a39f7da3177a9b9b700c7291ed5ea47c90e478 (diff) |
Update PM subscription event for PMSH
* Add control loop name
* Remove invariant id reference
Issue-ID: DCAEGEN2-2100
Signed-off-by: emartin <ephraim.martin@est.tech>
Change-Id: I6bbb757e07f3d930ecd28bd3106df307a264ff65
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/pmsh_service_main.py')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/pmsh_service_main.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/pmsh_service_main.py b/components/pm-subscription-handler/pmsh_service/pmsh_service_main.py index 31d1d079..8245466b 100755 --- a/components/pm-subscription-handler/pmsh_service/pmsh_service_main.py +++ b/components/pm-subscription-handler/pmsh_service/pmsh_service_main.py @@ -42,6 +42,7 @@ def subscription_processor(config_handler, administrative_state, mr_pub, app, """ app.app_context().push() config = config_handler.get_config() + app_conf = AppConfig(**config['config']) new_administrative_state = config['policy']['subscription']['administrativeState'] polling_period = 30.0 @@ -52,9 +53,9 @@ def subscription_processor(config_handler, administrative_state, mr_pub, app, logger.debug(f'Administrative State changed from "{administrative_state}" "to ' f'"{new_administrative_state}".') sub, nfs = aai.get_pmsh_subscription_data(config) - sub.process_subscription(nfs, mr_pub) - aai_event_thread = PeriodicTask(10, process_aai_events, args=(mr_aai_event_subscriber, - sub, mr_pub, app)) + sub.process_subscription(nfs, mr_pub, app_conf) + aai_event_thread = PeriodicTask(10, process_aai_events, args=( + mr_aai_event_subscriber, sub, mr_pub, app, app_conf)) if new_administrative_state == AdministrativeState.UNLOCKED.value: logger.debug('Listening to AAI-EVENT topic in MR.') |