dashboards_backup script compatibility update for Grafana version >=8:
The dashboards_backup script was using Slug API for retrieving the
dashboards, which is deprecated in Grafana version '5.4.0' in favor
of UID API, and removed in version '8.0.0'. Due to that, the backup
script was failing to generate backups in version 8.0.0 and above.
This fix introduces an API switch mechanism between Slug API and
UID API, which allows the script to behave as before for Grafana
(< 8.0.0) and use UID API for Grafana version (>= 8.0.0).
dashboards_backup script compatibility update for grafana version >=8:
The dashboards_backup script was using Slug API for retrieving the
dashboards, which is deprecated in Grafana version '5.4.0' in favor
of UID API, and removed in version '8.0.0'. Due to that, the backup
script was failing to generate backups in version 8.0.0 and above.
This fix introduces an API switch mechanism between Slug API and
UID API, which allows script to behave as before for Grafana
(< 8.0.0) and use UID API for Grafana version (>= 8.0.0).
In order to test that upgraded telegraf charms propagate changes in the
dashboard templates to Grafana, the functional tests verify that a
single dashboard exists with the keyword "FunctionalTestMarker".
However, in recent changes, the template is now rendered twice (metrics
by application and metrics by host).
The assert on test_11_dashboard_upgrade now reflects "one or more"
instead of "one".