fix(ospf): подтвердить права и результат оптимизации на RouterOS

This commit is contained in:
Denozordec committed 2026-10-09 20:40:24 +07:00
1 parent 3bfd4ae6cf
commit 36c6a21ca5
19 files changed
+1069 -15

No files matched your search

+7 -3
View File
@@ -3,6 +3,7 @@ import https from "node:https"
import { randomBytes } from "node:crypto"
import type { Server } from "../db/schema.js"
import { parseRosDataSizeBytes } from "./ros-metric-parse.js"
import { readOspfEffectiveDisabled } from "./ospf-effective-disabled.js"
import type {
RosIdentity, RosInterface, RosIpAddress, RosResource,
RosBgpSession,
@@ -639,15 +640,18 @@ export class MikrotikClient {
}
async getOspfAreas(): Promise<RosOspfArea[]> {
return this.get<RosOspfArea[]>("/routing/ospf/area")
return readOspfEffectiveDisabled<RosOspfArea>(await this.get<unknown>("/routing/ospf/area"), id =>
this.post("/routing/ospf/area/get", { ".id": id, "value-name": "disabled" }))
}
async getOspfInterfaceTemplates(): Promise<RosOspfInterfaceTemplate[]> {
return this.get<RosOspfInterfaceTemplate[]>("/routing/ospf/interface-template")
return readOspfEffectiveDisabled<RosOspfInterfaceTemplate>(await this.get<unknown>("/routing/ospf/interface-template"), id =>
this.post("/routing/ospf/interface-template/get", { ".id": id, "value-name": "disabled" }))
}
async getOspfInstances(): Promise<RosOspfInstance[]> {
return this.get<RosOspfInstance[]>("/routing/ospf/instance")
return readOspfEffectiveDisabled<RosOspfInstance>(await this.get<unknown>("/routing/ospf/instance"), id =>
this.post("/routing/ospf/instance/get", { ".id": id, "value-name": "disabled" }))
}
async getBfdSessions(): Promise<RosBfdSession[]> {