Skip to content
Snippets Groups Projects
Commit e28c5ac2 authored by Release Webservice's avatar Release Webservice
Browse files

Finished release 0.6.

parents f9ce205e 45a2095f
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@
"search": true,
"starred": false,
"tags": [
"IAS_UPSTREAM"
"UPSTREAM"
],
"targets": [
{
......
......@@ -20,7 +20,7 @@ from brian_dashboard_manager.templating.nren_access import generate_nrens
from brian_dashboard_manager.templating.helpers import is_re_customer, \
is_cls_peer, is_cls, is_ias_customer, is_ias_private, is_ias_public, \
is_ias_upstream, is_ias_peer, is_lag_backbone, is_nren, is_phy_upstream, \
is_re_peer, is_gcs, is_geantopen, is_l2circuit, is_lhcone_peer, \
is_re_peer, is_gcs, is_cae1, is_geantopen, is_l2circuit, is_lhcone_peer, \
is_lhcone_customer, is_lhcone, is_mdvpn, get_aggregate_dashboard_data, \
get_interface_data, parse_backbone_name, parse_phy_upstream_name, \
get_dashboard_data, get_aggregate_interface_data
......@@ -196,11 +196,11 @@ def provision(config):
},
'IAS UPSTREAM': {
'predicate': is_ias_upstream,
'tag': 'IAS_UPSTREAM'
'tag': ['IAS_UPSTREAM', 'UPSTREAM']
},
'GWS PHY Upstream': {
'predicate': is_phy_upstream,
'tag': 'GWS_UPSTREAM',
'tag': ['GWS_UPSTREAM', 'UPSTREAM'],
'errors': True,
'parse_func': parse_phy_upstream_name
}
......@@ -233,10 +233,10 @@ def provision(config):
'predicate': is_lhcone,
'tag': 'lhcone',
},
# 'CAE1': {
# 'predicate': is_cae1,
# 'tag': 'cae',
# }
'CAE1': {
'predicate': is_cae1,
'tag': 'cae',
}
}
with ProcessPoolExecutor(max_workers=4) as executor:
......@@ -264,7 +264,7 @@ def provision(config):
if dashboard['title'] not in excluded_dashboards:
if dashboard['title'].lower() == 'home':
dashboard['uid'] = 'home'
create_dashboard(token_request, dashboard)
create_dashboard(token_request, dashboard)
# Home dashboard is always called "Home"
# Make sure it's set for the organization
......
......@@ -113,7 +113,10 @@ def is_lag_backbone(interface):
def is_cae1(interface):
return interface.get('router', '').lower() == 'mx1.lon.uk.geant.net'
iface_regex = r'^ae12(\.\d+|$)$'
is_router = interface.get('router', '').lower() == 'mx1.lon.uk.geant.net'
is_iface = re.match(iface_regex, interface.get('name'))
return is_router and is_iface
def parse_backbone_name(description, *args, **kwargs):
......@@ -329,14 +332,19 @@ def get_dashboard_data(data, datasource, tag, errors=False):
return result
for peer, panels in data.items():
yield {
result = {
'title': peer,
'datasource': datasource,
'panels': get_panel_definitions(panels, datasource),
'tag': tag
}
if isinstance(tag, list):
result['tags'] = tag
else:
result['tag'] = tag
yield result
def create_aggregate_panel(title, gridpos, targets, datasource):
......@@ -409,9 +417,15 @@ def get_aggregate_dashboard_data(title, targets, datasource, tag):
title + f' - {target}', gridPos, targets[target], datasource)
panels.extend([_in, _out])
return {
result = {
'title': title,
'datasource': datasource,
'panels': panels,
'tag': tag
}
if isinstance(tag, list):
result['tags'] = tag
else:
result['tag'] = tag
return result
......@@ -17,7 +17,15 @@
"graphTooltip": 0,
"schemaVersion": 27,
"style": "dark",
{% if not tags %}
"tags": ["{{ tag }}"],
{% else %}
"tags": [
{% for tag in tags %}
"{{ tag }}"{{ "," if not loop.last }}
{% endfor %}
],
{% endif %}
"templating": {
"list": []
},
......
......@@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
## [0.6] - 2021-03-10
- Added CAE1 and updated handling of IAS Upstream tags
## [0.5] - 2021-03-10
- Added provisioning of aggregate dashboards with many targets
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='brian-dashboard-manager',
version="0.5",
version="0.6",
author='GEANT',
author_email='swd@geant.org',
description='',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment