Commit Graph

17 Commits

Author SHA1 Message Date
Clark Boylan ddd1845d00 Update Docker images to python 3.10
This updates the grafyaml docker images to python 3.10. We do this
because 3.10 has been shown to be quicker than 3.8. Also, 3.11 is coming
up soon and moving off of 3.8 will allow us to remove those images
before adding 3.11 which keeps to image build count to a more reasonable
number.

We update the voluptuous version to add python 3.10 support. In
particular collections.Mapping moved to collections.abc.Mapping.

Change-Id: I1514f5e1992cfe5dcdaa06133f5da7379599e57e
2022-10-14 16:36:05 -07:00
Clark Boylan 7f9c7fdee2 Fix default handling with newer voluptious
It seems newer voluptuous passes the specified default value into the
verification method. Previously if data wasn't supplied it seems to have
not validated anything and returend the default. Anyway this means we
need to use a default value that matches our input type and manipulate
it on the output end the same way we would normal input.

We make this update in order to use newer voluptuous which will be
required when we switch to python3.10.

Change-Id: I64d9c8ac1334971f2d1c82f19ea675022635dc37
2022-10-14 16:35:05 -07:00
Ian Wienand 59247628c4 Update documentation
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
2018-06-04 20:42:30 +10:00
Fabien Boucher 80fd8c8fe1 Cap voluptuous version
Since the recent voluptuous 0.11.1 release functional
tests are broken.

Change-Id: I90141af487a8cd83f5cbc0ec6553f14063732ef6
2018-02-16 10:07:38 +01:00
Paul Belanger 319600e106 Add PBR dependency
Since grafyaml imports pbr.version, it does need to declare a runtime
dependency on pbr.

Change-Id: I6d3cef967e9f898e1821bf2c14697d2535119557
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-19 15:24:36 -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 3a66817727 Replace oslo_log dependency with standard logging
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>
2015-10-06 09:15:20 -04:00
Jenkins 1444e69538 Merge "Add test coverate for grafana.py" 2015-10-01 13:52:18 +00: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
Paul Belanger 29c17b9d23 Add test coverate for grafana.py
Previous to this we actually didn't install our requests dependency.
So grafyaml actually didn't work :( Now we have basic coverage with
mock.

Change-Id: I771ea12e444ea851d76983df75f69d1569653f9d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-25 13:03:53 -04:00
Paul Belanger fb128ea722 Bump pbr requirement to >= 1.3
Also remove invalid comment about setup.py being managed my requirements repo.

Change-Id: I0b3e604b14648f9ae52ca2381269c13cf9e1574f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-21 13:38:59 +00:00
Paul Belanger eabed49f75 Remove Babel bits
These are currently unsed and left over bits from cookie-cutter.

Change-Id: I99d143898e2ef8e7dbd6e0c470d6afdba89fc1f7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-17 14:15:51 -04:00
Paul Belanger 4b14f334f6 Add oslo.log for logging
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-06 16:01:03 -04:00
Paul Belanger e117767f9b Add grafana-dashboards cli client
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>
2015-05-06 13:02:55 -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
Paul Belanger f65385a578 Initial Cookiecutter Commit. 2015-05-04 13:14:07 -04:00