diff options
author | 2020-06-09 19:20:22 +0100 | |
---|---|---|
committer | 2020-06-17 14:57:29 +0100 | |
commit | 80ff14860e3b8a7a2c29272c2c10c1e830c2141d (patch) | |
tree | 7e97d2b90e1dd5b6765e0bc88932c53197a107cf /components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py | |
parent | 2760519436f78975f16f26c412e842e34b28d624 (diff) |
[PMSH] Improve CBS data handling
# AppConfog object fetch priodically
# AAI client to only fetch AAI data
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I78315f141c3bb7e8b0d9efa818d294415fa79918
Issue-ID: DCAEGEN2-2146
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py')
-rw-r--r-- | components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py b/components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py index be67cae6..add8be42 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py +++ b/components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py @@ -17,7 +17,6 @@ # ============LICENSE_END===================================================== import mod.aai_client as aai -from mod.pmsh_utils import ConfigHandler from mod import logger from mod.subscription import AdministrativeState @@ -38,15 +37,15 @@ class SubscriptionHandler: the Subscription if a change has occurred """ self.app.app_context().push() - config = ConfigHandler.get_pmsh_config() - new_administrative_state = config['policy']['subscription']['administrativeState'] + new_administrative_state = self.app_conf.subscription.administrativeState try: if self.administrative_state == new_administrative_state: logger.info('Administrative State did not change in the Config') else: logger.info(f'Administrative State has changed from {self.administrative_state} ' f'to {new_administrative_state}.') - self.current_sub, self.current_nfs = aai.get_pmsh_subscription_data(config) + self.current_nfs = aai.get_pmsh_nfs_from_aai(self.app_conf) + self.current_sub = self.app_conf.subscription self.administrative_state = new_administrative_state self.current_sub.process_subscription(self.current_nfs, self.mr_pub, self.app_conf) |