Beispiel #1
0
    def __init__(self, msd_path, vim, title=None):

        # Parse the msd file
        LOG.info('parsing msd: {0}'.format(msd_path))
        self.msd_dict = load_yaml(msd_path)

        # the VIM class where the monitoring is installed (son-emu manager)
        self.vim = vim

        # initialize a new Grafana dashboard
        self.grafana = Grafana()

        # get msd file parameters
        if title is None:
            title = self.msd_dict.get('dashboard')
        self.dashboard = title
        self.version = self.msd_dict.get('version')

        # get msd VNF metrics to monitor
        self.vnf_metrics = self.msd_dict.get('vnf_metrics', [])
        # get msd NSD links to monitor
        self.nsd_links = self.msd_dict.get('nsd_links', [])

        # cookie integer, unique per monitred flow
        self.cookie_counter = COOKIE_START