Separate types for CryptoKind and VeilidCapability

This commit is contained in:
Brandon Vandegrift 2025-05-26 08:38:11 -05:00
parent a6724d014b
commit e62d32aea1
47 changed files with 268 additions and 243 deletions

View file

@ -2,7 +2,7 @@ from dataclasses import dataclass, fields
from enum import StrEnum
from typing import Optional, Self
from .types import TypedKey, TypedSecret, Capability
from .types import TypedKey, TypedSecret, VeilidCapability
class VeilidConfigLogLevel(StrEnum):
@ -41,7 +41,7 @@ class ConfigBase:
@dataclass
class VeilidConfigCapabilities(ConfigBase):
disable: list[Capability]
disable: list[VeilidCapability]
@dataclass

View file

@ -3127,17 +3127,6 @@
}
}
},
"FourCC": {
"description": "FOURCC code.",
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"maxItems": 4,
"minItems": 4
},
"LatencyStats": {
"description": "Measurement of communications latency to this node over all RPC questions",
"type": "object",
@ -3954,6 +3943,16 @@
}
]
},
"VeilidCapability": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"maxItems": 4,
"minItems": 4
},
"VeilidConfig": {
"description": "Top level of the Veilid configuration tree",
"type": "object",
@ -4057,7 +4056,7 @@
"disable": {
"type": "array",
"items": {
"$ref": "#/definitions/FourCC"
"$ref": "#/definitions/VeilidCapability"
}
}
}

View file

@ -52,7 +52,7 @@ class CryptoKind(StrEnum):
CRYPTO_KIND_VLD0 = "VLD0"
class Capability(StrEnum):
class VeilidCapability(StrEnum):
CAP_ROUTE = "ROUT"
CAP_TUNNEL = "TUNL"
CAP_SIGNAL = "SGNL"