This simply takes any json files present and loads them into Grafana
directly. The idea is that you can edit the dashboards using the
inbuilt editor, then copy the dashboard JSON and keep it externally
version controlled. No parsing or validation is done on the JSON
files; we are assuming they have not been hand-modified from what
Grafana generates.
Change-Id: I38695aed2404f8b7fc350d949b7a9212498c35cb
Add some expanded documentation on what grafyaml actually does to
README.rst
While we're here, fix this up to use openstackdocs theme and the
latest sphinx, as it was producing a bunch of warnings.
Change-Id: I570b44cb911cd48d53d62234426edeabb22b1469
We now support the ability to create a datasource using yaml files.
Change-Id: I1db38ac25bc309398924c15635ea5dee4eaf264c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
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>
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>
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>
When I first started grafyaml, I wanted to better understand how
existing OpenStack libraries worked. So, with that in mind, I choose
oslo_log as the logging class for this program. However, now that we
have imported it under openstack-infra, we don't really want to depend
on OpenStack libraries, incase there is a breakage. The main reason
for this, if OpenStack libraries break, we still want the
infrastructure to work so we can fix the problem.
Change-Id: Iee9b1d9d9abb4da4d285531b64a7e2505240be12
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
The long term goal here is to eventually create python-grafana from
our embedded grafana.py file. So, most of this code just makes the
Grafana object more user friendly.
However, we've also added some validation around create_dashboard, we
added some checks before we create and after. To ensure we actually
created our new dashboards.
Finally, add some sphinx docs since everybody loves documentation.
Change-Id: Icbba403afe5208fbef1855118d4c3f4293461e00
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Also rework index file to include README over a dedicated readme file.
Change-Id: I70108fb627131e7a8bfec6e64cbfc093e65ca48b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Since we are not an official OpenStack project, no need to look like
one.
Change-Id: I6925799ebaf4086ea499be81c2be9de2aedb57ac
Signed-off-by: Paul Belanger <pabelanger@redhat.com>