From d2ff805af6385f26b9cdd23bbdf98aaaf5ec14fa Mon Sep 17 00:00:00 2001 From: Venkat Chimata Date: Mon, 10 Mar 2025 10:06:32 +0530 Subject: [PATCH] Change realtime events type from enum to string Signed-off-by: Venkat Chimata --- schema/metrics.realtime.yml | 19 ---------------- schema/metrics.telemetry.yml | 20 +--------------- schemareader.uc | 6 ----- ucentral.schema.full.json | 44 ++---------------------------------- ucentral.schema.json | 44 ++---------------------------------- ucentral.schema.pretty.json | 44 ++---------------------------------- 6 files changed, 7 insertions(+), 170 deletions(-) diff --git a/schema/metrics.realtime.yml b/schema/metrics.realtime.yml index 82ff4f3..49b61bf 100644 --- a/schema/metrics.realtime.yml +++ b/schema/metrics.realtime.yml @@ -8,22 +8,3 @@ properties: type: array items: type: string - enum: - - ssh - - health - - health.dns - - health.dhcp - - health.radius - - health.memory - - client - - client.join - - client.leave - - client.key-mismatch - - wifi - - wifi.start - - wifi.stop - - wired - - wired.carrier-up - - wired.carrier-down - - unit - - unit.boot-up diff --git a/schema/metrics.telemetry.yml b/schema/metrics.telemetry.yml index 0f86038..6456f9b 100644 --- a/schema/metrics.telemetry.yml +++ b/schema/metrics.telemetry.yml @@ -12,22 +12,4 @@ properties: type: array items: type: string - enum: - - ssh - - health - - health.dns - - health.dhcp - - health.radius - - health.memory - - client - - client.join - - client.leave - - client.key-mismatch - - wifi - - wifi.start - - wifi.stop - - wired - - wired.carrier-up - - wired.carrier-down - - unit - - unit.boot-up + diff --git a/schemareader.uc b/schemareader.uc index 3bbcb22..ef80f30 100644 --- a/schemareader.uc +++ b/schemareader.uc @@ -10226,9 +10226,6 @@ function instantiateMetricsTelemetry(location, value, errors) { if (type(value) != "string") push(errors, [ location, "must be of type string" ]); - if (!(value in [ "ssh", "health", "health.dns", "health.dhcp", "health.radius", "health.memory", "client", "client.join", "client.leave", "client.key-mismatch", "wifi", "wifi.start", "wifi.stop", "wired", "wired.carrier-up", "wired.carrier-down", "unit", "unit.boot-up" ])) - push(errors, [ location, "must be one of \"ssh\", \"health\", \"health.dns\", \"health.dhcp\", \"health.radius\", \"health.memory\", \"client\", \"client.join\", \"client.leave\", \"client.key-mismatch\", \"wifi\", \"wifi.start\", \"wifi.stop\", \"wired\", \"wired.carrier-up\", \"wired.carrier-down\", \"unit\" or \"unit.boot-up\"" ]); - return value; } @@ -10264,9 +10261,6 @@ function instantiateMetricsRealtime(location, value, errors) { if (type(value) != "string") push(errors, [ location, "must be of type string" ]); - if (!(value in [ "ssh", "health", "health.dns", "health.dhcp", "health.radius", "health.memory", "client", "client.join", "client.leave", "client.key-mismatch", "wifi", "wifi.start", "wifi.stop", "wired", "wired.carrier-up", "wired.carrier-down", "unit", "unit.boot-up" ])) - push(errors, [ location, "must be one of \"ssh\", \"health\", \"health.dns\", \"health.dhcp\", \"health.radius\", \"health.memory\", \"client\", \"client.join\", \"client.leave\", \"client.key-mismatch\", \"wifi\", \"wifi.start\", \"wifi.stop\", \"wired\", \"wired.carrier-up\", \"wired.carrier-down\", \"unit\" or \"unit.boot-up\"" ]); - return value; } diff --git a/ucentral.schema.full.json b/ucentral.schema.full.json index 3dd0850..ab58428 100644 --- a/ucentral.schema.full.json +++ b/ucentral.schema.full.json @@ -4867,27 +4867,7 @@ "description": "The event types that get added to telemetry.", "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } } @@ -4900,27 +4880,7 @@ "description": "The event types that get added to telemetry.", "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } } diff --git a/ucentral.schema.json b/ucentral.schema.json index 1493493..d41efa9 100644 --- a/ucentral.schema.json +++ b/ucentral.schema.json @@ -3868,27 +3868,7 @@ "types": { "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } } @@ -3899,27 +3879,7 @@ "types": { "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } } diff --git a/ucentral.schema.pretty.json b/ucentral.schema.pretty.json index 10d464e..bfc8661 100644 --- a/ucentral.schema.pretty.json +++ b/ucentral.schema.pretty.json @@ -4409,27 +4409,7 @@ "description": "The event types that get added to telemetry.", "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } } @@ -4442,27 +4422,7 @@ "description": "The event types that get added to telemetry.", "type": "array", "items": { - "type": "string", - "enum": [ - "ssh", - "health", - "health.dns", - "health.dhcp", - "health.radius", - "health.memory", - "client", - "client.join", - "client.leave", - "client.key-mismatch", - "wifi", - "wifi.start", - "wifi.stop", - "wired", - "wired.carrier-up", - "wired.carrier-down", - "unit", - "unit.boot-up" - ] + "type": "string" } } }