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
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
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
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>
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>
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>
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>
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>
Also remove invalid comment about setup.py being managed my requirements repo.
Change-Id: I0b3e604b14648f9ae52ca2381269c13cf9e1574f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
These are currently unsed and left over bits from cookie-cutter.
Change-Id: I99d143898e2ef8e7dbd6e0c470d6afdba89fc1f7
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>
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>