Commit Graph

11 Commits

Author SHA1 Message Date
Iswarya_Vakati 91180e0476 Removes unnecessary utf-8 encoding
This patches removes unnecessary utf-8 encoding in
doc/source/conf.py
grafana_dashboards/__init__.py
tests/base.py
tests/schema/base.py
tests/schema/fixtures/dashboard-0010.yaml
tests/schema/fixtures/dashboard-0011.yaml
tests/schema/fixtures/dashboard-0012.yaml

Change-Id: I75b80ee943b4da7381e124743386c3ea6eb4db42
2017-01-11 05:27:12 +00:00
Paul Belanger 1bb25348e9 Create default configuration
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>
2015-10-22 18:28:00 -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 f4b18fdd74 Add validate command
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>
2015-10-01 09:59:21 -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
Paul Belanger 42ef61dde0 Add a slug to better track dashboards
Currently grafana will generate a slug based on the title name. For
now, we can use an existing python library to do this.  Ideally, we'll
need to make sure the slugs generated between both are kept in sync.

How hard can that be?

Also move our validation logic into parser.py, since they are closely
related.

Change-Id: Id43f51d3f9db9131c25a8130f957572344a7d8f1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-28 10:15:10 -04:00
Jenkins f7b74e0ada Merge "Enforce properly indentation for json fixtures" 2015-09-21 13:49:41 +00:00
Paul Belanger 27917e59e0 Enforce properly indentation for json fixtures
Change-Id: I21415f27332decea555c3534a96e02ba1ea0c591
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-18 16:06:20 -04:00
Paul Belanger 9030cad526 Move yaml functions into its own class
This will centeralize our overlapping yaml code paths.

Change-Id: Ib8bc0fc93b49363cb511d9891a24ea48fdee136d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-06-17 13:34:28 -04:00
Paul Belanger b91de6e8e9 Rework unit tests
With help from JJB we now compare yaml to json, making sure we generating the
proper JSON from the schema

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-11 14:38:24 -04:00
Paul Belanger 71e14b74f2 Initial commit of schema
Here we are using voluptuous to help validate our yaml files.  Right now we we
just have support for text panels, but it is a start.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-05 10:52:01 -04:00