[openstack-dev] [vitrage] spec for datasource

Afek, Ifat (Nokia - IL) ifat.afek at nokia.com
Wed Aug 10 14:40:11 UTC 2016

From: Yujun Zhang
Date: Tuesday, 9 August 2016 at 14:48

1. How do I register a new datasource in an existing system?
[yujunz] It seems to be in https://github.com/openstack/vitrage/blob/master/vitrage/datasources/__init__.py
Not exactly. This file defines the default datasources to be used. You can overwrite this list in /etc/vitrage/vitrage.conf. For example:

types = nova.host,nova.instance,nova.zone,cinder.volume,neutron.network,neutron.port

2. Is the type of datasource (ALARM/RESOURCE) configured in `/etc/vitrage/datasource_values/<datasource>.yaml` ?

[Ifat]: No, it is configured in the datasource code. For information about datasource_values please see [3]
[yujunz] which code file? I found `category: RESOURCE` in the datasource configuration file as https://github.com/openstack/vitrage/blob/master/doc/source/resource-state-config.rst#format
EntityCategory is defined in https://github.com/openstack/vitrage/blob/master/vitrage/common/constants.py
It is used in the transformer files of each datasource.

5. What is the required data format for the datasource driver api? The inline comments give some brief description but didn't specify the api signature.
Many thanks.
[Ifat]: This should be part of the datasource documentation that we need to add. But basically, the driver should return a dictionary with few predefined fields (like datasource type, timestamp), and add whatever data is needed for the datasource. Then, the datasource transformer will transform this data into a vertex and decide where to connect it to the graph.
[yujunz] So if I understand it correctly, driver and transformer works as a pair and the intermediate data format is not exposed to vitrage. It consumes data from the sources and convert them into graph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160810/ab159203/attachment.html>

More information about the OpenStack-dev mailing list