From: Philip Joseph Date: Thu, 27 Oct 2016 09:42:10 +0000 (-0400) Subject: RIFT-14555 Fixing few console error messages X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=30608f54e1f4169ba006715c76544e84c67c765f;p=osm%2FSO.git RIFT-14555 Fixing few console error messages Original fix by: Ananda Baitharu Signed-off-by: Philip Joseph --- diff --git a/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py b/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py index b1b9cd01..31b76477 100644 --- a/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py +++ b/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py @@ -113,6 +113,10 @@ class NsrMonitoringParam(): # value => (value_type, value) self.vnfr_monparams = {} + # create_nsr_mon_params() is already validating for 'is_legacy' by checking if + # nsd is having 'monitoring_param'. So removing 'self.aggregation_type is None' check for is_legacy. + self.is_legacy = is_legacy + if not is_legacy: self._msg = self._convert_nsd_msg(monp_config) else: @@ -144,9 +148,9 @@ class NsrMonitoringParam(): """Aggregation type""" return self.nsr_mon_param_msg.aggregation_type - @property - def is_legacy(self): - return (self.aggregation_type is None) + # @property + # def is_legacy(self): + # return (self.aggregation_type is None) @classmethod def extract_value(cls, monp): diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py index e29f4911..23ab7b6e 100644 --- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py +++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py @@ -103,9 +103,13 @@ class ROConfigManager(object): # Update the NSR's config status new_status = ROConfigManager.map_config_status(cm_nsr['state']) - self._log.debug("Updating config status of NSR {} to {}({})". - format(nsrid, new_status, cm_nsr['state'])) - yield from self.nsm.nsrs[nsrid].set_config_status(new_status, cm_nsr.get('state_details')) + self._log.info("Updating config status of NSR {} to {}({})". + format(nsrid, new_status, cm_nsr['state'])) + + # If terminate nsr request comes when NS instantiation is in 'Configuring state'; self.nsm.nsrs dict + # is already empty when self.nsm.nsrs[nsrid].set_config_status gets executed. So adding a check here. + if nsrid in self.nsm.nsrs: + yield from self.nsm.nsrs[nsrid].set_config_status(new_status, cm_nsr.get('state_details')) except Exception as e: self._log.error("Failed to process cm-state for nsr {}: {}".