- retro-compatibility with default folder 'General' == 0
- add to config file with folderid key in grafana section
- add to cmd with --grafana-folderid
Change-Id: Iebfc5613f4c622d3d49d2f34df77ad3695f6b046
This will allow the use of GrafYaml called from Ansible without
deploying a GrafYaml config file. With Ansible we can use the template
module to deploy a jinja2 templated GrafYaml dashboard for more
flexibility.
Change-Id: I61a7142c3177681681dcbfe5c889f4c3d59f8ec4
We now support the ability to create a datasource using yaml files.
Change-Id: I1db38ac25bc309398924c15635ea5dee4eaf264c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Since we never use any of the functionality when validating, we'll
disable it.
Change-Id: I8432acc4ff847a3e99bef10449969a01c8fc2795
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Here we are creating a simple wrapper object to ConfigParser for the
purpose of simplifying our configuration. Now, we have a single
location to control our configuration defaults.
Change-Id: Ie49938b1eec183055bb8d462d70bcdfb733b360b
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>
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>
When you run grafana-dashboards, it currently lacks some basic
information what it is actually doing. So, start building out some
logging to help others who decide to run the command.
Change-Id: I27b0c444139c5772b29ae3bd2c9550c6567dd4d6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Like JJB, Zuul and Nodepool, we need to have a CLI command to validate
our configuration files.
Change-Id: I4ccac21a2d77917667e1e844ab9ee1f1f281ea9f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
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>
This is the first attempt at the CLI client. Right now, we just support the
update function, which will blindly create a dashboard in grafana with ZERO
validation. Additionally, we blindly override any existing dashboard that has
been created.
Signed-off-by: Paul Belanger <pabelanger@redhat.com>