{ "__inputs": [ { "name": "DS_YARDSTICK", "label": "yardstick", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "4.4.3" }, { "type": "panel", "id": "graph", "name": "Graph", "version": "" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "text", "name": "Text", "version": "" } ], "annotations": { "list": [] }, "editable": true, "gnetId": null, "graphTooltip": 0, "hideControls": false, "id": null, "links": [], "refresh": false, "rows": [ { "collapse": false, "height": "100px", "panels": [ { "content": "
OPNFV_Yardstick_NSB_PROX_Heat_vPE_4Port_Test
\n
\n

The vPE handles packet processing, routing, QinQ encapsulation, flows, ACL rules, adds/removes MPLS tags and performs QoS

\n

The KPI is the number of packets per second for a specified packet size (min packet size is 68 byte) with an accepted minimal packet loss

\n
", "editable": true, "error": false, "id": 3, "links": [], "mode": "html", "span": 12, "title": "", "type": "text" }, { "content": "
Prox vPE VNF stats
\n", "editable": true, "error": false, "height": "40", "id": 7, "links": [], "mode": "html", "span": 12, "title": "", "type": "text" } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, "showTitle": false, "title": "Row", "titleSize": "h6" }, { "collapse": false, "height": "300px", "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_YARDSTICK}", "editable": true, "error": false, "fill": 1, "grid": {}, "height": "300", "id": 4, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 1, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "span": 12, "stack": false, "steppedLine": false, "targets": [ { "alias": "VNF packets Forward", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "vnf__0.packets_fwd" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "VNF packets in", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "vnf__0.packets_in" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "VNF packets dropped", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "ti
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2018 Mirantis Inc., Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Sun, 03 Dec 2017 22:03:01 +0200
Subject: [PATCH] reclass.storage.node: Merge duplicate nodes

Reclass does not support duplicate nodes in top pillar, so merge all
nodes with the same name into a single node, inheriting classes from
all instances.

This allows using multiple "system.reclass.storage.system.*_cluster"
classes for the same node, based on re-using the name (hostname).

NOTE: defaults.merge module does not merge lists (e.g. for classes),
so handle that case separately.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---

diff --git a/reclass/storage/node.sls b/reclass/storage/node.sls
--- a/reclass/storage/node.sls
+++ b/reclass/storage/node.sls
@@ -1,7 +1,15 @@
 {%- from "reclass/map.jinja" import storage with context %}
 {%- if storage.enabled %}

+{%- set storage_by_name = {} %}
 {%- for node_name, node in storage.get('node', {}).iteritems() %}
+{%- set new_node_name = node.get('name', node_name) %}
+{%- set new_node = storage_by_name.get(new_node_name, {'classes': []}) %}
+{%- do salt['defaults.merge'](node, {'classes': new_node.classes + node.classes}) %}
+{%- do salt['defaults.merge'](storage_by_name, {new_node_name: node}) %}
+{%- endfor %}
+
+{%- for node_name, node in storage_by_name.iteritems() %}

 {%- if node.repeat is defined %}
{ "alias": "TG xe-2 in packets", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "tg__0.xe2.in_packets" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "TG xe-3 in packets", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "D", "resultFormat": "time_series", "select": [ [ { "params": [ "tg__0.xe3.in_packets" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [ { "colorMode": "custom", "fill": true, "fillColor": "rgba(216, 200, 27, 0.27)", "op": "gt", "value": 2 }, { "colorMode": "custom", "fill": true, "fillColor": "rgba(234, 112, 112, 0.22)", "op": "gt", "value": 2 } ], "timeFrom": null, "timeShift": null, "title": "TG Port Stats: In packets", "tooltip": { "msResolution": true, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Packets", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, "showTitle": false, "title": "New row", "titleSize": "h6" }, { "collapse": false, "height": "250px", "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_YARDSTICK}", "editable": true, "error": false, "fill": 1, "grid": {}, "id": 2, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "span": 6, "stack": false, "steppedLine": false, "targets": [ { "alias": "TX Throughput", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "tg__0.TxThroughput" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "RX Throughput", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "tg__0.RxThroughput" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [ { "colorMode": "custom", "fill": true, "fillColor": "rgba(216, 200, 27, 0.27)", "op": "gt", "value": 2 }, { "colorMode": "custom", "fill": true, "fillColor": "rgba(234, 112, 112, 0.22)", "op": "gt", "value": 2 } ], "timeFrom": null, "timeShift": null, "title": "TG Tx vs Rx Throughput", "tooltip": { "msResolution": true, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Throughput in MPPS", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_YARDSTICK}", "editable": true, "error": false, "fill": 1, "grid": {}, "id": 5, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "span": 6, "stack": false, "steppedLine": false, "targets": [ { "alias": "Packet Size", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_vpe-4", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "tg__0.PktSize" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [ { "colorMode": "custom", "fill": true, "fillColor": "rgba(216, 200, 27, 0.27)", "op": "gt", "value": 2 }, { "colorMode": "custom", "fill": true, "fillColor": "rgba(234, 112, 112, 0.22)", "op": "gt", "value": 2 } ], "timeFrom": null, "timeShift": null, "title": "Packet size", "tooltip": { "msResolution": true, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "label": "Packet Size", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "repeat": null, "repeatIteration": null, "repeatRowId": null, "showTitle": false, "title": "New row", "titleSize": "h6" }, { "collapse": false, "height": "250px", "panels": [], "repeat": null, "repeatIteration": null, "repeatRowId": null, "showTitle": false, "title": "New row", "titleSize": "h6" } ], "schemaVersion": 14, "style": "dark", "tags": [ "yardstick", "NSB", "Prox", "4Port", "vPE", "Heat" ], "templating": { "list": [] }, "time": { "from": "2017-10-09T10:53:53.915Z", "to": "2017-10-09T11:00:04.248Z" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "browser", "title": "Prox_Heat_vPE-4Port", "version": 12 }