diff options
author | 2020-05-12 12:56:56 +0100 | |
---|---|---|
committer | 2020-06-05 10:11:06 +0100 | |
commit | 2760519436f78975f16f26c412e842e34b28d624 (patch) | |
tree | 3fb616398002bd4525c10ff8b510bbf5ebadc26f /components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py | |
parent | 5ed9b7d3cad56c6438bca305b6d2931bd320352b (diff) |
[PMSH] Replace own logging implementation with pylog
Signed-off-by: ERIMROB <robertas.rimkus@est.tech>
Issue-ID: DCAEGEN2-2155
Change-Id: I670c4fff8029a73075b651c2afe6237c08cf907c
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py')
-rw-r--r-- | components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py b/components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py index aa5a8cb8..5ce03691 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py +++ b/components/pm-subscription-handler/pmsh_service/mod/policy_response_handler.py @@ -20,11 +20,10 @@ import json from tenacity import retry, wait_fixed, retry_if_exception_type -import mod.pmsh_logging as logger +from mod import logger from mod.network_function import NetworkFunction from mod.subscription import Subscription, AdministrativeState, subscription_nf_states - policy_response_handle_functions = { AdministrativeState.LOCKED.value: { 'success': NetworkFunction.delete, @@ -49,6 +48,7 @@ class PolicyResponseHandler: This method polls MR for response from policy. It checks whether the message is for the relevant subscription and then handles the response """ + logger.info('Polling MR started for XNF activation/deactivation policy response events.') self.app.app_context().push() administrative_state = Subscription.get(self.subscription_name).status try: @@ -74,8 +74,8 @@ class PolicyResponseHandler: nf_name (str): The network function name response_message (str): The message in the response regarding the state (success|failed) """ - logger.debug(f'Response from MR: Sub: {subscription_name} for ' - f'NF: {nf_name} received, updating the DB') + logger.info(f'Response from MR: Sub: {subscription_name} for ' + f'NF: {nf_name} received, updating the DB') try: sub_nf_status = subscription_nf_states[administrative_state][response_message].value policy_response_handle_functions[administrative_state][response_message]( |