X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fplugins%2Frwmonitor%2Frift%2Ftasklets%2Frwmonitor%2Fcore.py;h=f43da6fcfca5b94f938dded33721088d1bed782c;hb=a3bb91f092d378448cb870eccd45d43865de143c;hp=b8abea7441a9d85ccfa7c891d704c9bcaafb4ebe;hpb=996695a3d7bba0bce1c064e404829802454212ca;p=osm%2FSO.git diff --git a/rwlaunchpad/plugins/rwmonitor/rift/tasklets/rwmonitor/core.py b/rwlaunchpad/plugins/rwmonitor/rift/tasklets/rwmonitor/core.py index b8abea74..f43da6fc 100644 --- a/rwlaunchpad/plugins/rwmonitor/rift/tasklets/rwmonitor/core.py +++ b/rwlaunchpad/plugins/rwmonitor/rift/tasklets/rwmonitor/core.py @@ -231,7 +231,7 @@ class NfviMetrics(object): self._account = account self._plugin = plugin self._timestamp = 0 - self._metrics = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vdur_NfviMetrics() + self._metrics = RwVnfrYang.YangData_RwProject_Project_VnfrCatalog_Vnfr_Vdur_NfviMetrics() self._vdur = vdur self._vim_id = vdur.vim_id self._updating = None @@ -305,7 +305,7 @@ class NfviMetrics(object): try: # Create uninitialized metric structure - vdu_metrics = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vdur_NfviMetrics() + vdu_metrics = RwVnfrYang.YangData_RwProject_Project_VnfrCatalog_Vnfr_Vdur_NfviMetrics() # VCPU vdu_metrics.vcpu.total = self.vdur.vm_flavor.vcpu_count @@ -549,17 +549,19 @@ class Monitor(object): different sub-systems that are used to monitor the NFVI. """ - def __init__(self, loop, log, config): + def __init__(self, loop, log, config, project): """Create a Monitor object Arguments: - loop - an event loop - log - the logger used by this object - config - an instance of InstanceConfiguration + loop - an event loop + log - the logger used by this object + config - an instance of InstanceConfiguration + project - an instance of the project """ self._loop = loop self._log = log + self._project = project self._cloud_accounts = dict() self._nfvi_plugins = NfviMetricsPluginManager(log) @@ -580,6 +582,10 @@ class Monitor(object): """The event log used by this object""" return self._log + @property + def project(self): + return self._project + @property def cache(self): """The NFVI metrics cache"""