projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Bug 129 RIFT-15122"
[osm/SO.git]
/
rwlaunchpad
/
plugins
/
rwmonparam
/
rift
/
tasklets
/
rwmonparam
/
nsr_core.py
diff --git
a/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py
b/rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py
index
b1b9cd0
..
78a3c8f
100644
(file)
--- a/
rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py
+++ b/
rwlaunchpad/plugins/rwmonparam/rift/tasklets/rwmonparam/nsr_core.py
@@
-89,7
+89,7
@@
class NsrMonitoringParam():
# This indicates that the NSD had no mon-param config.
if not nsd.monitoring_param:
for vnfr in constituent_vnfrs:
# This indicates that the NSD had no mon-param config.
if not nsd.monitoring_param:
for vnfr in constituent_vnfrs:
- vnfd = store.get_vnfd(vnfr.vnfd
_ref
)
+ vnfd = store.get_vnfd(vnfr.vnfd
.id
)
for monp in vnfd.monitoring_param:
mon_params.append(NsrMonitoringParam(
monp,
for monp in vnfd.monitoring_param:
mon_params.append(NsrMonitoringParam(
monp,
@@
-113,6
+113,10
@@
class NsrMonitoringParam():
# value => (value_type, value)
self.vnfr_monparams = {}
# 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:
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
"""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):
@classmethod
def extract_value(cls, monp):
@@
-189,7
+193,7
@@
class NsrMonitoringParam():
def _convert_nsd_msg(self, nsd_monp):
"""Create initial msg without values"""
def _convert_nsd_msg(self, nsd_monp):
"""Create initial msg without values"""
- vnfd_to_vnfr = {vnfr.vnfd
_ref
: vnfr_id
+ vnfd_to_vnfr = {vnfr.vnfd
.id
: vnfr_id
for vnfr_id, vnfr in self._constituent_vnfr_map.items()}
# First, convert the monp param ref from vnfd to vnfr terms.
for vnfr_id, vnfr in self._constituent_vnfr_map.items()}
# First, convert the monp param ref from vnfd to vnfr terms.