@takodotid/circuit 0.34.3 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -14
- package/dist/chunks/index-20kcjxjg.js +174 -0
- package/dist/chunks/index-2r4bbhac.js +977 -0
- package/dist/chunks/index-n7w3tg5y.js +149 -0
- package/dist/chunks/new-w3zys5y4.js +172 -0
- package/dist/chunks/server-gzsf5me5.js +259 -0
- package/dist/cli/index.js +11345 -9024
- package/dist/helpers/index.js +594 -0
- package/dist/index.js +9 -28
- package/dist/types/core/{addresses.d.ts → address-space.d.ts} +23 -7
- package/dist/types/core/address.d.ts +44 -0
- package/dist/types/core/cabling.d.ts +41 -0
- package/dist/types/core/cross-checks.d.ts +28 -0
- package/dist/types/core/define.d.ts +25 -3
- package/dist/types/core/project-files.d.ts +12 -0
- package/dist/types/core/schema-docs.d.ts +13 -4
- package/dist/types/core/secrets.d.ts +62 -21
- package/dist/types/core/{graph.d.ts → topology.d.ts} +32 -12
- package/dist/types/core/utils.d.ts +8 -0
- package/dist/types/core/validator.d.ts +19 -0
- package/dist/types/helpers/bgp.d.ts +97 -0
- package/dist/types/helpers/checks.d.ts +32 -0
- package/dist/types/helpers/exchange.d.ts +49 -0
- package/dist/types/helpers/filters.d.ts +51 -0
- package/dist/types/helpers/index.d.ts +10 -0
- package/dist/types/helpers/route-server.d.ts +52 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/integrations/librenms.d.ts +60 -0
- package/dist/types/integrations/netbox.d.ts +89 -0
- package/dist/types/integrations/peeringdb.d.ts +24 -0
- package/dist/types/integrations/prometheus.d.ts +24 -0
- package/dist/types/integrations/registries.d.ts +8 -0
- package/dist/types/platforms/bgp-wait.d.ts +18 -0
- package/dist/types/platforms/catalog.d.ts +109 -0
- package/dist/types/platforms/derive.d.ts +17 -0
- package/dist/types/platforms/fortios/firewall.d.ts +45 -0
- package/dist/types/platforms/fortios/index.d.ts +134 -0
- package/dist/types/platforms/fortios/names.d.ts +52 -0
- package/dist/types/platforms/fortios/plan.d.ts +104 -0
- package/dist/types/platforms/fortios/render.d.ts +75 -0
- package/dist/types/platforms/fortios/routing.d.ts +56 -0
- package/dist/types/platforms/fortios/tree.d.ts +37 -0
- package/dist/types/platforms/index.d.ts +13 -0
- package/dist/types/platforms/junos/bgp.d.ts +44 -0
- package/dist/types/platforms/junos/index.d.ts +114 -0
- package/dist/types/platforms/junos/render.d.ts +154 -0
- package/dist/types/platforms/line-diff.d.ts +67 -0
- package/dist/types/platforms/platform.d.ts +120 -0
- package/dist/types/platforms/raisecom-ros/index.d.ts +71 -0
- package/dist/types/platforms/raisecom-ros/render.d.ts +41 -0
- package/dist/types/platforms/routeros/export.d.ts +59 -0
- package/dist/types/platforms/routeros/index.d.ts +96 -0
- package/dist/types/{adapters/devices → platforms}/routeros/models.d.ts +4 -0
- package/dist/types/platforms/routeros/plan.d.ts +54 -0
- package/dist/types/platforms/routeros/render.d.ts +240 -0
- package/dist/types/platforms/vrp/index.d.ts +83 -0
- package/dist/types/platforms/vrp/render.d.ts +96 -0
- package/dist/types/schema/common.d.ts +12 -6
- package/dist/types/schema/index.d.ts +1 -0
- package/dist/types/schema/interfaces.d.ts +14 -6
- package/dist/types/schema/policy.d.ts +18 -10
- package/dist/types/schema/routing.d.ts +14 -1
- package/dist/types/schema/system.d.ts +16 -6
- package/dist/types/schema/time-zones.d.ts +2 -0
- package/dist/types/transport/console.d.ts +79 -23
- package/dist/types/transport/path-check.d.ts +32 -0
- package/dist/types/transport/ssh.d.ts +17 -15
- package/package.json +17 -11
- package/src/cli/graph-format.ts +91 -0
- package/src/cli/index.ts +1074 -484
- package/src/cli/new.ts +208 -175
- package/src/cli/rename.ts +97 -91
- package/src/core/address-space.ts +320 -0
- package/src/core/address.ts +202 -0
- package/src/core/cabling.ts +154 -0
- package/src/core/cross-checks.ts +364 -0
- package/src/core/define.ts +26 -3
- package/src/core/project-files.ts +35 -0
- package/src/core/schema-docs.ts +138 -130
- package/src/core/secrets.ts +170 -76
- package/src/core/topology.ts +656 -0
- package/src/core/utils.ts +37 -0
- package/src/core/validator.ts +407 -0
- package/src/helpers/bgp.ts +301 -0
- package/src/helpers/checks.ts +178 -0
- package/src/helpers/exchange.ts +117 -0
- package/src/helpers/filters.ts +107 -0
- package/src/helpers/index.ts +12 -0
- package/src/helpers/route-server.ts +212 -0
- package/src/index.ts +6 -3
- package/src/integrations/librenms.ts +291 -0
- package/src/integrations/netbox.ts +620 -0
- package/src/integrations/peeringdb.ts +173 -0
- package/src/integrations/prometheus.ts +90 -0
- package/src/integrations/registries.ts +25 -0
- package/src/platforms/bgp-wait.ts +41 -0
- package/src/platforms/catalog.ts +69 -0
- package/src/platforms/derive.ts +117 -0
- package/src/{adapters/devices → platforms}/fortios/TRAPS.md +6 -0
- package/src/platforms/fortios/firewall.ts +377 -0
- package/src/platforms/fortios/index.ts +1060 -0
- package/src/platforms/fortios/names.ts +130 -0
- package/src/platforms/fortios/plan.ts +929 -0
- package/src/platforms/fortios/render.ts +779 -0
- package/src/platforms/fortios/routing.ts +476 -0
- package/src/platforms/fortios/tree.ts +129 -0
- package/src/platforms/index.ts +36 -0
- package/src/{adapters/devices → platforms}/junos/TRAPS.md +8 -0
- package/src/platforms/junos/bgp.ts +293 -0
- package/src/platforms/junos/index.ts +1006 -0
- package/src/platforms/junos/render.ts +967 -0
- package/src/platforms/line-diff.ts +244 -0
- package/src/platforms/platform.ts +122 -0
- package/src/platforms/raisecom-ros/TRAPS.md +40 -0
- package/src/platforms/raisecom-ros/index.ts +731 -0
- package/src/platforms/raisecom-ros/render.ts +328 -0
- package/src/{adapters/devices → platforms}/routeros/TRAPS.md +16 -2
- package/src/platforms/routeros/export.ts +342 -0
- package/src/platforms/routeros/index.ts +636 -0
- package/src/{adapters/devices → platforms}/routeros/models.ts +2 -0
- package/src/platforms/routeros/plan.ts +444 -0
- package/src/platforms/routeros/render.ts +1483 -0
- package/src/platforms/vrp/TRAPS.md +45 -0
- package/src/platforms/vrp/index.ts +652 -0
- package/src/platforms/vrp/render.ts +615 -0
- package/src/schema/common.ts +15 -6
- package/src/schema/index.ts +1 -0
- package/src/schema/interfaces.ts +15 -5
- package/src/schema/policy.ts +22 -10
- package/src/schema/routing.ts +16 -1
- package/src/schema/system.ts +16 -6
- package/src/schema/time-zones.ts +482 -0
- package/src/studio/data.ts +172 -168
- package/src/studio/git.ts +95 -90
- package/src/studio/public/app.js +161 -150
- package/src/studio/public/compare.js +219 -212
- package/src/studio/public/diff.js +77 -75
- package/src/studio/public/dom.js +118 -108
- package/src/studio/public/evaluate.js +584 -545
- package/src/studio/public/export.js +120 -118
- package/src/studio/public/graph.js +1343 -1266
- package/src/studio/public/net.js +115 -109
- package/src/studio/public/tables.js +1135 -1083
- package/src/studio/public/tools.js +561 -529
- package/src/studio/server.ts +202 -196
- package/src/transport/console.ts +363 -271
- package/src/transport/path-check.ts +91 -0
- package/src/transport/ssh.ts +98 -94
- package/templates/colocation/checks.ts +11 -6
- package/templates/colocation/edge-01.ts +9 -9
- package/templates/colocation/routing.ts +2 -2
- package/templates/colocation/tenancy.ts +3 -3
- package/templates/colocation/tor-01.ts +3 -3
- package/templates/edge-router/checks.ts +4 -4
- package/templates/edge-router/edge-01.ts +5 -5
- package/templates/edge-router/routing.ts +2 -2
- package/templates/project/AGENTS.md +5 -1
- package/templates/single-site/checks.ts +2 -2
- package/dist/chunks/index-47debt16.js +0 -956
- package/dist/chunks/index-v8zgr7wm.js +0 -128
- package/dist/chunks/new-ny89s7y7.js +0 -166
- package/dist/chunks/server-tjbb3rqc.js +0 -251
- package/dist/presets/index.js +0 -394
- package/dist/types/adapters/devices/catalog.d.ts +0 -86
- package/dist/types/adapters/devices/derive.d.ts +0 -7
- package/dist/types/adapters/devices/fortios/firewall.d.ts +0 -23
- package/dist/types/adapters/devices/fortios/index.d.ts +0 -58
- package/dist/types/adapters/devices/fortios/names.d.ts +0 -48
- package/dist/types/adapters/devices/fortios/plan.d.ts +0 -28
- package/dist/types/adapters/devices/fortios/render.d.ts +0 -38
- package/dist/types/adapters/devices/fortios/routing.d.ts +0 -32
- package/dist/types/adapters/devices/fortios/tree.d.ts +0 -33
- package/dist/types/adapters/devices/index.d.ts +0 -3
- package/dist/types/adapters/devices/junos/bgp.d.ts +0 -11
- package/dist/types/adapters/devices/junos/index.d.ts +0 -42
- package/dist/types/adapters/devices/junos/render.d.ts +0 -52
- package/dist/types/adapters/devices/lines.d.ts +0 -56
- package/dist/types/adapters/devices/raisecom-ros/index.d.ts +0 -28
- package/dist/types/adapters/devices/routeros/export.d.ts +0 -39
- package/dist/types/adapters/devices/routeros/index.d.ts +0 -30
- package/dist/types/adapters/devices/routeros/plan.d.ts +0 -4
- package/dist/types/adapters/devices/routeros/render.d.ts +0 -100
- package/dist/types/adapters/devices/types.d.ts +0 -40
- package/dist/types/adapters/devices/vrp/index.d.ts +0 -27
- package/dist/types/adapters/registries/index.d.ts +0 -3
- package/dist/types/adapters/registries/librenms.d.ts +0 -15
- package/dist/types/adapters/registries/peeringdb.d.ts +0 -16
- package/dist/types/adapters/registries/prometheus.d.ts +0 -16
- package/dist/types/core/across.d.ts +0 -4
- package/dist/types/core/addr.d.ts +0 -34
- package/dist/types/core/files.d.ts +0 -6
- package/dist/types/core/merge.d.ts +0 -4
- package/dist/types/core/time.d.ts +0 -2
- package/dist/types/core/validate.d.ts +0 -2
- package/dist/types/presets/index.d.ts +0 -183
- package/src/adapters/devices/catalog.ts +0 -41
- package/src/adapters/devices/derive.ts +0 -59
- package/src/adapters/devices/fortios/firewall.ts +0 -362
- package/src/adapters/devices/fortios/index.ts +0 -923
- package/src/adapters/devices/fortios/names.ts +0 -115
- package/src/adapters/devices/fortios/plan.ts +0 -888
- package/src/adapters/devices/fortios/render.ts +0 -768
- package/src/adapters/devices/fortios/routing.ts +0 -444
- package/src/adapters/devices/fortios/tree.ts +0 -121
- package/src/adapters/devices/index.ts +0 -9
- package/src/adapters/devices/junos/bgp.ts +0 -269
- package/src/adapters/devices/junos/index.ts +0 -862
- package/src/adapters/devices/junos/render.ts +0 -872
- package/src/adapters/devices/lines.ts +0 -212
- package/src/adapters/devices/raisecom-ros/TRAPS.md +0 -26
- package/src/adapters/devices/raisecom-ros/index.ts +0 -700
- package/src/adapters/devices/routeros/export.ts +0 -321
- package/src/adapters/devices/routeros/index.ts +0 -346
- package/src/adapters/devices/routeros/plan.ts +0 -398
- package/src/adapters/devices/routeros/render.ts +0 -1490
- package/src/adapters/devices/types.ts +0 -38
- package/src/adapters/devices/vrp/TRAPS.md +0 -26
- package/src/adapters/devices/vrp/index.ts +0 -865
- package/src/adapters/registries/index.ts +0 -19
- package/src/adapters/registries/librenms.ts +0 -92
- package/src/adapters/registries/peeringdb.ts +0 -169
- package/src/adapters/registries/prometheus.ts +0 -71
- package/src/cli/graph.ts +0 -89
- package/src/core/across.ts +0 -350
- package/src/core/addr.ts +0 -174
- package/src/core/addresses.ts +0 -316
- package/src/core/files.ts +0 -32
- package/src/core/graph.ts +0 -640
- package/src/core/merge.ts +0 -19
- package/src/core/time.ts +0 -15
- package/src/core/validate.ts +0 -348
- package/src/presets/index.ts +0 -579
- /package/dist/types/{adapters/devices → platforms}/fortios/models.d.ts +0 -0
- /package/dist/types/{adapters/devices → platforms}/junos/models.d.ts +0 -0
- /package/dist/types/{adapters/devices → platforms}/raisecom-ros/models.d.ts +0 -0
- /package/dist/types/{adapters/devices → platforms}/vrp/models.d.ts +0 -0
- /package/src/{adapters/devices → platforms}/fortios/models.ts +0 -0
- /package/src/{adapters/devices → platforms}/junos/models.ts +0 -0
- /package/src/{adapters/devices → platforms}/raisecom-ros/models.ts +0 -0
- /package/src/{adapters/devices → platforms}/vrp/models.ts +0 -0
package/src/schema/interfaces.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InterfaceAddress, IP, MacAddress, Prefix, Secret } from "./common";
|
|
2
2
|
|
|
3
3
|
/** A VLAN. Its key in `vlans` is its name. */
|
|
4
4
|
export type Vlan = {
|
|
@@ -11,6 +11,9 @@ export type Vlan = {
|
|
|
11
11
|
/** A storm-control threshold: packets per second, or percent of the link's speed. */
|
|
12
12
|
export type Threshold = { pps: number } | { percent: number };
|
|
13
13
|
|
|
14
|
+
/** A kind of frame, by the ethertype in its header: `ipv4` is 0x0800, `ipv6` 0x86DD, `arp` 0x0806. */
|
|
15
|
+
export type Ethertype = "ipv4" | "ipv6" | "arp";
|
|
16
|
+
|
|
14
17
|
/** A virtual router address shared with other devices on the same segment, RFC 5798. */
|
|
15
18
|
export type Vrrp = {
|
|
16
19
|
/** Virtual router number, 1 to 255. The same on every device sharing the address. */
|
|
@@ -28,7 +31,7 @@ export type Vrrp = {
|
|
|
28
31
|
/** Layer 3 settings shared by every interface that can have an address. */
|
|
29
32
|
export type Routed<F extends string> = {
|
|
30
33
|
/** Addresses with their length. Use `{ address, peer }` for a point-to-point address whose far end is outside its own prefix. */
|
|
31
|
-
addresses?: readonly (
|
|
34
|
+
addresses?: readonly (InterfaceAddress | { address: InterfaceAddress; peer: IP })[];
|
|
32
35
|
/** Send IPv6 router advertisements on this interface. Off when absent. */
|
|
33
36
|
ipv6_ra?: boolean;
|
|
34
37
|
/** Overrides the device's `hardware_offload` for traffic routed through this interface. Software forwarding is what makes the firewall apply. */
|
|
@@ -77,6 +80,10 @@ export type Switched<V extends string> = {
|
|
|
77
80
|
multicast?: Threshold;
|
|
78
81
|
unknown_unicast?: Threshold;
|
|
79
82
|
};
|
|
83
|
+
/** The most MAC addresses this port or LAG learns, 1 or more. Frames from any other source address are dropped. An exchange sets 1 on a member port, so each member sends from one router only. No limit when absent. */
|
|
84
|
+
mac_limit?: number;
|
|
85
|
+
/** The only kinds of frame this port or LAG takes in; any other kind is dropped. An exchange takes `ipv4`, `ipv6` and `arp` on a member port. Every kind when absent. */
|
|
86
|
+
ethertypes?: readonly Ethertype[];
|
|
80
87
|
};
|
|
81
88
|
|
|
82
89
|
/** The other end of a cable: another device and its port. Both ends must agree on how they are switched. */
|
|
@@ -122,7 +129,7 @@ export type VlanInterface<V extends string, F extends string> = Base<F> & {
|
|
|
122
129
|
/**
|
|
123
130
|
* A MAC address of its own, instead of the one it shares with the device's other VLAN interfaces. A gateway in front of a transparent firewall needs one: frames to it come back on another VLAN, where the bridge would otherwise take a shared MAC for its own and keep them.
|
|
124
131
|
*/
|
|
125
|
-
mac?:
|
|
132
|
+
mac?: MacAddress;
|
|
126
133
|
};
|
|
127
134
|
|
|
128
135
|
/** An interface that is always up and is on no link, for addresses that must not depend on one. */
|
|
@@ -159,9 +166,12 @@ export type Vxlan<F extends string> = Base<F> & {
|
|
|
159
166
|
/** UDP port. 4789 when absent. */
|
|
160
167
|
port?: number;
|
|
161
168
|
/** Fixed MAC address, so a rebuild keeps the one the far side learned. */
|
|
162
|
-
mac?:
|
|
169
|
+
mac?: MacAddress;
|
|
163
170
|
};
|
|
164
171
|
|
|
172
|
+
/** A host and a UDP port, `host:port`, for example `203.0.113.10:51820` or `vpn.example.net:51820`. */
|
|
173
|
+
export type Endpoint = `${string}:${number}`;
|
|
174
|
+
|
|
165
175
|
/** One peer of a WireGuard interface. */
|
|
166
176
|
export type WireGuardPeer = {
|
|
167
177
|
/** Who or what the peer is. */
|
|
@@ -171,7 +181,7 @@ export type WireGuardPeer = {
|
|
|
171
181
|
/** Addresses the peer may send from and that are routed to it. */
|
|
172
182
|
allowed_addresses: readonly Prefix[];
|
|
173
183
|
/** `host:port`, for a peer this side dials. The peer dials in when absent. */
|
|
174
|
-
endpoint?:
|
|
184
|
+
endpoint?: Endpoint;
|
|
175
185
|
/** Seconds between keepalives, for a peer behind NAT. None when absent. */
|
|
176
186
|
keepalive?: number;
|
|
177
187
|
/** What a generated client config routes into the tunnel. Affects no forwarding here. */
|
package/src/schema/policy.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { Family, IP, Prefix } from "./common";
|
|
2
2
|
|
|
3
|
+
/** A standard BGP community, `asn:value`, for example `64500:100`. Each part is 0 to 65535. */
|
|
4
|
+
export type StandardCommunity = `${number}:${number}`;
|
|
5
|
+
|
|
6
|
+
/** A large BGP community, `asn:function:parameter`, for example `64500:1:6939`. Each part is 0 to 4294967295. */
|
|
7
|
+
export type LargeCommunity = `${number}:${number}:${number}`;
|
|
8
|
+
|
|
9
|
+
/** A standard community to remove. `*` stands for any value of a part, as in `64500:*`. */
|
|
10
|
+
export type StandardCommunityPattern = `${number | "*"}:${number | "*"}`;
|
|
11
|
+
|
|
12
|
+
/** A large community to remove. `*` stands for any value of a part, as in `64500:*:*`. */
|
|
13
|
+
export type LargeCommunityPattern = `${number | "*"}:${number | "*"}:${number | "*"}`;
|
|
14
|
+
|
|
3
15
|
/** Registries a prefix set can be fetched from. */
|
|
4
16
|
export type Registry = "ripe-stat";
|
|
5
17
|
|
|
@@ -37,9 +49,9 @@ export type Match<S extends string> = {
|
|
|
37
49
|
/** The route's origin validation state. */
|
|
38
50
|
rpki?: "valid" | "invalid" | "not-found";
|
|
39
51
|
/** Has this standard community, `asn:value`. */
|
|
40
|
-
community?:
|
|
52
|
+
community?: StandardCommunity;
|
|
41
53
|
/** Has this large community, `asn:function:parameter`. */
|
|
42
|
-
large_community?:
|
|
54
|
+
large_community?: LargeCommunity;
|
|
43
55
|
};
|
|
44
56
|
|
|
45
57
|
/** Changes to a route. In community lists to remove, `*` stands for any value of a field, as in `64500:*:*`. */
|
|
@@ -51,17 +63,17 @@ export type Sets = {
|
|
|
51
63
|
/** Prepend our own AS this many times, to make the path look longer. */
|
|
52
64
|
prepend?: number;
|
|
53
65
|
/** Replace the route's standard communities with these. */
|
|
54
|
-
communities?: readonly
|
|
66
|
+
communities?: readonly StandardCommunity[];
|
|
55
67
|
/** Add these standard communities. */
|
|
56
|
-
add_communities?: readonly
|
|
57
|
-
/** Remove standard communities matching these. */
|
|
58
|
-
remove_communities?: readonly
|
|
68
|
+
add_communities?: readonly StandardCommunity[];
|
|
69
|
+
/** Remove standard communities matching these. A part may be `*`. */
|
|
70
|
+
remove_communities?: readonly StandardCommunityPattern[];
|
|
59
71
|
/** Replace the route's large communities with these. */
|
|
60
|
-
large_communities?: readonly
|
|
72
|
+
large_communities?: readonly LargeCommunity[];
|
|
61
73
|
/** Add these large communities. */
|
|
62
|
-
add_large_communities?: readonly
|
|
63
|
-
/** Remove large communities matching these. */
|
|
64
|
-
remove_large_communities?: readonly
|
|
74
|
+
add_large_communities?: readonly LargeCommunity[];
|
|
75
|
+
/** Remove large communities matching these. A part may be `*`. */
|
|
76
|
+
remove_large_communities?: readonly LargeCommunityPattern[];
|
|
65
77
|
/** Next hop for the route. */
|
|
66
78
|
next_hop?: IP;
|
|
67
79
|
/** Source address for traffic the device itself sends to the route. Applies to routes of the same family as the address. */
|
package/src/schema/routing.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type StaticRoute<I extends string, F extends string> = {
|
|
|
10
10
|
interface?: I;
|
|
11
11
|
/** Discard matching traffic. The usual way to originate an aggregate. */
|
|
12
12
|
blackhole?: true;
|
|
13
|
+
/** Withdraw the route while BFD finds `via` dead, and put it back once `via` answers again. Needs `via`. */
|
|
14
|
+
bfd?: true;
|
|
13
15
|
/** Preference against other routes to the same prefix. Lower wins. 1 when absent. */
|
|
14
16
|
distance?: number;
|
|
15
17
|
/** The VRF the route is in. The default table when absent. */
|
|
@@ -75,6 +77,14 @@ export type Bgp<P extends string, G extends string> = {
|
|
|
75
77
|
neighbors?: Record<string, Neighbor<P, G>>;
|
|
76
78
|
};
|
|
77
79
|
|
|
80
|
+
/** How fast BFD notices a dead neighbor: after `multiplier` packets in a row are missed, so in `interval` times `multiplier` milliseconds. */
|
|
81
|
+
export type Bfd = {
|
|
82
|
+
/** Milliseconds between the packets this device sends, and the shortest gap it asks of the neighbor. */
|
|
83
|
+
interval: number;
|
|
84
|
+
/** How many packets in a row may be missed before the neighbor is declared down. */
|
|
85
|
+
multiplier: number;
|
|
86
|
+
};
|
|
87
|
+
|
|
78
88
|
/** A route origin validation server, RFC 8210. */
|
|
79
89
|
export type RpkiServer = {
|
|
80
90
|
/** Where the validator listens. */
|
|
@@ -97,12 +107,15 @@ export type OspfInterface = {
|
|
|
97
107
|
bfd?: boolean;
|
|
98
108
|
};
|
|
99
109
|
|
|
110
|
+
/** An OSPF area ID, written as four numbers with dots between them, for example `0.0.0.0` for the backbone. */
|
|
111
|
+
export type OspfAreaId = `${number}.${number}.${number}.${number}`;
|
|
112
|
+
|
|
100
113
|
/** OSPF, version 2 for IPv4 and version 3 for IPv6. */
|
|
101
114
|
export type Ospf<I extends string> = {
|
|
102
115
|
/** Which versions run. IPv4 when absent. */
|
|
103
116
|
families?: readonly Family[];
|
|
104
117
|
/** Areas keyed by area ID, for example `0.0.0.0`, each with the interfaces in it. */
|
|
105
|
-
areas: Record<
|
|
118
|
+
areas: Record<OspfAreaId, { interfaces: Partial<Record<I, OspfInterface>> }>;
|
|
106
119
|
/** Routes from other sources announced into OSPF. */
|
|
107
120
|
redistribute?: readonly ("connected" | "static")[];
|
|
108
121
|
};
|
|
@@ -119,4 +132,6 @@ export type Routing<P extends string, G extends string, I extends string, F exte
|
|
|
119
132
|
ospf?: Ospf<I>;
|
|
120
133
|
/** Validators answering route origin validation. */
|
|
121
134
|
rpki?: readonly RpkiServer[];
|
|
135
|
+
/** BFD timers for every BFD session on the device: BGP, OSPF and static routes. The platform's own when absent; Junos has none, so Circuit sends every 300 ms there. Both ends of a link should agree. */
|
|
136
|
+
bfd?: Bfd;
|
|
122
137
|
};
|
package/src/schema/system.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type { IP, Prefix, Secret, Severity } from "./common";
|
|
1
|
+
import type { IP, MacAddress, Prefix, Secret, Severity } from "./common";
|
|
2
|
+
import type { TimeZone } from "./time-zones";
|
|
3
|
+
|
|
4
|
+
/** A software release track, as RouterOS names them. `long-term` changes least; `development` is the newest and least tested. */
|
|
5
|
+
export type ReleaseChannel = "long-term" | "stable" | "testing" | "development";
|
|
6
|
+
|
|
7
|
+
/** How bad an alarm is, most severe first, as ITU-T X.733 ranks them. */
|
|
8
|
+
export type AlarmSeverity = "critical" | "major" | "minor" | "warning";
|
|
2
9
|
|
|
3
10
|
/** Device-wide settings. */
|
|
4
11
|
export type System = {
|
|
5
|
-
/** IANA zone, for example `Asia/Jakarta`. UTC when absent. */
|
|
6
|
-
timezone?:
|
|
12
|
+
/** IANA zone, for example `Asia/Jakarta`. The editor suggests every name. UTC when absent. */
|
|
13
|
+
timezone?: TimeZone;
|
|
7
14
|
/** Shown at login. */
|
|
8
15
|
banner?: string;
|
|
9
16
|
/** Resolvers the device uses. */
|
|
@@ -40,8 +47,10 @@ export type System = {
|
|
|
40
47
|
level: Severity;
|
|
41
48
|
}[];
|
|
42
49
|
};
|
|
43
|
-
/** Software release track the device updates from. */
|
|
44
|
-
release_channel?:
|
|
50
|
+
/** Software release track the device updates from. `stable` when absent. */
|
|
51
|
+
release_channel?: ReleaseChannel;
|
|
52
|
+
/** Alarms raised at another severity than the platform's own, keyed by the alarm's name as the platform spells it, such as `hwOpticalUnAuthorized` on VRP. */
|
|
53
|
+
alarms?: Record<string, { severity: AlarmSeverity }>;
|
|
45
54
|
/** Read optic temperature, power and voltage. */
|
|
46
55
|
transceiver_monitoring?: boolean;
|
|
47
56
|
/** Host behaviour of the IP stack. */
|
|
@@ -154,7 +163,8 @@ export type DhcpServer<I extends string> = {
|
|
|
154
163
|
/** Addresses fixed to a MAC. */
|
|
155
164
|
reservations?: readonly {
|
|
156
165
|
address: IP;
|
|
157
|
-
|
|
166
|
+
/** The client's MAC address. */
|
|
167
|
+
mac: MacAddress;
|
|
158
168
|
/** Whose address it is. */
|
|
159
169
|
description?: string;
|
|
160
170
|
}[];
|