Change realtime events type from enum to string

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
This commit is contained in:
Venkat Chimata
2025-03-10 10:06:32 +05:30
committed by John Crispin
parent a518b02075
commit d2ff805af6
6 changed files with 7 additions and 170 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}