mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-09 17:10:46 +08:00
Merge nms+common into ops so login questions load execManagedNe.
One capability group now ships netx-ops (alarms + managed CLI + paths); keep tools-nms/common as aliases. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6e591be2b5
commit
63f88bdf6c
33 changed files with 2133 additions and 446 deletions
|
|
@ -1,11 +1,10 @@
|
|||
// src/netx/capability-groups.ts
|
||||
var DEFAULT_CAPABILITY_GROUPS = Object.freeze({
|
||||
nms: Object.freeze({ inPreset: true, public: false }),
|
||||
common: Object.freeze({ inPreset: true, public: false }),
|
||||
ops: Object.freeze({ inPreset: true, public: false }),
|
||||
topology: Object.freeze({ inPreset: false, public: false })
|
||||
});
|
||||
var TOOLS_BY_GROUP = Object.freeze({
|
||||
nms: Object.freeze([
|
||||
ops: Object.freeze([
|
||||
"netx__queryNmsAlarms",
|
||||
"netx__aggregateNmsAlarms",
|
||||
"netx__runNmsDiagnostics",
|
||||
|
|
@ -14,9 +13,7 @@ var TOOLS_BY_GROUP = Object.freeze({
|
|||
"netx__queryNmsAlarmsRaw",
|
||||
"netx__aggregateNmsAlarmsRaw",
|
||||
"netx__listNmsAlarmFields",
|
||||
"netx__sqlQueryNms"
|
||||
]),
|
||||
common: Object.freeze([
|
||||
"netx__sqlQueryNms",
|
||||
"netx__listManagedNe",
|
||||
"netx__getManagedNe",
|
||||
"netx__execManagedNe",
|
||||
|
|
@ -43,13 +40,11 @@ var TOOLS_BY_GROUP = Object.freeze({
|
|||
])
|
||||
});
|
||||
var SKILL_DIR_BY_GROUP = Object.freeze({
|
||||
nms: "nms",
|
||||
common: "common",
|
||||
ops: "ops",
|
||||
topology: "topology"
|
||||
});
|
||||
var CAPABILITY_GROUP_IDS = Object.freeze([
|
||||
"nms",
|
||||
"common",
|
||||
"ops",
|
||||
"topology"
|
||||
]);
|
||||
function groupsForPlane(groups, plane, only) {
|
||||
|
|
@ -61,7 +56,8 @@ function groupsForPlane(groups, plane, only) {
|
|||
return enabled.filter((id) => allow.has(id));
|
||||
}
|
||||
function groupsForced(only) {
|
||||
return CAPABILITY_GROUP_IDS.filter((id) => only.includes(id));
|
||||
const normalized = only.map((id) => id === "nms" || id === "common" ? "ops" : id);
|
||||
return CAPABILITY_GROUP_IDS.filter((id) => normalized.includes(id));
|
||||
}
|
||||
function toolNamesForGroups(groupIds) {
|
||||
const names = new Set;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue