diff options
author | Joseph O'Leary <joseph.o.leary@est.tech> | 2020-06-17 16:04:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-17 16:04:53 +0000 |
commit | 20637908b156aeff53d7607f88d655d0becc1f11 (patch) | |
tree | 32977480c45d99c5be4668c176ddb2069e438fe7 /components/pm-subscription-handler/pmsh_service/mod/subscription_handler.py | |
parent | a878f684dc8f906e0800dc1598e5214f8da2ba33 (diff) | |
parent | 80ff14860e3b8a7a2c29272c2c10c1e830c2141d (diff) |
Merge "[PMSH] Improve CBS data handling"
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) |