Commit Graph

6 Commits

Author SHA1 Message Date
Paul Belanger 2c92819451 Add datasource support
We now support the ability to create a datasource using yaml files.

Change-Id: I1db38ac25bc309398924c15635ea5dee4eaf264c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-03 12:36:59 -05:00
Paul Belanger bec5312d99 Fix bug when passing url and key into grafana
Sadly, our unit tests missed this. Since we didn't actually test the
contents of the values.  We have now fixed that with some unit tests.

Change-Id: Ida72768b51cb579fedb740f54d6f764e14f9d3d0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-23 17:22:03 -04:00
Paul Belanger fd76590e4b Add delete command to CLI
Add the ability to delete dashboards based on the provided yaml file.
We also removed the assert_dashboard_exists function, as it didn't
really save us code.

Change-Id: I417a72fcc5252b36cadfe8881b4f5ca6acb7c753
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-16 11:33:32 -04:00
Paul Belanger 3a32d511bb Rework grafana object for future functionality
Currently we only support dashboards for Grafana, this is about to
change. For example, we also need to add the ability to create
datasources and even users. Here we are breaking out the logic into
more specific functions.

Additionaly, this helps when we eventually break out this code into
python-grafana.

Change-Id: I10a618adbf9052c8dccda38fefb7abf3a148d3b6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-09 14:00:28 -04:00
Paul Belanger 4e643e5d06 Replace oslo_config dependency with argparse
This is for the same reasoning as oslo_log. We don't want to depending
on OpenStack libraries.

Change-Id: I34e66af578d3f4b5ac5e710554aad91524285816
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-09 10:12:57 -04:00
Paul Belanger 103a882cbf Add caching support
Like we do with JJB, we create a md5sum of the dashboard then cache
it.  This is a simple way to determine if a yaml file has changed.

Change-Id: If7b80b84c5bbcb0d30b0325bae6b8e726bb2f41b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-29 11:34:31 -04:00