blob: afd1cc7920b2164ad220fc4b9e0ddee6df28e702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from typing import List, Optional, Union
from knot_resolver.datamodel.types import DomainName, IPAddressOptionalPort, PolicyFlagEnum
from knot_resolver.utils.modeling import ConfigSchema
class StubServerSchema(ConfigSchema):
"""
Configuration of Stub server.
---
address: IP address of Stub server.
"""
address: IPAddressOptionalPort
class StubZoneSchema(ConfigSchema):
"""
Configuration of Stub Zone.
---
subtree: Domain name of the zone.
servers: IP address of Stub server.
views: Use this Stub Zone only for clients defined by views.
options: Configuration flags for Stub Zone.
"""
subtree: DomainName
servers: Union[List[IPAddressOptionalPort], List[StubServerSchema]]
views: Optional[List[str]] = None
options: Optional[List[PolicyFlagEnum]] = None
|