hostctl 0.1.51 → 0.1.55
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/dist/bin/hostctl.js +684 -451
- package/dist/bin/hostctl.js.map +1 -1
- package/dist/index.d.ts +105 -88
- package/dist/index.js +686 -453
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/hostctl.js
CHANGED
|
@@ -8,6 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
import process4 from "process";
|
|
10
10
|
import path13 from "path";
|
|
11
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
11
12
|
import * as cmdr from "commander";
|
|
12
13
|
import "zod";
|
|
13
14
|
|
|
@@ -3980,7 +3981,7 @@ var ParamMap = class _ParamMap {
|
|
|
3980
3981
|
import * as z from "zod";
|
|
3981
3982
|
|
|
3982
3983
|
// src/version.ts
|
|
3983
|
-
var version = "0.1.
|
|
3984
|
+
var version = "0.1.55";
|
|
3984
3985
|
|
|
3985
3986
|
// src/app.ts
|
|
3986
3987
|
import { retryUntilDefined } from "ts-retry";
|
|
@@ -5384,7 +5385,7 @@ var DirCreateOutputSchema = z.object({
|
|
|
5384
5385
|
})
|
|
5385
5386
|
);
|
|
5386
5387
|
async function runFn(context) {
|
|
5387
|
-
const { params, exec, run:
|
|
5388
|
+
const { params, exec, run: run253 } = context;
|
|
5388
5389
|
const sudoDefault = context.host ? !context.host.isLocal() : false;
|
|
5389
5390
|
const { path: path14, mode, owner, sudo = sudoDefault } = params;
|
|
5390
5391
|
if (!path14) {
|
|
@@ -5408,7 +5409,7 @@ async function runFn(context) {
|
|
|
5408
5409
|
}
|
|
5409
5410
|
}
|
|
5410
5411
|
if (mode) {
|
|
5411
|
-
const chmodResult = await
|
|
5412
|
+
const chmodResult = await run253(chmod_default({ path: path14, mode, sudo: true }));
|
|
5412
5413
|
if (!chmodResult?.success) {
|
|
5413
5414
|
return { success: false, error: chmodResult?.error ?? "Failed to set directory mode" };
|
|
5414
5415
|
}
|
|
@@ -6001,7 +6002,7 @@ async function ensureFile(context, file, sudo) {
|
|
|
6001
6002
|
await exec(["touch", file], { sudo });
|
|
6002
6003
|
}
|
|
6003
6004
|
async function runFn2(context) {
|
|
6004
|
-
const { params, exec, info, run:
|
|
6005
|
+
const { params, exec, info, run: run253, error } = context;
|
|
6005
6006
|
const {
|
|
6006
6007
|
file,
|
|
6007
6008
|
state = "present",
|
|
@@ -8695,6 +8696,7 @@ __export(pacman_exports, {
|
|
|
8695
8696
|
install: () => install_default3,
|
|
8696
8697
|
isInstalled: () => is_installed_default3,
|
|
8697
8698
|
list: () => list_default5,
|
|
8699
|
+
repair_keyring: () => repair_keyring_default,
|
|
8698
8700
|
search: () => search_default3,
|
|
8699
8701
|
uninstall: () => uninstall_default3,
|
|
8700
8702
|
update: () => update_default3,
|
|
@@ -8747,13 +8749,23 @@ var PacmanUpdateResultSchema = PacmanBaseResultSchema.extend({
|
|
|
8747
8749
|
});
|
|
8748
8750
|
var PacmanUpgradeParamsSchema = PacmanBaseParamsSchema.extend({
|
|
8749
8751
|
fullUpgrade: z.boolean().optional(),
|
|
8750
|
-
securityOnly: z.boolean().optional()
|
|
8752
|
+
securityOnly: z.boolean().optional(),
|
|
8753
|
+
keyringRepair: z.enum(["basic", "full"]).optional()
|
|
8751
8754
|
});
|
|
8752
8755
|
var PacmanUpgradeResultSchema = PacmanBaseResultSchema.extend({
|
|
8753
8756
|
packagesUpgraded: z.number().optional(),
|
|
8754
8757
|
upgradedPackages: z.array(z.string()).optional(),
|
|
8755
8758
|
rebootRecommended: z.boolean().optional()
|
|
8756
8759
|
});
|
|
8760
|
+
var PacmanKeyringRepairParamsSchema = PacmanBaseParamsSchema.omit({ package: true }).extend({
|
|
8761
|
+
mode: z.enum(["basic", "full"]).optional(),
|
|
8762
|
+
corruptedPackages: z.array(z.string()).optional()
|
|
8763
|
+
});
|
|
8764
|
+
var PacmanKeyringRepairResultSchema = PacmanBaseResultSchema.extend({
|
|
8765
|
+
mode: z.enum(["basic", "full"]).optional(),
|
|
8766
|
+
removedPackages: z.array(z.string()).optional(),
|
|
8767
|
+
skippedPackages: z.array(z.string()).optional()
|
|
8768
|
+
});
|
|
8757
8769
|
var PacmanSearchParamsSchema = PacmanBaseParamsSchema.extend({
|
|
8758
8770
|
query: z.string().min(1),
|
|
8759
8771
|
namesOnly: z.boolean().optional(),
|
|
@@ -9334,9 +9346,140 @@ var update_default3 = task(run52, {
|
|
|
9334
9346
|
outputSchema: PacmanUpdateResultSchema
|
|
9335
9347
|
});
|
|
9336
9348
|
|
|
9337
|
-
// src/core/pkg/pacman/
|
|
9349
|
+
// src/core/pkg/pacman/repair-keyring.ts
|
|
9350
|
+
var KEYRING_PUBRING = "/etc/pacman.d/gnupg/pubring.gpg";
|
|
9351
|
+
var PACMAN_CACHE_PREFIX = "/var/cache/pacman/pkg/";
|
|
9352
|
+
function normalizeOutput(outputs) {
|
|
9353
|
+
const merged = outputs.filter(Boolean).join("\n").trim();
|
|
9354
|
+
return merged.length ? merged : void 0;
|
|
9355
|
+
}
|
|
9338
9356
|
async function run53(context) {
|
|
9339
|
-
const { sudo = true } = context.params;
|
|
9357
|
+
const { sudo = true, mode = "basic", corruptedPackages = [] } = context.params;
|
|
9358
|
+
const backend = await detectPacmanBackend(context, sudo);
|
|
9359
|
+
if (backend !== "pacman") {
|
|
9360
|
+
return {
|
|
9361
|
+
success: false,
|
|
9362
|
+
error: "pacman is not available on this host",
|
|
9363
|
+
packageManager: "pacman",
|
|
9364
|
+
mode
|
|
9365
|
+
};
|
|
9366
|
+
}
|
|
9367
|
+
const lock = await ensurePacmanLockAvailable(context, sudo);
|
|
9368
|
+
if (!lock.ok) {
|
|
9369
|
+
return {
|
|
9370
|
+
success: false,
|
|
9371
|
+
error: lock.error,
|
|
9372
|
+
packageManager: "pacman",
|
|
9373
|
+
mode
|
|
9374
|
+
};
|
|
9375
|
+
}
|
|
9376
|
+
const outputs = [];
|
|
9377
|
+
const warnings = [];
|
|
9378
|
+
const removedPackages = [];
|
|
9379
|
+
const skippedPackages = [];
|
|
9380
|
+
const appendOutput = (result) => {
|
|
9381
|
+
if (result.stdout) outputs.push(result.stdout);
|
|
9382
|
+
if (result.stderr) outputs.push(result.stderr);
|
|
9383
|
+
};
|
|
9384
|
+
const runStep = async (label, command, allowFailure = false) => {
|
|
9385
|
+
const result = await context.exec(command, { sudo });
|
|
9386
|
+
appendOutput(result);
|
|
9387
|
+
if (result.exitCode !== 0 && !allowFailure) {
|
|
9388
|
+
return { ok: false, error: result.stderr || `${label} failed` };
|
|
9389
|
+
}
|
|
9390
|
+
return { ok: true };
|
|
9391
|
+
};
|
|
9392
|
+
const pubringCheck = await context.exec(["test", "-f", KEYRING_PUBRING], { sudo });
|
|
9393
|
+
if (pubringCheck.exitCode !== 0) {
|
|
9394
|
+
const initResult = await runStep("Initialize pacman keyring", ["pacman-key", "--init"]);
|
|
9395
|
+
if (!initResult.ok) {
|
|
9396
|
+
return {
|
|
9397
|
+
success: false,
|
|
9398
|
+
error: initResult.error,
|
|
9399
|
+
packageManager: "pacman",
|
|
9400
|
+
output: normalizeOutput(outputs),
|
|
9401
|
+
mode
|
|
9402
|
+
};
|
|
9403
|
+
}
|
|
9404
|
+
}
|
|
9405
|
+
const populateResult = await runStep("Populate pacman keyring", ["pacman-key", "--populate", "archlinux"]);
|
|
9406
|
+
if (!populateResult.ok) {
|
|
9407
|
+
return {
|
|
9408
|
+
success: false,
|
|
9409
|
+
error: populateResult.error,
|
|
9410
|
+
packageManager: "pacman",
|
|
9411
|
+
output: normalizeOutput(outputs),
|
|
9412
|
+
mode
|
|
9413
|
+
};
|
|
9414
|
+
}
|
|
9415
|
+
if (mode === "full") {
|
|
9416
|
+
const refreshResult = await runStep("Refresh pacman keyring", ["pacman-key", "--refresh-keys"]);
|
|
9417
|
+
if (!refreshResult.ok) {
|
|
9418
|
+
return {
|
|
9419
|
+
success: false,
|
|
9420
|
+
error: refreshResult.error,
|
|
9421
|
+
packageManager: "pacman",
|
|
9422
|
+
output: normalizeOutput(outputs),
|
|
9423
|
+
mode
|
|
9424
|
+
};
|
|
9425
|
+
}
|
|
9426
|
+
}
|
|
9427
|
+
const updateKeyring = async () => context.exec(["pacman", "-Sy", "--noconfirm", "archlinux-keyring"], { sudo });
|
|
9428
|
+
const { result: updateResult, lockFailed } = await retryPacmanWithLock(context, sudo, updateKeyring);
|
|
9429
|
+
appendOutput(updateResult);
|
|
9430
|
+
if (lockFailed) {
|
|
9431
|
+
return {
|
|
9432
|
+
success: false,
|
|
9433
|
+
error: "pacman database lock is in use (another package operation is running). Retry after it finishes.",
|
|
9434
|
+
packageManager: "pacman",
|
|
9435
|
+
output: normalizeOutput(outputs),
|
|
9436
|
+
mode
|
|
9437
|
+
};
|
|
9438
|
+
}
|
|
9439
|
+
if (updateResult.exitCode !== 0) {
|
|
9440
|
+
return {
|
|
9441
|
+
success: false,
|
|
9442
|
+
error: updateResult.stderr || "Failed to update archlinux-keyring",
|
|
9443
|
+
packageManager: "pacman",
|
|
9444
|
+
output: normalizeOutput(outputs),
|
|
9445
|
+
mode
|
|
9446
|
+
};
|
|
9447
|
+
}
|
|
9448
|
+
for (const pkgPath of corruptedPackages) {
|
|
9449
|
+
if (!pkgPath.startsWith(PACMAN_CACHE_PREFIX)) {
|
|
9450
|
+
skippedPackages.push(pkgPath);
|
|
9451
|
+
warnings.push(`Skipped corrupted package path outside ${PACMAN_CACHE_PREFIX}: ${pkgPath}`);
|
|
9452
|
+
continue;
|
|
9453
|
+
}
|
|
9454
|
+
const rmResult = await context.exec(["rm", "-f", pkgPath], { sudo });
|
|
9455
|
+
appendOutput(rmResult);
|
|
9456
|
+
if (rmResult.exitCode === 0) {
|
|
9457
|
+
removedPackages.push(pkgPath);
|
|
9458
|
+
} else {
|
|
9459
|
+
skippedPackages.push(pkgPath);
|
|
9460
|
+
warnings.push(`Failed to remove corrupted package: ${pkgPath}`);
|
|
9461
|
+
}
|
|
9462
|
+
}
|
|
9463
|
+
return {
|
|
9464
|
+
success: true,
|
|
9465
|
+
packageManager: "pacman",
|
|
9466
|
+
output: normalizeOutput(outputs),
|
|
9467
|
+
warning: warnings.length ? warnings.join(" ") : void 0,
|
|
9468
|
+
mode,
|
|
9469
|
+
removedPackages: removedPackages.length ? removedPackages : void 0,
|
|
9470
|
+
skippedPackages: skippedPackages.length ? skippedPackages : void 0
|
|
9471
|
+
};
|
|
9472
|
+
}
|
|
9473
|
+
var repair_keyring_default = task(run53, {
|
|
9474
|
+
name: "repair_keyring",
|
|
9475
|
+
description: "Repairs the pacman keyring and refreshes archlinux-keyring.",
|
|
9476
|
+
inputSchema: PacmanKeyringRepairParamsSchema,
|
|
9477
|
+
outputSchema: PacmanKeyringRepairResultSchema
|
|
9478
|
+
});
|
|
9479
|
+
|
|
9480
|
+
// src/core/pkg/pacman/upgrade.ts
|
|
9481
|
+
async function run54(context) {
|
|
9482
|
+
const { sudo = true, keyringRepair } = context.params;
|
|
9340
9483
|
const backend = await detectPacmanBackend(context, sudo);
|
|
9341
9484
|
if (backend !== "pacman") {
|
|
9342
9485
|
if (backend === "unknown") {
|
|
@@ -9365,9 +9508,30 @@ async function run53(context) {
|
|
|
9365
9508
|
${result.stderr}`.toLowerCase();
|
|
9366
9509
|
return output.includes("too full") || output.includes("not enough free disk space");
|
|
9367
9510
|
};
|
|
9511
|
+
const shouldRepairKeyring = (result) => {
|
|
9512
|
+
if (keyringRepair !== "basic" && keyringRepair !== "full") return false;
|
|
9513
|
+
const output = `${result.stdout}
|
|
9514
|
+
${result.stderr}`.toLowerCase();
|
|
9515
|
+
const indicators = [
|
|
9516
|
+
"unknown trust",
|
|
9517
|
+
"invalid or corrupted package (pgp signature)",
|
|
9518
|
+
"failed to verify signature",
|
|
9519
|
+
"signature from",
|
|
9520
|
+
"keyring is not writable",
|
|
9521
|
+
"public key not found"
|
|
9522
|
+
];
|
|
9523
|
+
return indicators.some((indicator) => output.includes(indicator));
|
|
9524
|
+
};
|
|
9525
|
+
const extractCorruptedPackages = (result) => {
|
|
9526
|
+
const output = `${result.stdout}
|
|
9527
|
+
${result.stderr}`;
|
|
9528
|
+
const matches2 = Array.from(output.matchAll(/(?:^|\n)::? File (\S+) is corrupted/gi)).map((match7) => match7[1]);
|
|
9529
|
+
return Array.from(new Set(matches2));
|
|
9530
|
+
};
|
|
9368
9531
|
try {
|
|
9369
9532
|
const attemptUpgrade = () => retryPacmanWithLock(context, sudo, upgradeOnce);
|
|
9370
9533
|
let { result, lockFailed } = await attemptUpgrade();
|
|
9534
|
+
let keyringRepairApplied = false;
|
|
9371
9535
|
if (lockFailed) {
|
|
9372
9536
|
return {
|
|
9373
9537
|
success: false,
|
|
@@ -9397,11 +9561,42 @@ ${result.stderr}`.toLowerCase();
|
|
|
9397
9561
|
};
|
|
9398
9562
|
}
|
|
9399
9563
|
}
|
|
9564
|
+
if (result.exitCode !== 0 && shouldRepairKeyring(result)) {
|
|
9565
|
+
const repairResult = await context.run(
|
|
9566
|
+
repair_keyring_default({
|
|
9567
|
+
mode: keyringRepair,
|
|
9568
|
+
sudo,
|
|
9569
|
+
corruptedPackages: extractCorruptedPackages(result)
|
|
9570
|
+
})
|
|
9571
|
+
);
|
|
9572
|
+
if (!repairResult?.success) {
|
|
9573
|
+
return {
|
|
9574
|
+
success: false,
|
|
9575
|
+
error: repairResult?.error || "Pacman keyring repair failed",
|
|
9576
|
+
packageManager: "pacman",
|
|
9577
|
+
output: result.stdout,
|
|
9578
|
+
warning: repairResult?.warning
|
|
9579
|
+
};
|
|
9580
|
+
}
|
|
9581
|
+
keyringRepairApplied = true;
|
|
9582
|
+
const retry = await attemptUpgrade();
|
|
9583
|
+
result = retry.result;
|
|
9584
|
+
lockFailed = retry.lockFailed;
|
|
9585
|
+
if (lockFailed) {
|
|
9586
|
+
return {
|
|
9587
|
+
success: false,
|
|
9588
|
+
error: "pacman database lock is in use (another package operation is running). Retry after it finishes.",
|
|
9589
|
+
packageManager: "pacman",
|
|
9590
|
+
output: result.stdout
|
|
9591
|
+
};
|
|
9592
|
+
}
|
|
9593
|
+
}
|
|
9400
9594
|
if (result.exitCode === 0) {
|
|
9401
9595
|
return {
|
|
9402
9596
|
success: true,
|
|
9403
9597
|
packageManager: "pacman",
|
|
9404
|
-
output: result.stdout
|
|
9598
|
+
output: result.stdout,
|
|
9599
|
+
warning: keyringRepairApplied ? "Pacman keyring repair was applied before retrying the upgrade." : void 0
|
|
9405
9600
|
};
|
|
9406
9601
|
} else if (handleDiskFull(result)) {
|
|
9407
9602
|
return {
|
|
@@ -9427,7 +9622,7 @@ ${result.stderr}`.toLowerCase();
|
|
|
9427
9622
|
};
|
|
9428
9623
|
}
|
|
9429
9624
|
}
|
|
9430
|
-
var upgrade_default3 = task(
|
|
9625
|
+
var upgrade_default3 = task(run54, {
|
|
9431
9626
|
name: "upgrade",
|
|
9432
9627
|
description: "Upgrade packages using pacman package manager",
|
|
9433
9628
|
inputSchema: PacmanUpgradeParamsSchema,
|
|
@@ -9438,7 +9633,7 @@ var upgrade_default3 = task(run53, {
|
|
|
9438
9633
|
function stripAnsiCodes3(text) {
|
|
9439
9634
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
9440
9635
|
}
|
|
9441
|
-
async function
|
|
9636
|
+
async function run55(context) {
|
|
9442
9637
|
const { query, sudo = false } = context.params;
|
|
9443
9638
|
if (!query) {
|
|
9444
9639
|
context.error("Query parameter is required");
|
|
@@ -9492,7 +9687,7 @@ async function run54(context) {
|
|
|
9492
9687
|
};
|
|
9493
9688
|
}
|
|
9494
9689
|
}
|
|
9495
|
-
var search_default3 = task(
|
|
9690
|
+
var search_default3 = task(run55, {
|
|
9496
9691
|
name: "search",
|
|
9497
9692
|
description: "Search packages using pacman package manager",
|
|
9498
9693
|
inputSchema: PacmanSearchParamsSchema,
|
|
@@ -9500,7 +9695,7 @@ var search_default3 = task(run54, {
|
|
|
9500
9695
|
});
|
|
9501
9696
|
|
|
9502
9697
|
// src/core/pkg/pacman/list.ts
|
|
9503
|
-
async function
|
|
9698
|
+
async function run56(context) {
|
|
9504
9699
|
const { sudo = false } = context.params;
|
|
9505
9700
|
try {
|
|
9506
9701
|
const backend = await detectPacmanBackend(context, sudo);
|
|
@@ -9545,7 +9740,7 @@ async function run55(context) {
|
|
|
9545
9740
|
};
|
|
9546
9741
|
}
|
|
9547
9742
|
}
|
|
9548
|
-
var list_default5 = task(
|
|
9743
|
+
var list_default5 = task(run56, {
|
|
9549
9744
|
name: "list",
|
|
9550
9745
|
description: "List packages using pacman package manager",
|
|
9551
9746
|
inputSchema: PacmanListParamsSchema,
|
|
@@ -9553,7 +9748,7 @@ var list_default5 = task(run55, {
|
|
|
9553
9748
|
});
|
|
9554
9749
|
|
|
9555
9750
|
// src/core/pkg/pacman/clean.ts
|
|
9556
|
-
async function
|
|
9751
|
+
async function run57(context) {
|
|
9557
9752
|
const { sudo = true } = context.params;
|
|
9558
9753
|
try {
|
|
9559
9754
|
const backend = await detectPacmanBackend(context, sudo);
|
|
@@ -9600,7 +9795,7 @@ async function run56(context) {
|
|
|
9600
9795
|
};
|
|
9601
9796
|
}
|
|
9602
9797
|
}
|
|
9603
|
-
var clean_default3 = task(
|
|
9798
|
+
var clean_default3 = task(run57, {
|
|
9604
9799
|
name: "clean",
|
|
9605
9800
|
description: "Clean packages using pacman package manager",
|
|
9606
9801
|
inputSchema: PacmanCleanParamsSchema,
|
|
@@ -9608,7 +9803,7 @@ var clean_default3 = task(run56, {
|
|
|
9608
9803
|
});
|
|
9609
9804
|
|
|
9610
9805
|
// src/core/pkg/pacman/is_installed.ts
|
|
9611
|
-
async function
|
|
9806
|
+
async function run58(context) {
|
|
9612
9807
|
const { package: packageName, sudo = false } = context.params;
|
|
9613
9808
|
if (!packageName) {
|
|
9614
9809
|
context.error("Package parameter is required");
|
|
@@ -9644,7 +9839,7 @@ async function run57(context) {
|
|
|
9644
9839
|
};
|
|
9645
9840
|
}
|
|
9646
9841
|
}
|
|
9647
|
-
var is_installed_default3 = task(
|
|
9842
|
+
var is_installed_default3 = task(run58, {
|
|
9648
9843
|
name: "is_installed",
|
|
9649
9844
|
description: "Check if package is installed using pacman package manager",
|
|
9650
9845
|
inputSchema: PacmanIsInstalledParamsSchema,
|
|
@@ -9652,7 +9847,7 @@ var is_installed_default3 = task(run57, {
|
|
|
9652
9847
|
});
|
|
9653
9848
|
|
|
9654
9849
|
// src/core/pkg/pacman/info.ts
|
|
9655
|
-
async function
|
|
9850
|
+
async function run59(context) {
|
|
9656
9851
|
const { package: packageName, sudo = false } = context.params;
|
|
9657
9852
|
if (!packageName) {
|
|
9658
9853
|
context.error("Package parameter is required");
|
|
@@ -9714,7 +9909,7 @@ async function run58(context) {
|
|
|
9714
9909
|
};
|
|
9715
9910
|
}
|
|
9716
9911
|
}
|
|
9717
|
-
var info_default4 = task(
|
|
9912
|
+
var info_default4 = task(run59, {
|
|
9718
9913
|
name: "info",
|
|
9719
9914
|
description: "Get package information using pacman package manager",
|
|
9720
9915
|
inputSchema: PacmanInfoParamsSchema,
|
|
@@ -9861,7 +10056,7 @@ var YumListResultSchema = YumBaseResultSchema.extend({
|
|
|
9861
10056
|
});
|
|
9862
10057
|
|
|
9863
10058
|
// src/core/pkg/yum/install.ts
|
|
9864
|
-
async function
|
|
10059
|
+
async function run60(context) {
|
|
9865
10060
|
const { package: packageName, sudo = true, installWeakDeps = false, repo } = context.params;
|
|
9866
10061
|
if (!packageName) {
|
|
9867
10062
|
context.error("Package parameter is required");
|
|
@@ -9924,7 +10119,7 @@ async function run59(context) {
|
|
|
9924
10119
|
};
|
|
9925
10120
|
}
|
|
9926
10121
|
}
|
|
9927
|
-
var install_default4 = task(
|
|
10122
|
+
var install_default4 = task(run60, {
|
|
9928
10123
|
name: "install",
|
|
9929
10124
|
description: "Install packages using yum package manager",
|
|
9930
10125
|
inputSchema: YumInstallParamsSchema,
|
|
@@ -9932,7 +10127,7 @@ var install_default4 = task(run59, {
|
|
|
9932
10127
|
});
|
|
9933
10128
|
|
|
9934
10129
|
// src/core/pkg/yum/uninstall.ts
|
|
9935
|
-
async function
|
|
10130
|
+
async function run61(context) {
|
|
9936
10131
|
const { package: packages, sudo = true, autoremove = true } = context.params;
|
|
9937
10132
|
if (!packages) {
|
|
9938
10133
|
context.error("Package parameter is required");
|
|
@@ -9994,7 +10189,7 @@ async function run60(context) {
|
|
|
9994
10189
|
};
|
|
9995
10190
|
}
|
|
9996
10191
|
}
|
|
9997
|
-
var uninstall_default4 = task(
|
|
10192
|
+
var uninstall_default4 = task(run61, {
|
|
9998
10193
|
name: "uninstall",
|
|
9999
10194
|
description: "Uninstall packages using yum package manager",
|
|
10000
10195
|
inputSchema: YumUninstallParamsSchema,
|
|
@@ -10002,7 +10197,7 @@ var uninstall_default4 = task(run60, {
|
|
|
10002
10197
|
});
|
|
10003
10198
|
|
|
10004
10199
|
// src/core/pkg/yum/update.ts
|
|
10005
|
-
async function
|
|
10200
|
+
async function run62(context) {
|
|
10006
10201
|
const { sudo = true, updateMetadata = true, upgrade = false } = context.params;
|
|
10007
10202
|
try {
|
|
10008
10203
|
if (!updateMetadata && !upgrade) {
|
|
@@ -10066,7 +10261,7 @@ async function run61(context) {
|
|
|
10066
10261
|
};
|
|
10067
10262
|
}
|
|
10068
10263
|
}
|
|
10069
|
-
var update_default4 = task(
|
|
10264
|
+
var update_default4 = task(run62, {
|
|
10070
10265
|
name: "update",
|
|
10071
10266
|
description: "Update packages using yum package manager",
|
|
10072
10267
|
inputSchema: YumUpdateParamsSchema,
|
|
@@ -10074,7 +10269,7 @@ var update_default4 = task(run61, {
|
|
|
10074
10269
|
});
|
|
10075
10270
|
|
|
10076
10271
|
// src/core/pkg/yum/upgrade.ts
|
|
10077
|
-
async function
|
|
10272
|
+
async function run63(context) {
|
|
10078
10273
|
const { sudo = true, fullUpgrade = false, securityOnly = false } = context.params;
|
|
10079
10274
|
try {
|
|
10080
10275
|
let command;
|
|
@@ -10137,7 +10332,7 @@ async function run62(context) {
|
|
|
10137
10332
|
};
|
|
10138
10333
|
}
|
|
10139
10334
|
}
|
|
10140
|
-
var upgrade_default4 = task(
|
|
10335
|
+
var upgrade_default4 = task(run63, {
|
|
10141
10336
|
name: "upgrade",
|
|
10142
10337
|
description: "Upgrade packages using yum package manager",
|
|
10143
10338
|
inputSchema: YumUpgradeParamsSchema,
|
|
@@ -10148,7 +10343,7 @@ var upgrade_default4 = task(run62, {
|
|
|
10148
10343
|
function stripAnsiCodes4(text) {
|
|
10149
10344
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
10150
10345
|
}
|
|
10151
|
-
async function
|
|
10346
|
+
async function run64(context) {
|
|
10152
10347
|
const { query, namesOnly = false, descriptions = true } = context.params;
|
|
10153
10348
|
if (!query) {
|
|
10154
10349
|
context.error("Query parameter is required");
|
|
@@ -10204,7 +10399,7 @@ async function run63(context) {
|
|
|
10204
10399
|
};
|
|
10205
10400
|
}
|
|
10206
10401
|
}
|
|
10207
|
-
var search_default4 = task(
|
|
10402
|
+
var search_default4 = task(run64, {
|
|
10208
10403
|
name: "search",
|
|
10209
10404
|
description: "Search packages using yum package manager",
|
|
10210
10405
|
inputSchema: YumSearchParamsSchema,
|
|
@@ -10215,7 +10410,7 @@ var search_default4 = task(run63, {
|
|
|
10215
10410
|
function stripAnsiCodes5(text) {
|
|
10216
10411
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
10217
10412
|
}
|
|
10218
|
-
async function
|
|
10413
|
+
async function run65(context) {
|
|
10219
10414
|
const { pattern } = context.params;
|
|
10220
10415
|
try {
|
|
10221
10416
|
const result = await context.exec(["yum", "list", "installed"], { sudo: false });
|
|
@@ -10268,7 +10463,7 @@ async function run64(context) {
|
|
|
10268
10463
|
};
|
|
10269
10464
|
}
|
|
10270
10465
|
}
|
|
10271
|
-
var list_default6 = task(
|
|
10466
|
+
var list_default6 = task(run65, {
|
|
10272
10467
|
name: "list",
|
|
10273
10468
|
description: "List installed packages.",
|
|
10274
10469
|
inputSchema: YumListParamsSchema,
|
|
@@ -10276,7 +10471,7 @@ var list_default6 = task(run64, {
|
|
|
10276
10471
|
});
|
|
10277
10472
|
|
|
10278
10473
|
// src/core/pkg/yum/clean.ts
|
|
10279
|
-
async function
|
|
10474
|
+
async function run66(context) {
|
|
10280
10475
|
const { sudo = true, all = true, packages = false, metadata = false } = context.params;
|
|
10281
10476
|
try {
|
|
10282
10477
|
let packagesRemoved = 0;
|
|
@@ -10337,7 +10532,7 @@ async function run65(context) {
|
|
|
10337
10532
|
};
|
|
10338
10533
|
}
|
|
10339
10534
|
}
|
|
10340
|
-
var clean_default4 = task(
|
|
10535
|
+
var clean_default4 = task(run66, {
|
|
10341
10536
|
name: "clean",
|
|
10342
10537
|
description: "Clean packages using yum package manager",
|
|
10343
10538
|
inputSchema: YumCleanParamsSchema,
|
|
@@ -10345,7 +10540,7 @@ var clean_default4 = task(run65, {
|
|
|
10345
10540
|
});
|
|
10346
10541
|
|
|
10347
10542
|
// src/core/pkg/yum/is_installed.ts
|
|
10348
|
-
async function
|
|
10543
|
+
async function run67(context) {
|
|
10349
10544
|
const { package: packageName } = context.params;
|
|
10350
10545
|
if (!packageName) {
|
|
10351
10546
|
context.error("Package parameter is required");
|
|
@@ -10367,7 +10562,7 @@ async function run66(context) {
|
|
|
10367
10562
|
};
|
|
10368
10563
|
}
|
|
10369
10564
|
}
|
|
10370
|
-
var is_installed_default4 = task(
|
|
10565
|
+
var is_installed_default4 = task(run67, {
|
|
10371
10566
|
name: "is_installed",
|
|
10372
10567
|
description: "Check if package is installed using yum package manager",
|
|
10373
10568
|
inputSchema: YumIsInstalledParamsSchema,
|
|
@@ -10375,7 +10570,7 @@ var is_installed_default4 = task(run66, {
|
|
|
10375
10570
|
});
|
|
10376
10571
|
|
|
10377
10572
|
// src/core/pkg/yum/info.ts
|
|
10378
|
-
async function
|
|
10573
|
+
async function run68(context) {
|
|
10379
10574
|
const { package: packageName } = context.params;
|
|
10380
10575
|
if (!packageName) {
|
|
10381
10576
|
context.error("Package parameter is required");
|
|
@@ -10456,7 +10651,7 @@ async function run67(context) {
|
|
|
10456
10651
|
};
|
|
10457
10652
|
}
|
|
10458
10653
|
}
|
|
10459
|
-
var info_default5 = task(
|
|
10654
|
+
var info_default5 = task(run68, {
|
|
10460
10655
|
name: "info",
|
|
10461
10656
|
description: "Get package information using yum package manager",
|
|
10462
10657
|
inputSchema: YumInfoParamsSchema,
|
|
@@ -10497,7 +10692,14 @@ var PACKAGE_MANAGERS = {
|
|
|
10497
10692
|
},
|
|
10498
10693
|
yum: {
|
|
10499
10694
|
name: "yum",
|
|
10500
|
-
installCommand: [
|
|
10695
|
+
installCommand: [
|
|
10696
|
+
"yum",
|
|
10697
|
+
"install",
|
|
10698
|
+
"-y",
|
|
10699
|
+
"--setopt=install_weak_deps=0",
|
|
10700
|
+
"--setopt=skip_if_unavailable=1",
|
|
10701
|
+
"--quiet"
|
|
10702
|
+
],
|
|
10501
10703
|
uninstallCommand: ["yum", "remove", "-y", "--quiet"],
|
|
10502
10704
|
updateCommand: ["yum", "update", "-y", "--setopt=skip_if_unavailable=1", "--quiet"],
|
|
10503
10705
|
upgradeCommand: [
|
|
@@ -10514,7 +10716,14 @@ var PACKAGE_MANAGERS = {
|
|
|
10514
10716
|
},
|
|
10515
10717
|
dnf: {
|
|
10516
10718
|
name: "dnf",
|
|
10517
|
-
installCommand: [
|
|
10719
|
+
installCommand: [
|
|
10720
|
+
"dnf",
|
|
10721
|
+
"install",
|
|
10722
|
+
"-y",
|
|
10723
|
+
"--setopt=install_weak_deps=0",
|
|
10724
|
+
"--setopt=skip_if_unavailable=1",
|
|
10725
|
+
"--quiet"
|
|
10726
|
+
],
|
|
10518
10727
|
uninstallCommand: ["dnf", "remove", "-y", "--quiet"],
|
|
10519
10728
|
updateCommand: ["dnf", "update", "-y", "--setopt=skip_if_unavailable=1", "--quiet"],
|
|
10520
10729
|
upgradeCommand: [
|
|
@@ -11547,10 +11756,10 @@ var AbstractPkgUpdateParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
11547
11756
|
extraArgs: true
|
|
11548
11757
|
});
|
|
11549
11758
|
var AbstractPkgUpdateResultSchema = AbstractPkgResultSchema;
|
|
11550
|
-
async function
|
|
11759
|
+
async function run69(context) {
|
|
11551
11760
|
return await abstractUpdate(context);
|
|
11552
11761
|
}
|
|
11553
|
-
var update_default5 = task(
|
|
11762
|
+
var update_default5 = task(run69, {
|
|
11554
11763
|
description: "Update package sources using auto-detected or specified package manager",
|
|
11555
11764
|
inputSchema: AbstractPkgUpdateParamsSchema,
|
|
11556
11765
|
outputSchema: AbstractPkgUpdateResultSchema
|
|
@@ -11563,10 +11772,10 @@ var AbstractPkgUpgradeParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
11563
11772
|
extraArgs: true
|
|
11564
11773
|
});
|
|
11565
11774
|
var AbstractPkgUpgradeResultSchema = AbstractPkgResultSchema;
|
|
11566
|
-
async function
|
|
11775
|
+
async function run70(context) {
|
|
11567
11776
|
return await abstractUpgrade(context);
|
|
11568
11777
|
}
|
|
11569
|
-
var upgrade_default5 = task(
|
|
11778
|
+
var upgrade_default5 = task(run70, {
|
|
11570
11779
|
description: "Upgrade packages using auto-detected or specified package manager",
|
|
11571
11780
|
inputSchema: AbstractPkgUpgradeParamsSchema,
|
|
11572
11781
|
outputSchema: AbstractPkgUpgradeResultSchema
|
|
@@ -11579,7 +11788,7 @@ var UserExistsInputSchema = z.object({
|
|
|
11579
11788
|
var UserExistsOutputSchema = z.object({
|
|
11580
11789
|
exists: z.boolean()
|
|
11581
11790
|
});
|
|
11582
|
-
async function
|
|
11791
|
+
async function run71(context) {
|
|
11583
11792
|
const { params, exec } = context;
|
|
11584
11793
|
const { user } = params;
|
|
11585
11794
|
const command = ["id", user].join(" ");
|
|
@@ -11588,7 +11797,7 @@ async function run70(context) {
|
|
|
11588
11797
|
exists: exists3
|
|
11589
11798
|
};
|
|
11590
11799
|
}
|
|
11591
|
-
var exists_default4 = task(
|
|
11800
|
+
var exists_default4 = task(run71, {
|
|
11592
11801
|
name: "exists",
|
|
11593
11802
|
description: "User exists.",
|
|
11594
11803
|
inputSchema: UserExistsInputSchema,
|
|
@@ -11612,7 +11821,7 @@ var UserHomeDirOutputSchema = z.object({
|
|
|
11612
11821
|
error: z.string().optional()
|
|
11613
11822
|
})
|
|
11614
11823
|
);
|
|
11615
|
-
async function
|
|
11824
|
+
async function run72(context) {
|
|
11616
11825
|
const { params, exec } = context;
|
|
11617
11826
|
const { user, sudo = false } = params;
|
|
11618
11827
|
const getentCommand = ["getent", "passwd", user].filter(Boolean).join(" ");
|
|
@@ -11642,7 +11851,7 @@ async function run71(context) {
|
|
|
11642
11851
|
success: true
|
|
11643
11852
|
};
|
|
11644
11853
|
}
|
|
11645
|
-
var home_dir_default = task(
|
|
11854
|
+
var home_dir_default = task(run72, {
|
|
11646
11855
|
name: "home_dir",
|
|
11647
11856
|
description: "User home dir.",
|
|
11648
11857
|
inputSchema: UserHomeDirInputSchema,
|
|
@@ -11665,7 +11874,7 @@ var CreateUserOutputSchema = z.object({
|
|
|
11665
11874
|
error: z.string().optional()
|
|
11666
11875
|
})
|
|
11667
11876
|
);
|
|
11668
|
-
async function
|
|
11877
|
+
async function run73(context) {
|
|
11669
11878
|
const { params, exec, run: runTask, error } = context;
|
|
11670
11879
|
const { user, create_home = true, create_group = true, system = false, sudo = true } = params;
|
|
11671
11880
|
if (!user) {
|
|
@@ -11712,7 +11921,7 @@ async function run72(context) {
|
|
|
11712
11921
|
};
|
|
11713
11922
|
}
|
|
11714
11923
|
}
|
|
11715
|
-
var create_default3 = task(
|
|
11924
|
+
var create_default3 = task(run73, {
|
|
11716
11925
|
name: "create",
|
|
11717
11926
|
description: "User create.",
|
|
11718
11927
|
inputSchema: CreateUserInputSchema,
|
|
@@ -11733,7 +11942,7 @@ var SetUserPasswordOutputSchema = z.object({
|
|
|
11733
11942
|
error: z.string().optional()
|
|
11734
11943
|
})
|
|
11735
11944
|
);
|
|
11736
|
-
async function
|
|
11945
|
+
async function run74(context) {
|
|
11737
11946
|
const { params, exec, error } = context;
|
|
11738
11947
|
const { user, password, sudo = true } = params;
|
|
11739
11948
|
if (!user || !password) {
|
|
@@ -11750,7 +11959,7 @@ async function run73(context) {
|
|
|
11750
11959
|
}
|
|
11751
11960
|
return { success: true };
|
|
11752
11961
|
}
|
|
11753
|
-
var set_password_default = task(
|
|
11962
|
+
var set_password_default = task(run74, {
|
|
11754
11963
|
name: "set_password",
|
|
11755
11964
|
description: "Sets a user password.",
|
|
11756
11965
|
inputSchema: SetUserPasswordInputSchema,
|
|
@@ -11889,7 +12098,7 @@ var GetUsernameOutputSchema = z.object({
|
|
|
11889
12098
|
username: z.string()
|
|
11890
12099
|
})
|
|
11891
12100
|
);
|
|
11892
|
-
async function
|
|
12101
|
+
async function run75(context) {
|
|
11893
12102
|
const { exec } = context;
|
|
11894
12103
|
const command = ["id", "-un"].filter(Boolean).join(" ");
|
|
11895
12104
|
const { success, stdout: username } = await exec(command);
|
|
@@ -11898,7 +12107,7 @@ async function run74(context) {
|
|
|
11898
12107
|
username: username.trim()
|
|
11899
12108
|
};
|
|
11900
12109
|
}
|
|
11901
|
-
var get_username_default = task(
|
|
12110
|
+
var get_username_default = task(run75, {
|
|
11902
12111
|
name: "get_username",
|
|
11903
12112
|
description: "User get username.",
|
|
11904
12113
|
inputSchema: GetUsernameInputSchema,
|
|
@@ -11921,7 +12130,7 @@ var CopyIdOutputSchema = z.object({
|
|
|
11921
12130
|
error: z.string().optional()
|
|
11922
12131
|
})
|
|
11923
12132
|
);
|
|
11924
|
-
async function
|
|
12133
|
+
async function run76(context) {
|
|
11925
12134
|
const { params, run: runTask, exec, log, info, error } = context;
|
|
11926
12135
|
let { public_key, user, sudo } = params;
|
|
11927
12136
|
const publicKeyTrimmed = public_key.trim();
|
|
@@ -12001,7 +12210,7 @@ async function run75(context) {
|
|
|
12001
12210
|
changed: true
|
|
12002
12211
|
};
|
|
12003
12212
|
}
|
|
12004
|
-
var copy_id_default = task(
|
|
12213
|
+
var copy_id_default = task(run76, {
|
|
12005
12214
|
name: "copy_id",
|
|
12006
12215
|
description: "ssh copy id.",
|
|
12007
12216
|
inputSchema: CopyIdInputSchema,
|
|
@@ -12028,7 +12237,7 @@ var SudoersCheckOutputSchema = z.object({
|
|
|
12028
12237
|
error: z.string().optional()
|
|
12029
12238
|
})
|
|
12030
12239
|
);
|
|
12031
|
-
async function
|
|
12240
|
+
async function run77(context) {
|
|
12032
12241
|
const { params, exec, error } = context;
|
|
12033
12242
|
const effectiveFile = params.file || "/etc/sudoers";
|
|
12034
12243
|
try {
|
|
@@ -12049,7 +12258,7 @@ async function run76(context) {
|
|
|
12049
12258
|
};
|
|
12050
12259
|
}
|
|
12051
12260
|
}
|
|
12052
|
-
var check_default = task(
|
|
12261
|
+
var check_default = task(run77, {
|
|
12053
12262
|
name: "check",
|
|
12054
12263
|
description: "Sudoers check.",
|
|
12055
12264
|
inputSchema: SudoersCheckInputSchema,
|
|
@@ -12552,10 +12761,10 @@ var AbstractPkgInstallInputSchema = AbstractPkgParamsSchema.extend({
|
|
|
12552
12761
|
package: PackageNameSchema
|
|
12553
12762
|
});
|
|
12554
12763
|
var AbstractPkgInstallOutputSchema = AbstractPkgResultSchema;
|
|
12555
|
-
async function
|
|
12764
|
+
async function run78(context) {
|
|
12556
12765
|
return await abstractInstall(context);
|
|
12557
12766
|
}
|
|
12558
|
-
var install_default5 = task(
|
|
12767
|
+
var install_default5 = task(run78, {
|
|
12559
12768
|
name: "install",
|
|
12560
12769
|
description: "Install packages using auto-detected or specified package manager",
|
|
12561
12770
|
inputSchema: AbstractPkgInstallInputSchema,
|
|
@@ -12567,10 +12776,10 @@ var AbstractPkgUninstallParamsSchema = AbstractPkgParamsSchema.extend({
|
|
|
12567
12776
|
package: PackageNameSchema
|
|
12568
12777
|
});
|
|
12569
12778
|
var AbstractPkgUninstallResultSchema = AbstractPkgResultSchema;
|
|
12570
|
-
async function
|
|
12779
|
+
async function run79(context) {
|
|
12571
12780
|
return await abstractUninstall(context);
|
|
12572
12781
|
}
|
|
12573
|
-
var uninstall_default5 = task(
|
|
12782
|
+
var uninstall_default5 = task(run79, {
|
|
12574
12783
|
description: "Uninstall packages using auto-detected or specified package manager",
|
|
12575
12784
|
inputSchema: AbstractPkgUninstallParamsSchema,
|
|
12576
12785
|
outputSchema: AbstractPkgUninstallResultSchema
|
|
@@ -12591,7 +12800,7 @@ var PkgInfoOutputSchema = z.object({
|
|
|
12591
12800
|
error: z.string().optional()
|
|
12592
12801
|
})
|
|
12593
12802
|
);
|
|
12594
|
-
async function
|
|
12803
|
+
async function run80(context) {
|
|
12595
12804
|
const { params: taskParams, run: runTask, exec, error } = context;
|
|
12596
12805
|
const osDetails = await runTask(os_default({}));
|
|
12597
12806
|
if (!osDetails.success) {
|
|
@@ -12639,7 +12848,7 @@ stderr: ${stderr}`
|
|
|
12639
12848
|
return { installed: false, success: false, error: e.message };
|
|
12640
12849
|
}
|
|
12641
12850
|
}
|
|
12642
|
-
var info_default6 = task(
|
|
12851
|
+
var info_default6 = task(run80, {
|
|
12643
12852
|
name: "info",
|
|
12644
12853
|
description: "Pkg info.",
|
|
12645
12854
|
inputSchema: PkgInfoInputSchema,
|
|
@@ -12703,7 +12912,7 @@ var PkgIsInstalledResultSchema = z.object({
|
|
|
12703
12912
|
);
|
|
12704
12913
|
|
|
12705
12914
|
// src/core/pkg/is_installed.ts
|
|
12706
|
-
async function
|
|
12915
|
+
async function run81(context) {
|
|
12707
12916
|
const { params, run: runTask } = context;
|
|
12708
12917
|
const info = await runTask(info_default6({ package: params.package }));
|
|
12709
12918
|
if (!info || typeof info !== "object") {
|
|
@@ -12718,7 +12927,7 @@ async function run80(context) {
|
|
|
12718
12927
|
}
|
|
12719
12928
|
return { success: true, installed: !!info.installed };
|
|
12720
12929
|
}
|
|
12721
|
-
var is_installed_default5 = task(
|
|
12930
|
+
var is_installed_default5 = task(run81, {
|
|
12722
12931
|
name: "is_installed",
|
|
12723
12932
|
description: "Checks if a package is installed on the system.",
|
|
12724
12933
|
inputSchema: PkgIsInstalledParamsSchema,
|
|
@@ -12726,7 +12935,7 @@ var is_installed_default5 = task(run80, {
|
|
|
12726
12935
|
});
|
|
12727
12936
|
|
|
12728
12937
|
// src/core/pkg/install-orig-dir/arch.ts
|
|
12729
|
-
async function
|
|
12938
|
+
async function run82(context) {
|
|
12730
12939
|
const { params: taskParams, exec } = context;
|
|
12731
12940
|
const { package: pkg, sudo = true } = taskParams;
|
|
12732
12941
|
const packages = Array.isArray(pkg) ? pkg : [pkg];
|
|
@@ -12738,7 +12947,7 @@ ${stderr}` };
|
|
|
12738
12947
|
}
|
|
12739
12948
|
return { success };
|
|
12740
12949
|
}
|
|
12741
|
-
var install = task(
|
|
12950
|
+
var install = task(run82, {
|
|
12742
12951
|
name: "arch",
|
|
12743
12952
|
description: "Installs a package using pacman on Arch-based systems (legacy dispatcher).",
|
|
12744
12953
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12757,7 +12966,7 @@ var RebootNeededOutputSchema = z.object({
|
|
|
12757
12966
|
error: z.string().optional()
|
|
12758
12967
|
})
|
|
12759
12968
|
);
|
|
12760
|
-
async function
|
|
12969
|
+
async function run83(context) {
|
|
12761
12970
|
const { run: runTask, exec, error, info, warn } = context;
|
|
12762
12971
|
const osDetails = await runTask(os_default());
|
|
12763
12972
|
if (!osDetails.success) {
|
|
@@ -12814,7 +13023,7 @@ async function run82(context) {
|
|
|
12814
13023
|
warn(`Unsupported OS (${baseOs}) for reboot_needed check.`);
|
|
12815
13024
|
return { reboot_needed: false, success: true };
|
|
12816
13025
|
}
|
|
12817
|
-
var reboot_needed_default = task(
|
|
13026
|
+
var reboot_needed_default = task(run83, {
|
|
12818
13027
|
name: "reboot_needed",
|
|
12819
13028
|
description: "Reboot needed.",
|
|
12820
13029
|
inputSchema: RebootNeededInputSchema,
|
|
@@ -12822,7 +13031,7 @@ var reboot_needed_default = task(run82, {
|
|
|
12822
13031
|
});
|
|
12823
13032
|
|
|
12824
13033
|
// src/core/pkg/install-orig-dir/debian.ts
|
|
12825
|
-
async function
|
|
13034
|
+
async function run84(context) {
|
|
12826
13035
|
const { params: taskParams, exec, run: runTask, debug } = context;
|
|
12827
13036
|
const { package: pkg, sudo = true } = taskParams;
|
|
12828
13037
|
const packages = Array.isArray(pkg) ? pkg.join(" ") : pkg;
|
|
@@ -12850,7 +13059,7 @@ ${needrestartResult.stderr}`
|
|
|
12850
13059
|
}
|
|
12851
13060
|
return { success: true };
|
|
12852
13061
|
}
|
|
12853
|
-
var install2 = task(
|
|
13062
|
+
var install2 = task(run84, {
|
|
12854
13063
|
name: "debian",
|
|
12855
13064
|
description: "Installs a package using apt on Debian-based systems (legacy dispatcher).",
|
|
12856
13065
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12858,7 +13067,7 @@ var install2 = task(run83, {
|
|
|
12858
13067
|
});
|
|
12859
13068
|
|
|
12860
13069
|
// src/core/pkg/install-orig-dir/fedora.ts
|
|
12861
|
-
async function
|
|
13070
|
+
async function run85(context) {
|
|
12862
13071
|
const { params: taskParams, exec } = context;
|
|
12863
13072
|
const { package: pkg, sudo = true } = taskParams;
|
|
12864
13073
|
const packages = Array.isArray(pkg) ? pkg : [pkg];
|
|
@@ -12870,7 +13079,7 @@ ${stderr}` };
|
|
|
12870
13079
|
}
|
|
12871
13080
|
return { success };
|
|
12872
13081
|
}
|
|
12873
|
-
var install3 = task(
|
|
13082
|
+
var install3 = task(run85, {
|
|
12874
13083
|
name: "fedora",
|
|
12875
13084
|
description: "Installs a package using dnf on Fedora-based systems (legacy dispatcher).",
|
|
12876
13085
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12878,7 +13087,7 @@ var install3 = task(run84, {
|
|
|
12878
13087
|
});
|
|
12879
13088
|
|
|
12880
13089
|
// src/core/pkg/install-orig.ts
|
|
12881
|
-
async function
|
|
13090
|
+
async function run86(context) {
|
|
12882
13091
|
const { params: taskParams, run: runTask, error } = context;
|
|
12883
13092
|
const osDetails = await runTask(os_default());
|
|
12884
13093
|
if (!osDetails?.success) {
|
|
@@ -12911,7 +13120,7 @@ async function run85(context) {
|
|
|
12911
13120
|
}
|
|
12912
13121
|
return installResult;
|
|
12913
13122
|
}
|
|
12914
|
-
var install4 = task(
|
|
13123
|
+
var install4 = task(run86, {
|
|
12915
13124
|
name: "install-orig",
|
|
12916
13125
|
description: "Installs a package using the appropriate OS package manager (original implementation).",
|
|
12917
13126
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12923,7 +13132,7 @@ var install_orig_default = install4;
|
|
|
12923
13132
|
var install_cp_default = install_orig_default;
|
|
12924
13133
|
|
|
12925
13134
|
// src/core/pkg/remove/arch.ts
|
|
12926
|
-
async function
|
|
13135
|
+
async function run87(context) {
|
|
12927
13136
|
const {
|
|
12928
13137
|
params: { package: pkg, sudo = true },
|
|
12929
13138
|
exec
|
|
@@ -12956,7 +13165,7 @@ async function run86(context) {
|
|
|
12956
13165
|
error: result.stderr
|
|
12957
13166
|
};
|
|
12958
13167
|
}
|
|
12959
|
-
var remove = task(
|
|
13168
|
+
var remove = task(run87, {
|
|
12960
13169
|
name: "arch",
|
|
12961
13170
|
description: "Remove package(s) on Arch Linux.",
|
|
12962
13171
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12964,7 +13173,7 @@ var remove = task(run86, {
|
|
|
12964
13173
|
});
|
|
12965
13174
|
|
|
12966
13175
|
// src/core/pkg/remove/debian.ts
|
|
12967
|
-
async function
|
|
13176
|
+
async function run88(context) {
|
|
12968
13177
|
const {
|
|
12969
13178
|
params: { package: pkg, sudo = true },
|
|
12970
13179
|
exec,
|
|
@@ -12988,7 +13197,7 @@ async function run87(context) {
|
|
|
12988
13197
|
await runTask(reboot_needed_default());
|
|
12989
13198
|
return { success: true };
|
|
12990
13199
|
}
|
|
12991
|
-
var remove2 = task(
|
|
13200
|
+
var remove2 = task(run88, {
|
|
12992
13201
|
name: "debian",
|
|
12993
13202
|
description: "Remove package(s) on Debian/Ubuntu.",
|
|
12994
13203
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12996,7 +13205,7 @@ var remove2 = task(run87, {
|
|
|
12996
13205
|
});
|
|
12997
13206
|
|
|
12998
13207
|
// src/core/pkg/remove/fedora.ts
|
|
12999
|
-
async function
|
|
13208
|
+
async function run89(context) {
|
|
13000
13209
|
const {
|
|
13001
13210
|
params: { package: pkg, sudo = true },
|
|
13002
13211
|
exec
|
|
@@ -13006,7 +13215,7 @@ async function run88(context) {
|
|
|
13006
13215
|
const { success } = await exec(commandArray.join(" "), { sudo });
|
|
13007
13216
|
return { success };
|
|
13008
13217
|
}
|
|
13009
|
-
var remove3 = task(
|
|
13218
|
+
var remove3 = task(run89, {
|
|
13010
13219
|
name: "fedora",
|
|
13011
13220
|
description: "Remove package(s) on Fedora.",
|
|
13012
13221
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -13014,7 +13223,7 @@ var remove3 = task(run88, {
|
|
|
13014
13223
|
});
|
|
13015
13224
|
|
|
13016
13225
|
// src/core/pkg/remove/index.ts
|
|
13017
|
-
async function
|
|
13226
|
+
async function run90(context) {
|
|
13018
13227
|
const { params: taskParams, run: runTask, error } = context;
|
|
13019
13228
|
const osDetails = await runTask(os_default());
|
|
13020
13229
|
if (osDetails instanceof Error) {
|
|
@@ -13043,7 +13252,7 @@ async function run89(context) {
|
|
|
13043
13252
|
}
|
|
13044
13253
|
return removeResult;
|
|
13045
13254
|
}
|
|
13046
|
-
var remove_default = task(
|
|
13255
|
+
var remove_default = task(run90, {
|
|
13047
13256
|
name: "remove",
|
|
13048
13257
|
description: "Removes a package using the appropriate OS package manager.",
|
|
13049
13258
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -13054,7 +13263,7 @@ var remove_default = task(run89, {
|
|
|
13054
13263
|
var remove_cp_default = remove_default;
|
|
13055
13264
|
|
|
13056
13265
|
// src/core/pkg/update/arch.ts
|
|
13057
|
-
async function
|
|
13266
|
+
async function run91(context) {
|
|
13058
13267
|
const {
|
|
13059
13268
|
params: { package: pkg, sudo = true },
|
|
13060
13269
|
exec
|
|
@@ -13066,10 +13275,10 @@ async function run90(context) {
|
|
|
13066
13275
|
const { success } = await exec(commandParts.filter(Boolean).join(" "), { sudo });
|
|
13067
13276
|
return { success };
|
|
13068
13277
|
}
|
|
13069
|
-
var update = task(
|
|
13278
|
+
var update = task(run91);
|
|
13070
13279
|
|
|
13071
13280
|
// src/core/pkg/update/debian.ts
|
|
13072
|
-
async function
|
|
13281
|
+
async function run92(context) {
|
|
13073
13282
|
const {
|
|
13074
13283
|
params: { package: pkg, sudo = true, fullUpgrade = false },
|
|
13075
13284
|
exec
|
|
@@ -13086,10 +13295,10 @@ async function run91(context) {
|
|
|
13086
13295
|
const { success } = await exec(`${prefix}apt-get install -y --only-upgrade ${packages.join(" ")}`, { sudo });
|
|
13087
13296
|
return { success };
|
|
13088
13297
|
}
|
|
13089
|
-
var update2 = task(
|
|
13298
|
+
var update2 = task(run92);
|
|
13090
13299
|
|
|
13091
13300
|
// src/core/pkg/update/fedora.ts
|
|
13092
|
-
async function
|
|
13301
|
+
async function run93(context) {
|
|
13093
13302
|
const {
|
|
13094
13303
|
params: { package: pkg, sudo = true },
|
|
13095
13304
|
exec
|
|
@@ -13103,10 +13312,10 @@ async function run92(context) {
|
|
|
13103
13312
|
const { success } = await exec(`${prefix}dnf upgrade -y ${packages.join(" ")}`, { sudo });
|
|
13104
13313
|
return { success };
|
|
13105
13314
|
}
|
|
13106
|
-
var update3 = task(
|
|
13315
|
+
var update3 = task(run93);
|
|
13107
13316
|
|
|
13108
13317
|
// src/core/pkg/update/index.ts
|
|
13109
|
-
async function
|
|
13318
|
+
async function run94(context) {
|
|
13110
13319
|
const { params: taskParams, run: runTask, error } = context;
|
|
13111
13320
|
const osDetails = await runTask(os_default());
|
|
13112
13321
|
if (osDetails instanceof Error) {
|
|
@@ -13131,7 +13340,7 @@ async function run93(context) {
|
|
|
13131
13340
|
}
|
|
13132
13341
|
return result;
|
|
13133
13342
|
}
|
|
13134
|
-
var update_default6 = task(
|
|
13343
|
+
var update_default6 = task(run94, {
|
|
13135
13344
|
name: "update",
|
|
13136
13345
|
description: "Updates packages using the appropriate OS package manager.",
|
|
13137
13346
|
inputSchema: PkgUpdateParamsSchema,
|
|
@@ -13149,13 +13358,13 @@ var AbstractPkgSearchParamsSchema = z.object({
|
|
|
13149
13358
|
packageManager: z.string().optional()
|
|
13150
13359
|
});
|
|
13151
13360
|
var AbstractPkgSearchResultSchema = AbstractPkgResultSchema;
|
|
13152
|
-
async function
|
|
13361
|
+
async function run95(context) {
|
|
13153
13362
|
const result = await abstractSearch(context);
|
|
13154
13363
|
return {
|
|
13155
13364
|
...result
|
|
13156
13365
|
};
|
|
13157
13366
|
}
|
|
13158
|
-
var search_default5 = task(
|
|
13367
|
+
var search_default5 = task(run95, {
|
|
13159
13368
|
description: "Search for packages using auto-detected or specified package manager",
|
|
13160
13369
|
inputSchema: AbstractPkgSearchParamsSchema,
|
|
13161
13370
|
outputSchema: AbstractPkgSearchResultSchema
|
|
@@ -13167,10 +13376,10 @@ var AbstractPkgListParamsSchema = z.object({
|
|
|
13167
13376
|
packageManager: z.string().optional()
|
|
13168
13377
|
});
|
|
13169
13378
|
var AbstractPkgListResultSchema = AbstractPkgResultSchema;
|
|
13170
|
-
async function
|
|
13379
|
+
async function run96(context) {
|
|
13171
13380
|
return await abstractList(context);
|
|
13172
13381
|
}
|
|
13173
|
-
var list_default7 = task(
|
|
13382
|
+
var list_default7 = task(run96, {
|
|
13174
13383
|
description: "List installed packages using auto-detected or specified package manager",
|
|
13175
13384
|
inputSchema: AbstractPkgListParamsSchema,
|
|
13176
13385
|
outputSchema: AbstractPkgListResultSchema
|
|
@@ -13182,10 +13391,10 @@ var AbstractPkgCleanParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
13182
13391
|
sudo: true
|
|
13183
13392
|
});
|
|
13184
13393
|
var AbstractPkgCleanResultSchema = AbstractPkgResultSchema;
|
|
13185
|
-
async function
|
|
13394
|
+
async function run97(context) {
|
|
13186
13395
|
return await abstractClean(context);
|
|
13187
13396
|
}
|
|
13188
|
-
var clean_default5 = task(
|
|
13397
|
+
var clean_default5 = task(run97, {
|
|
13189
13398
|
description: "Clean package cache using auto-detected or specified package manager",
|
|
13190
13399
|
inputSchema: AbstractPkgCleanParamsSchema,
|
|
13191
13400
|
outputSchema: AbstractPkgCleanResultSchema
|
|
@@ -13239,7 +13448,7 @@ var K3supInstallOutputSchema = z.object({
|
|
|
13239
13448
|
/** The command that would be run if --print-command was used */
|
|
13240
13449
|
executedCommand: z.string().optional()
|
|
13241
13450
|
});
|
|
13242
|
-
async function
|
|
13451
|
+
async function run98(context) {
|
|
13243
13452
|
const { params, exec, log, error, debug } = context;
|
|
13244
13453
|
const k3supCmd = ["k3sup", "install"];
|
|
13245
13454
|
const addFlag = (flag, condition) => {
|
|
@@ -13297,7 +13506,7 @@ async function run97(context) {
|
|
|
13297
13506
|
throw e;
|
|
13298
13507
|
}
|
|
13299
13508
|
}
|
|
13300
|
-
var k3sup_install_default = task(
|
|
13509
|
+
var k3sup_install_default = task(run98, {
|
|
13301
13510
|
name: "k3sup-install",
|
|
13302
13511
|
description: "K3s k3sup-install.",
|
|
13303
13512
|
inputSchema: K3supInstallInputSchema,
|
|
@@ -14061,7 +14270,7 @@ var AddUsersOutputSchema = z.object({
|
|
|
14061
14270
|
error: z.string().optional()
|
|
14062
14271
|
})
|
|
14063
14272
|
);
|
|
14064
|
-
async function
|
|
14273
|
+
async function run99(context) {
|
|
14065
14274
|
const { params, info, warn, error, run: runTask } = context;
|
|
14066
14275
|
const { users } = params;
|
|
14067
14276
|
if (!users || users.length === 0) {
|
|
@@ -14094,7 +14303,7 @@ async function run98(context) {
|
|
|
14094
14303
|
return { success: false, error: message };
|
|
14095
14304
|
}
|
|
14096
14305
|
}
|
|
14097
|
-
var add_users_default = task(
|
|
14306
|
+
var add_users_default = task(run99, {
|
|
14098
14307
|
description: "Adds one or more users to the docker group.",
|
|
14099
14308
|
inputSchema: AddUsersInputSchema,
|
|
14100
14309
|
outputSchema: AddUsersOutputSchema
|
|
@@ -14114,7 +14323,7 @@ var InstallComposeOutputSchema = z.object({
|
|
|
14114
14323
|
error: z.string().optional()
|
|
14115
14324
|
})
|
|
14116
14325
|
);
|
|
14117
|
-
async function
|
|
14326
|
+
async function run100(context) {
|
|
14118
14327
|
const { params, info, error, run: runTask } = context;
|
|
14119
14328
|
const version2 = params.version ?? "v2.24.5";
|
|
14120
14329
|
const composePath = params.path ?? "/usr/local/bin/docker-compose";
|
|
@@ -14152,7 +14361,7 @@ async function run99(context) {
|
|
|
14152
14361
|
return { success: false, error: message };
|
|
14153
14362
|
}
|
|
14154
14363
|
}
|
|
14155
|
-
var install_compose_default = task(
|
|
14364
|
+
var install_compose_default = task(run100, {
|
|
14156
14365
|
description: "Installs the Docker Compose standalone binary.",
|
|
14157
14366
|
inputSchema: InstallComposeInputSchema,
|
|
14158
14367
|
outputSchema: InstallComposeOutputSchema
|
|
@@ -14175,7 +14384,7 @@ var DockerInstallOutputSchema = z.object({
|
|
|
14175
14384
|
error: z.string().optional()
|
|
14176
14385
|
})
|
|
14177
14386
|
);
|
|
14178
|
-
async function
|
|
14387
|
+
async function run101(context) {
|
|
14179
14388
|
const { info, run: runTask, params, error: logError2 } = context;
|
|
14180
14389
|
const installComposePlugin = params.install_compose_plugin !== false;
|
|
14181
14390
|
const installComposeStandalone = params.install_compose_standalone === true;
|
|
@@ -14414,7 +14623,7 @@ function sanitizeSystemctlState(value) {
|
|
|
14414
14623
|
}
|
|
14415
14624
|
return value.replace(/\u001b\][^\u001b]*\u001b\\/g, "").replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, "").trim().toLowerCase();
|
|
14416
14625
|
}
|
|
14417
|
-
var install_default6 = task(
|
|
14626
|
+
var install_default6 = task(run101, {
|
|
14418
14627
|
name: "install",
|
|
14419
14628
|
description: "Installs and configures Docker, Docker Compose, and group membership.",
|
|
14420
14629
|
inputSchema: DockerInstallInputSchema,
|
|
@@ -14563,7 +14772,7 @@ var DockerRunContainerOutputSchema = z.object({
|
|
|
14563
14772
|
containerName: z.string().optional(),
|
|
14564
14773
|
error: z.string().optional()
|
|
14565
14774
|
});
|
|
14566
|
-
async function
|
|
14775
|
+
async function run102(context) {
|
|
14567
14776
|
const { params, exec, info, error: logError2 } = context;
|
|
14568
14777
|
if (!params.image) {
|
|
14569
14778
|
const message = "Docker image is required.";
|
|
@@ -14604,7 +14813,7 @@ async function run101(context) {
|
|
|
14604
14813
|
containerName: params.name
|
|
14605
14814
|
};
|
|
14606
14815
|
}
|
|
14607
|
-
var run_container_default = task(
|
|
14816
|
+
var run_container_default = task(run102, {
|
|
14608
14817
|
description: "Runs a Docker container and returns its output (attached).",
|
|
14609
14818
|
inputSchema: DockerRunContainerInputSchema,
|
|
14610
14819
|
outputSchema: DockerRunContainerOutputSchema
|
|
@@ -14621,7 +14830,7 @@ var DockerRunDetachedOutputSchema = z.object({
|
|
|
14621
14830
|
containerName: z.string().optional(),
|
|
14622
14831
|
error: z.string().optional()
|
|
14623
14832
|
});
|
|
14624
|
-
async function
|
|
14833
|
+
async function run103(context) {
|
|
14625
14834
|
const { params, exec, info, error: logError2 } = context;
|
|
14626
14835
|
if (!params.image) {
|
|
14627
14836
|
const message = "Docker image is required.";
|
|
@@ -14661,7 +14870,7 @@ async function run102(context) {
|
|
|
14661
14870
|
containerName: params.name
|
|
14662
14871
|
};
|
|
14663
14872
|
}
|
|
14664
|
-
var run_container_detached_default = task(
|
|
14873
|
+
var run_container_detached_default = task(run103, {
|
|
14665
14874
|
description: "Runs a Docker container in detached mode and returns its metadata.",
|
|
14666
14875
|
inputSchema: DockerRunDetachedInputSchema,
|
|
14667
14876
|
outputSchema: DockerRunDetachedOutputSchema
|
|
@@ -14720,7 +14929,7 @@ var ProcessListOutputSchema = z.object({
|
|
|
14720
14929
|
error: z.string().optional()
|
|
14721
14930
|
})
|
|
14722
14931
|
);
|
|
14723
|
-
async function
|
|
14932
|
+
async function run104(context) {
|
|
14724
14933
|
const { params, exec, debug, error } = context;
|
|
14725
14934
|
const { user, command, limit, sort, reverse } = params;
|
|
14726
14935
|
try {
|
|
@@ -14806,7 +15015,7 @@ async function run103(context) {
|
|
|
14806
15015
|
return { success: false, error: errorMsg };
|
|
14807
15016
|
}
|
|
14808
15017
|
}
|
|
14809
|
-
var list_default8 = task(
|
|
15018
|
+
var list_default8 = task(run104, {
|
|
14810
15019
|
name: "list",
|
|
14811
15020
|
description: "Lists processes on the system.",
|
|
14812
15021
|
inputSchema: ProcessListInputSchema,
|
|
@@ -14852,7 +15061,7 @@ var ProcessSearchOutputSchema = z.object({
|
|
|
14852
15061
|
error: z.string().optional()
|
|
14853
15062
|
})
|
|
14854
15063
|
);
|
|
14855
|
-
async function
|
|
15064
|
+
async function run105(context) {
|
|
14856
15065
|
const { params, exec, debug, error } = context;
|
|
14857
15066
|
const { name, user, pid, ppid, args, state, regex = false, ignoreCase = false, limit } = params;
|
|
14858
15067
|
debug(`Searching processes with params: ${JSON.stringify(params)}`);
|
|
@@ -14966,7 +15175,7 @@ function filterProcesses(processes, filters) {
|
|
|
14966
15175
|
return true;
|
|
14967
15176
|
});
|
|
14968
15177
|
}
|
|
14969
|
-
var search_default6 = task(
|
|
15178
|
+
var search_default6 = task(run105, {
|
|
14970
15179
|
name: "search",
|
|
14971
15180
|
description: "Search for processes matching specified criteria.",
|
|
14972
15181
|
inputSchema: ProcessSearchInputSchema,
|
|
@@ -14994,7 +15203,7 @@ var ProcessKillOutputSchema = z.object({
|
|
|
14994
15203
|
error: z.string().optional()
|
|
14995
15204
|
})
|
|
14996
15205
|
);
|
|
14997
|
-
async function
|
|
15206
|
+
async function run106(context) {
|
|
14998
15207
|
const { params, exec, debug, error } = context;
|
|
14999
15208
|
const { pid, user, command, signal = "TERM", force = false, sudo = false } = params;
|
|
15000
15209
|
try {
|
|
@@ -15082,7 +15291,7 @@ async function run105(context) {
|
|
|
15082
15291
|
return { success: false, error: errorMsg };
|
|
15083
15292
|
}
|
|
15084
15293
|
}
|
|
15085
|
-
var kill_default = task(
|
|
15294
|
+
var kill_default = task(run106, {
|
|
15086
15295
|
name: "kill",
|
|
15087
15296
|
description: "Kills processes matching specified criteria. Requires at least one filtering parameter (pid, user, or command) to prevent accidental killing of all processes.",
|
|
15088
15297
|
inputSchema: ProcessKillInputSchema,
|
|
@@ -15103,7 +15312,7 @@ var ProcessSignalOutputSchema = z.object({
|
|
|
15103
15312
|
error: z.string().optional()
|
|
15104
15313
|
})
|
|
15105
15314
|
);
|
|
15106
|
-
async function
|
|
15315
|
+
async function run107(context) {
|
|
15107
15316
|
const { params, exec, debug, error } = context;
|
|
15108
15317
|
const { pid, signal = "TERM", sudo = false } = params;
|
|
15109
15318
|
if (!pid || pid <= 0) {
|
|
@@ -15126,7 +15335,7 @@ async function run106(context) {
|
|
|
15126
15335
|
return { success: false, error: errorMsg };
|
|
15127
15336
|
}
|
|
15128
15337
|
}
|
|
15129
|
-
var signal_default = task(
|
|
15338
|
+
var signal_default = task(run107, {
|
|
15130
15339
|
name: "signal",
|
|
15131
15340
|
description: "Sends a signal to a process.",
|
|
15132
15341
|
inputSchema: ProcessSignalInputSchema,
|
|
@@ -15162,7 +15371,7 @@ var ProcessInfoOutputSchema = z.object({
|
|
|
15162
15371
|
error: z.string().optional()
|
|
15163
15372
|
})
|
|
15164
15373
|
);
|
|
15165
|
-
async function
|
|
15374
|
+
async function run108(context) {
|
|
15166
15375
|
const { params, exec, debug, error } = context;
|
|
15167
15376
|
const { pid } = params;
|
|
15168
15377
|
if (!pid || pid <= 0) {
|
|
@@ -15238,7 +15447,7 @@ async function run107(context) {
|
|
|
15238
15447
|
return { success: false, error: errorMsg };
|
|
15239
15448
|
}
|
|
15240
15449
|
}
|
|
15241
|
-
var info_default7 = task(
|
|
15450
|
+
var info_default7 = task(run108, {
|
|
15242
15451
|
name: "info",
|
|
15243
15452
|
description: "Gets detailed information about a specific process.",
|
|
15244
15453
|
inputSchema: ProcessInfoInputSchema,
|
|
@@ -15302,7 +15511,7 @@ var ProcessTopOutputSchema = z.object({
|
|
|
15302
15511
|
timestamp: z.string()
|
|
15303
15512
|
})
|
|
15304
15513
|
);
|
|
15305
|
-
async function
|
|
15514
|
+
async function run109(context) {
|
|
15306
15515
|
const { params, exec, debug, error } = context;
|
|
15307
15516
|
const {
|
|
15308
15517
|
limit = 10,
|
|
@@ -15464,7 +15673,7 @@ function sortProcesses(processes, sort) {
|
|
|
15464
15673
|
}
|
|
15465
15674
|
});
|
|
15466
15675
|
}
|
|
15467
|
-
var top_default = task(
|
|
15676
|
+
var top_default = task(run109, {
|
|
15468
15677
|
name: "top",
|
|
15469
15678
|
description: "Get top processes with system information.",
|
|
15470
15679
|
inputSchema: ProcessTopInputSchema,
|
|
@@ -15528,7 +15737,7 @@ var ProcessStatsOutputSchema = z.object({
|
|
|
15528
15737
|
timestamp: z.string()
|
|
15529
15738
|
})
|
|
15530
15739
|
);
|
|
15531
|
-
async function
|
|
15740
|
+
async function run110(context) {
|
|
15532
15741
|
const { params, exec, debug, error } = context;
|
|
15533
15742
|
const { includeUsers = true, includeStates = true, includeCommands = false, commandLimit = 10 } = params;
|
|
15534
15743
|
debug(`Getting process statistics with params: ${JSON.stringify(params)}`);
|
|
@@ -15706,7 +15915,7 @@ function calculateCommandStats(processes, limit) {
|
|
|
15706
15915
|
}
|
|
15707
15916
|
return Array.from(commandMap.values()).sort((a, b) => b.cpu - a.cpu).slice(0, limit);
|
|
15708
15917
|
}
|
|
15709
|
-
var stats_default = task(
|
|
15918
|
+
var stats_default = task(run110, {
|
|
15710
15919
|
name: "stats",
|
|
15711
15920
|
description: "Get system-wide process statistics.",
|
|
15712
15921
|
inputSchema: ProcessStatsInputSchema,
|
|
@@ -15741,7 +15950,7 @@ var ProcessChildrenOutputSchema = z.object({
|
|
|
15741
15950
|
error: z.string().optional()
|
|
15742
15951
|
})
|
|
15743
15952
|
);
|
|
15744
|
-
async function
|
|
15953
|
+
async function run111(context) {
|
|
15745
15954
|
const { params, exec, debug, error } = context;
|
|
15746
15955
|
const { pid, recursive = false, maxDepth } = params;
|
|
15747
15956
|
debug(`Getting children for process ${pid} with params: ${JSON.stringify(params)}`);
|
|
@@ -15826,7 +16035,7 @@ async function getDescendants(exec, parentPid, currentDepth, maxDepth) {
|
|
|
15826
16035
|
}
|
|
15827
16036
|
return allDescendants;
|
|
15828
16037
|
}
|
|
15829
|
-
var children_default = task(
|
|
16038
|
+
var children_default = task(run111, {
|
|
15830
16039
|
name: "children",
|
|
15831
16040
|
description: "Get child processes of a given PID.",
|
|
15832
16041
|
inputSchema: ProcessChildrenInputSchema,
|
|
@@ -15859,7 +16068,7 @@ var RebootOutputSchema = z.object({
|
|
|
15859
16068
|
error: z.string().optional(),
|
|
15860
16069
|
status: z.string()
|
|
15861
16070
|
});
|
|
15862
|
-
async function
|
|
16071
|
+
async function run112(context) {
|
|
15863
16072
|
const { params, info, warn, exec } = context;
|
|
15864
16073
|
const time = params.time || "now";
|
|
15865
16074
|
const sudo = params.sudo ?? true;
|
|
@@ -15892,7 +16101,7 @@ stderr: ${stderr}`
|
|
|
15892
16101
|
};
|
|
15893
16102
|
}
|
|
15894
16103
|
}
|
|
15895
|
-
var reboot_default = task(
|
|
16104
|
+
var reboot_default = task(run112, {
|
|
15896
16105
|
description: "Reboots a system",
|
|
15897
16106
|
inputSchema: RebootInputSchema,
|
|
15898
16107
|
outputSchema: RebootOutputSchema
|
|
@@ -15912,7 +16121,7 @@ var ShutdownOutputSchema = z.object({
|
|
|
15912
16121
|
error: z.string().optional(),
|
|
15913
16122
|
status: z.string()
|
|
15914
16123
|
});
|
|
15915
|
-
async function
|
|
16124
|
+
async function run113(context) {
|
|
15916
16125
|
const { params, info, warn, exec } = context;
|
|
15917
16126
|
const time = params.time || "now";
|
|
15918
16127
|
const sudo = params.sudo ?? true;
|
|
@@ -15944,7 +16153,7 @@ stderr: ${stderr}`
|
|
|
15944
16153
|
};
|
|
15945
16154
|
}
|
|
15946
16155
|
}
|
|
15947
|
-
var shutdown_default = task(
|
|
16156
|
+
var shutdown_default = task(run113, {
|
|
15948
16157
|
description: "Shuts down a system",
|
|
15949
16158
|
inputSchema: ShutdownInputSchema,
|
|
15950
16159
|
outputSchema: ShutdownOutputSchema
|
|
@@ -15965,7 +16174,7 @@ var RebootIfNeededOutputSchema = z.object({
|
|
|
15965
16174
|
error: z.string().optional()
|
|
15966
16175
|
})
|
|
15967
16176
|
);
|
|
15968
|
-
async function
|
|
16177
|
+
async function run114(context) {
|
|
15969
16178
|
const { params, run: runTask, exec, error, info, warn } = context;
|
|
15970
16179
|
const delayInSeconds = Math.max(1, params.delay ?? 1);
|
|
15971
16180
|
const message = params.message ?? "Reboot is required. Initiating reboot sequence.";
|
|
@@ -15995,7 +16204,7 @@ ${stderr}`;
|
|
|
15995
16204
|
}
|
|
15996
16205
|
return { rebooting: true, success: true };
|
|
15997
16206
|
}
|
|
15998
|
-
var reboot_if_needed_default = task(
|
|
16207
|
+
var reboot_if_needed_default = task(run114, {
|
|
15999
16208
|
name: "reboot_if_needed",
|
|
16000
16209
|
description: "Reboot if needed.",
|
|
16001
16210
|
inputSchema: RebootIfNeededInputSchema,
|
|
@@ -16012,7 +16221,7 @@ var SystemUptimeOutputSchema = z.object({
|
|
|
16012
16221
|
days: z.number().optional(),
|
|
16013
16222
|
error: z.string().optional()
|
|
16014
16223
|
});
|
|
16015
|
-
async function
|
|
16224
|
+
async function run115(context) {
|
|
16016
16225
|
const { params, exec, error } = context;
|
|
16017
16226
|
const sudo = params.sudo ?? false;
|
|
16018
16227
|
const { success, stdout, stderr } = await exec(["cat", "/proc/uptime"], { sudo });
|
|
@@ -16031,7 +16240,7 @@ async function run114(context) {
|
|
|
16031
16240
|
days: Math.floor(uptimeSeconds / 86400)
|
|
16032
16241
|
};
|
|
16033
16242
|
}
|
|
16034
|
-
var uptime_default = task(
|
|
16243
|
+
var uptime_default = task(run115, {
|
|
16035
16244
|
name: "uptime",
|
|
16036
16245
|
description: "Report system uptime.",
|
|
16037
16246
|
inputSchema: SystemUptimeInputSchema,
|
|
@@ -16056,7 +16265,7 @@ var SystemDatetimeOutputSchema = z.object({
|
|
|
16056
16265
|
error: z.string().optional()
|
|
16057
16266
|
})
|
|
16058
16267
|
);
|
|
16059
|
-
async function
|
|
16268
|
+
async function run116(context) {
|
|
16060
16269
|
const { params, exec } = context;
|
|
16061
16270
|
const sudo = params.sudo ?? false;
|
|
16062
16271
|
const isoResult = await exec(["date", "--iso-8601=seconds"], { sudo }).catch((error) => error);
|
|
@@ -16077,7 +16286,7 @@ async function run115(context) {
|
|
|
16077
16286
|
timezone
|
|
16078
16287
|
};
|
|
16079
16288
|
}
|
|
16080
|
-
var datetime_default = task(
|
|
16289
|
+
var datetime_default = task(run116, {
|
|
16081
16290
|
name: "datetime",
|
|
16082
16291
|
description: "Report system time and timezone.",
|
|
16083
16292
|
inputSchema: SystemDatetimeInputSchema,
|
|
@@ -16104,7 +16313,7 @@ var SystemHardwareOutputSchema = z.object({
|
|
|
16104
16313
|
error: z.string().optional()
|
|
16105
16314
|
})
|
|
16106
16315
|
);
|
|
16107
|
-
async function
|
|
16316
|
+
async function run117(context) {
|
|
16108
16317
|
const { params, exec } = context;
|
|
16109
16318
|
const sudo = params.sudo ?? false;
|
|
16110
16319
|
const archResult = await exec(["uname", "-m"], { sudo }).catch((error) => error);
|
|
@@ -16131,7 +16340,7 @@ async function run116(context) {
|
|
|
16131
16340
|
memTotalKb: Number.isFinite(memTotalKb ?? NaN) ? memTotalKb : void 0
|
|
16132
16341
|
};
|
|
16133
16342
|
}
|
|
16134
|
-
var hardware_default = task(
|
|
16343
|
+
var hardware_default = task(run117, {
|
|
16135
16344
|
name: "hardware",
|
|
16136
16345
|
description: "Report CPU and memory details.",
|
|
16137
16346
|
inputSchema: SystemHardwareInputSchema,
|
|
@@ -16163,7 +16372,7 @@ var SystemdDisableOutputSchema = z.object({
|
|
|
16163
16372
|
error: z.string().optional()
|
|
16164
16373
|
})
|
|
16165
16374
|
);
|
|
16166
|
-
async function
|
|
16375
|
+
async function run118(context) {
|
|
16167
16376
|
const { params, exec, error } = context;
|
|
16168
16377
|
const { service, sudo = false } = params;
|
|
16169
16378
|
if (!service) {
|
|
@@ -16186,7 +16395,7 @@ async function run117(context) {
|
|
|
16186
16395
|
};
|
|
16187
16396
|
}
|
|
16188
16397
|
}
|
|
16189
|
-
var disable_default = task(
|
|
16398
|
+
var disable_default = task(run118, {
|
|
16190
16399
|
name: "disable",
|
|
16191
16400
|
description: "Systemd disable.",
|
|
16192
16401
|
inputSchema: SystemdDisableInputSchema,
|
|
@@ -16206,7 +16415,7 @@ var SystemdEnableOutputSchema = z.object({
|
|
|
16206
16415
|
error: z.string().optional()
|
|
16207
16416
|
})
|
|
16208
16417
|
);
|
|
16209
|
-
async function
|
|
16418
|
+
async function run119(context) {
|
|
16210
16419
|
const { params, exec, error } = context;
|
|
16211
16420
|
const { service, sudo = false } = params;
|
|
16212
16421
|
if (!service) {
|
|
@@ -16229,7 +16438,7 @@ async function run118(context) {
|
|
|
16229
16438
|
};
|
|
16230
16439
|
}
|
|
16231
16440
|
}
|
|
16232
|
-
var enable_default = task(
|
|
16441
|
+
var enable_default = task(run119, {
|
|
16233
16442
|
name: "enable",
|
|
16234
16443
|
description: "Systemd enable.",
|
|
16235
16444
|
inputSchema: SystemdEnableInputSchema,
|
|
@@ -16249,7 +16458,7 @@ var SystemdRestartOutputSchema = z.object({
|
|
|
16249
16458
|
error: z.string().optional()
|
|
16250
16459
|
})
|
|
16251
16460
|
);
|
|
16252
|
-
async function
|
|
16461
|
+
async function run120(context) {
|
|
16253
16462
|
const { params, exec, error } = context;
|
|
16254
16463
|
const { service, sudo = false } = params;
|
|
16255
16464
|
if (!service) {
|
|
@@ -16276,7 +16485,7 @@ async function run119(context) {
|
|
|
16276
16485
|
};
|
|
16277
16486
|
}
|
|
16278
16487
|
}
|
|
16279
|
-
var restart_default = task(
|
|
16488
|
+
var restart_default = task(run120, {
|
|
16280
16489
|
name: "restart",
|
|
16281
16490
|
description: "Systemd restart.",
|
|
16282
16491
|
inputSchema: SystemdRestartInputSchema,
|
|
@@ -16296,7 +16505,7 @@ var SystemdStartOutputSchema = z.object({
|
|
|
16296
16505
|
error: z.string().optional()
|
|
16297
16506
|
})
|
|
16298
16507
|
);
|
|
16299
|
-
async function
|
|
16508
|
+
async function run121(context) {
|
|
16300
16509
|
const { params, exec, error } = context;
|
|
16301
16510
|
const { service, sudo = false } = params;
|
|
16302
16511
|
if (!service) {
|
|
@@ -16319,7 +16528,7 @@ async function run120(context) {
|
|
|
16319
16528
|
};
|
|
16320
16529
|
}
|
|
16321
16530
|
}
|
|
16322
|
-
var start_default = task(
|
|
16531
|
+
var start_default = task(run121, {
|
|
16323
16532
|
name: "start",
|
|
16324
16533
|
description: "Systemd start.",
|
|
16325
16534
|
inputSchema: SystemdStartInputSchema,
|
|
@@ -16339,7 +16548,7 @@ var SystemdStopOutputSchema = z.object({
|
|
|
16339
16548
|
error: z.string().optional()
|
|
16340
16549
|
})
|
|
16341
16550
|
);
|
|
16342
|
-
async function
|
|
16551
|
+
async function run122(context) {
|
|
16343
16552
|
const { params, exec, error } = context;
|
|
16344
16553
|
const { service, sudo = false } = params;
|
|
16345
16554
|
if (!service) {
|
|
@@ -16366,7 +16575,7 @@ async function run121(context) {
|
|
|
16366
16575
|
};
|
|
16367
16576
|
}
|
|
16368
16577
|
}
|
|
16369
|
-
var stop_default = task(
|
|
16578
|
+
var stop_default = task(run122, {
|
|
16370
16579
|
name: "stop",
|
|
16371
16580
|
description: "Systemd stop.",
|
|
16372
16581
|
inputSchema: SystemdStopInputSchema,
|
|
@@ -16386,7 +16595,7 @@ var SystemdReloadOutputSchema = z.object({
|
|
|
16386
16595
|
error: z.string().optional()
|
|
16387
16596
|
})
|
|
16388
16597
|
);
|
|
16389
|
-
async function
|
|
16598
|
+
async function run123(context) {
|
|
16390
16599
|
const { params, exec, error } = context;
|
|
16391
16600
|
const { service, sudo = false } = params;
|
|
16392
16601
|
if (!service) {
|
|
@@ -16407,7 +16616,7 @@ async function run122(context) {
|
|
|
16407
16616
|
};
|
|
16408
16617
|
}
|
|
16409
16618
|
}
|
|
16410
|
-
var reload_default = task(
|
|
16619
|
+
var reload_default = task(run123, {
|
|
16411
16620
|
name: "reload",
|
|
16412
16621
|
description: "Reloads a systemd service (e.g., re-reads configuration without full restart).",
|
|
16413
16622
|
inputSchema: SystemdReloadInputSchema,
|
|
@@ -16429,7 +16638,7 @@ var SystemdStatusOutputSchema = z.object({
|
|
|
16429
16638
|
error: z.string().optional()
|
|
16430
16639
|
})
|
|
16431
16640
|
);
|
|
16432
|
-
async function
|
|
16641
|
+
async function run124(context) {
|
|
16433
16642
|
const { params, exec, error } = context;
|
|
16434
16643
|
const { service, sudo = false } = params;
|
|
16435
16644
|
if (!service) {
|
|
@@ -16452,7 +16661,7 @@ async function run123(context) {
|
|
|
16452
16661
|
};
|
|
16453
16662
|
}
|
|
16454
16663
|
}
|
|
16455
|
-
var status_default = task(
|
|
16664
|
+
var status_default = task(run124, {
|
|
16456
16665
|
name: "status",
|
|
16457
16666
|
description: "Checks systemd service status.",
|
|
16458
16667
|
inputSchema: SystemdStatusInputSchema,
|
|
@@ -16482,7 +16691,7 @@ var TemplateWriteOutputSchema = z.object({
|
|
|
16482
16691
|
path: z.string()
|
|
16483
16692
|
});
|
|
16484
16693
|
async function runFn3(context) {
|
|
16485
|
-
const { params, warn, error, debug, run:
|
|
16694
|
+
const { params, warn, error, debug, run: run253, file, exec } = context;
|
|
16486
16695
|
const { template, template_file, variables, to, mode, owner, group, sudo } = params;
|
|
16487
16696
|
let templateContent = template;
|
|
16488
16697
|
if (template && template_file) {
|
|
@@ -16537,7 +16746,7 @@ EOF`;
|
|
|
16537
16746
|
debug(`Setting mode ${mode} for ${outputPath}`);
|
|
16538
16747
|
try {
|
|
16539
16748
|
const chmodParams = { path: outputPath, mode, sudo };
|
|
16540
|
-
const chmodResult = await
|
|
16749
|
+
const chmodResult = await run253(chmod_default(chmodParams));
|
|
16541
16750
|
if (chmodResult instanceof Error) {
|
|
16542
16751
|
error(`Error setting mode for ${outputPath}: ${chmodResult.message}`);
|
|
16543
16752
|
overallSuccess = false;
|
|
@@ -16563,7 +16772,7 @@ EOF`;
|
|
|
16563
16772
|
if (group) {
|
|
16564
16773
|
chownTaskParams.group = group;
|
|
16565
16774
|
}
|
|
16566
|
-
const chownResult = await
|
|
16775
|
+
const chownResult = await run253(chown_default(chownTaskParams));
|
|
16567
16776
|
if (chownResult instanceof Error) {
|
|
16568
16777
|
error(`Error setting owner/group for ${outputPath}: ${chownResult.message}`);
|
|
16569
16778
|
overallSuccess = false;
|
|
@@ -16623,7 +16832,7 @@ var UfwAllowOutputSchema = z.object({
|
|
|
16623
16832
|
error: z.string().optional()
|
|
16624
16833
|
})
|
|
16625
16834
|
);
|
|
16626
|
-
async function
|
|
16835
|
+
async function run125(context) {
|
|
16627
16836
|
const { params, exec, info } = context;
|
|
16628
16837
|
const { port, proto = "tcp", from } = params;
|
|
16629
16838
|
if (!port) {
|
|
@@ -16654,7 +16863,7 @@ async function run124(context) {
|
|
|
16654
16863
|
return { success: false, error };
|
|
16655
16864
|
}
|
|
16656
16865
|
}
|
|
16657
|
-
var allow_default = task(
|
|
16866
|
+
var allow_default = task(run125, {
|
|
16658
16867
|
description: "Allows a port through UFW firewall.",
|
|
16659
16868
|
inputSchema: UfwAllowInputSchema,
|
|
16660
16869
|
outputSchema: UfwAllowOutputSchema
|
|
@@ -16675,7 +16884,7 @@ var UfwDenyOutputSchema = z.object({
|
|
|
16675
16884
|
error: z.string().optional()
|
|
16676
16885
|
})
|
|
16677
16886
|
);
|
|
16678
|
-
async function
|
|
16887
|
+
async function run126(context) {
|
|
16679
16888
|
const { params, exec, error, info } = context;
|
|
16680
16889
|
const { port, proto = "tcp", from } = params;
|
|
16681
16890
|
if (!port) {
|
|
@@ -16706,7 +16915,7 @@ async function run125(context) {
|
|
|
16706
16915
|
};
|
|
16707
16916
|
}
|
|
16708
16917
|
}
|
|
16709
|
-
var deny_default = task(
|
|
16918
|
+
var deny_default = task(run126, {
|
|
16710
16919
|
name: "deny",
|
|
16711
16920
|
description: "Ufw deny.",
|
|
16712
16921
|
inputSchema: UfwDenyInputSchema,
|
|
@@ -16725,7 +16934,7 @@ var UfwDeleteOutputSchema = z.object({
|
|
|
16725
16934
|
error: z.string().optional()
|
|
16726
16935
|
})
|
|
16727
16936
|
);
|
|
16728
|
-
async function
|
|
16937
|
+
async function run127(context) {
|
|
16729
16938
|
const { params, exec, error } = context;
|
|
16730
16939
|
const { rule_number } = params;
|
|
16731
16940
|
if (!rule_number || rule_number <= 0) {
|
|
@@ -16747,7 +16956,7 @@ async function run126(context) {
|
|
|
16747
16956
|
};
|
|
16748
16957
|
}
|
|
16749
16958
|
}
|
|
16750
|
-
var delete_default4 = task(
|
|
16959
|
+
var delete_default4 = task(run127, {
|
|
16751
16960
|
name: "delete",
|
|
16752
16961
|
description: "Ufw delete.",
|
|
16753
16962
|
inputSchema: UfwDeleteInputSchema,
|
|
@@ -16760,7 +16969,7 @@ var UfwDisableOutputSchema = z.object({
|
|
|
16760
16969
|
success: z.boolean(),
|
|
16761
16970
|
error: z.string().optional()
|
|
16762
16971
|
});
|
|
16763
|
-
async function
|
|
16972
|
+
async function run128(context) {
|
|
16764
16973
|
const { exec, error } = context;
|
|
16765
16974
|
try {
|
|
16766
16975
|
const result = await exec(["ufw", "disable"], { sudo: true });
|
|
@@ -16776,7 +16985,7 @@ async function run127(context) {
|
|
|
16776
16985
|
return { success: false, error: errorMsg };
|
|
16777
16986
|
}
|
|
16778
16987
|
}
|
|
16779
|
-
var disable_default2 = task(
|
|
16988
|
+
var disable_default2 = task(run128, {
|
|
16780
16989
|
description: "Disables UFW firewall.",
|
|
16781
16990
|
inputSchema: UfwDisableInputSchema,
|
|
16782
16991
|
outputSchema: UfwDisableOutputSchema
|
|
@@ -16788,7 +16997,7 @@ var UfwEnableOutputSchema = z.object({
|
|
|
16788
16997
|
success: z.boolean(),
|
|
16789
16998
|
error: z.string().optional()
|
|
16790
16999
|
});
|
|
16791
|
-
async function
|
|
17000
|
+
async function run129(context) {
|
|
16792
17001
|
const { exec, error } = context;
|
|
16793
17002
|
try {
|
|
16794
17003
|
const result = await exec(["ufw", "--force", "enable"], { sudo: true });
|
|
@@ -16804,7 +17013,7 @@ async function run128(context) {
|
|
|
16804
17013
|
return { success: false, error: errorMsg };
|
|
16805
17014
|
}
|
|
16806
17015
|
}
|
|
16807
|
-
var enable_default2 = task(
|
|
17016
|
+
var enable_default2 = task(run129, {
|
|
16808
17017
|
description: "Enables UFW firewall.",
|
|
16809
17018
|
inputSchema: UfwEnableInputSchema,
|
|
16810
17019
|
outputSchema: UfwEnableOutputSchema
|
|
@@ -16820,7 +17029,7 @@ var UfwInstallOutputSchema = z.object({
|
|
|
16820
17029
|
error: z.string().optional()
|
|
16821
17030
|
})
|
|
16822
17031
|
);
|
|
16823
|
-
async function
|
|
17032
|
+
async function run130(context) {
|
|
16824
17033
|
const { run: runTask, error } = context;
|
|
16825
17034
|
try {
|
|
16826
17035
|
const installResult = await runTask(install_default5({ package: "ufw", sudo: true }));
|
|
@@ -16839,7 +17048,7 @@ async function run129(context) {
|
|
|
16839
17048
|
};
|
|
16840
17049
|
}
|
|
16841
17050
|
}
|
|
16842
|
-
var install_default7 = task(
|
|
17051
|
+
var install_default7 = task(run130, {
|
|
16843
17052
|
name: "install",
|
|
16844
17053
|
description: "Ufw install.",
|
|
16845
17054
|
inputSchema: UfwInstallInputSchema,
|
|
@@ -16859,7 +17068,7 @@ var UfwLoggingOutputSchema = z.object({
|
|
|
16859
17068
|
error: z.string().optional()
|
|
16860
17069
|
})
|
|
16861
17070
|
);
|
|
16862
|
-
async function
|
|
17071
|
+
async function run131(context) {
|
|
16863
17072
|
const { params, exec, log } = context;
|
|
16864
17073
|
const level = params.level || "on";
|
|
16865
17074
|
try {
|
|
@@ -16876,7 +17085,7 @@ async function run130(context) {
|
|
|
16876
17085
|
return { success: false, error };
|
|
16877
17086
|
}
|
|
16878
17087
|
}
|
|
16879
|
-
var logging_default = task(
|
|
17088
|
+
var logging_default = task(run131, {
|
|
16880
17089
|
description: "Configures UFW logging",
|
|
16881
17090
|
inputSchema: UfwLoggingInputSchema,
|
|
16882
17091
|
outputSchema: UfwLoggingOutputSchema
|
|
@@ -16892,7 +17101,7 @@ var UfwReloadOutputSchema = z.object({
|
|
|
16892
17101
|
error: z.string().optional()
|
|
16893
17102
|
})
|
|
16894
17103
|
);
|
|
16895
|
-
async function
|
|
17104
|
+
async function run132(context) {
|
|
16896
17105
|
const { exec, error } = context;
|
|
16897
17106
|
try {
|
|
16898
17107
|
const { success } = await exec(["sudo", "ufw", "reload"], { sudo: true });
|
|
@@ -16904,7 +17113,7 @@ async function run131(context) {
|
|
|
16904
17113
|
};
|
|
16905
17114
|
}
|
|
16906
17115
|
}
|
|
16907
|
-
var reload_default2 = task(
|
|
17116
|
+
var reload_default2 = task(run132, {
|
|
16908
17117
|
name: "reload",
|
|
16909
17118
|
description: "Ufw reload.",
|
|
16910
17119
|
inputSchema: UfwReloadInputSchema,
|
|
@@ -16922,7 +17131,7 @@ var UfwResetOutputSchema = z.object({
|
|
|
16922
17131
|
error: z.string().optional()
|
|
16923
17132
|
})
|
|
16924
17133
|
);
|
|
16925
|
-
async function
|
|
17134
|
+
async function run133(context) {
|
|
16926
17135
|
const { exec, error, info } = context;
|
|
16927
17136
|
try {
|
|
16928
17137
|
const command = ["ufw", "--force", "reset"];
|
|
@@ -16943,7 +17152,7 @@ async function run132(context) {
|
|
|
16943
17152
|
return { success: false, error: errorMsg };
|
|
16944
17153
|
}
|
|
16945
17154
|
}
|
|
16946
|
-
var reset_default = task(
|
|
17155
|
+
var reset_default = task(run133, {
|
|
16947
17156
|
name: "reset",
|
|
16948
17157
|
description: "Resets UFW firewall to default state.",
|
|
16949
17158
|
inputSchema: UfwResetInputSchema,
|
|
@@ -16966,7 +17175,7 @@ var UfwStatusOutputSchema = z.object({
|
|
|
16966
17175
|
rules: z.array(UfwRuleSchema).optional(),
|
|
16967
17176
|
error: z.string().optional()
|
|
16968
17177
|
});
|
|
16969
|
-
async function
|
|
17178
|
+
async function run134(context) {
|
|
16970
17179
|
const { exec, error } = context;
|
|
16971
17180
|
try {
|
|
16972
17181
|
const result = await exec(["ufw", "status", "numbered"], { sudo: true });
|
|
@@ -17021,7 +17230,7 @@ async function run133(context) {
|
|
|
17021
17230
|
return { success: false, error: errorMsg };
|
|
17022
17231
|
}
|
|
17023
17232
|
}
|
|
17024
|
-
var status_default2 = task(
|
|
17233
|
+
var status_default2 = task(run134, {
|
|
17025
17234
|
description: "Gets UFW firewall status with numbered rules.",
|
|
17026
17235
|
inputSchema: UfwStatusInputSchema,
|
|
17027
17236
|
outputSchema: UfwStatusOutputSchema
|
|
@@ -17060,7 +17269,7 @@ var AddGroupsOutputSchema = z.object({
|
|
|
17060
17269
|
error: z.string().optional()
|
|
17061
17270
|
})
|
|
17062
17271
|
);
|
|
17063
|
-
async function
|
|
17272
|
+
async function run135(context) {
|
|
17064
17273
|
const { params, exec } = context;
|
|
17065
17274
|
const { user, groups, sudo = true } = params;
|
|
17066
17275
|
const normalizedGroups = Array.isArray(groups) ? groups : typeof groups === "string" ? groups.split(",").map((group) => group.trim()).filter(Boolean) : [];
|
|
@@ -17075,7 +17284,7 @@ async function run134(context) {
|
|
|
17075
17284
|
error: success ? void 0 : stderr || stdout
|
|
17076
17285
|
};
|
|
17077
17286
|
}
|
|
17078
|
-
var add_groups_default = task(
|
|
17287
|
+
var add_groups_default = task(run135, {
|
|
17079
17288
|
name: "add_groups",
|
|
17080
17289
|
description: "User add groups.",
|
|
17081
17290
|
inputSchema: AddGroupsInputSchema,
|
|
@@ -17095,7 +17304,7 @@ var GetGidOutputSchema = z.object({
|
|
|
17095
17304
|
gid: z.string().optional()
|
|
17096
17305
|
})
|
|
17097
17306
|
);
|
|
17098
|
-
async function
|
|
17307
|
+
async function run136(context) {
|
|
17099
17308
|
const { params, exec } = context;
|
|
17100
17309
|
const { user } = params;
|
|
17101
17310
|
const command = ["id", "-g", user].filter(Boolean).join(" ");
|
|
@@ -17105,7 +17314,7 @@ async function run135(context) {
|
|
|
17105
17314
|
gid: gid.trim()
|
|
17106
17315
|
};
|
|
17107
17316
|
}
|
|
17108
|
-
var get_gid_default = task(
|
|
17317
|
+
var get_gid_default = task(run136, {
|
|
17109
17318
|
name: "get_gid",
|
|
17110
17319
|
description: "User get gid.",
|
|
17111
17320
|
inputSchema: GetGidInputSchema,
|
|
@@ -17125,7 +17334,7 @@ var GetGroupsOutputSchema = z.object({
|
|
|
17125
17334
|
groups: z.array(z.string()).optional()
|
|
17126
17335
|
})
|
|
17127
17336
|
);
|
|
17128
|
-
async function
|
|
17337
|
+
async function run137(context) {
|
|
17129
17338
|
const { params, exec } = context;
|
|
17130
17339
|
const { user } = params;
|
|
17131
17340
|
const command = ["groups", user].filter(Boolean).join(" ");
|
|
@@ -17142,7 +17351,7 @@ async function run136(context) {
|
|
|
17142
17351
|
groups
|
|
17143
17352
|
};
|
|
17144
17353
|
}
|
|
17145
|
-
var get_groups_default = task(
|
|
17354
|
+
var get_groups_default = task(run137, {
|
|
17146
17355
|
name: "get_groups",
|
|
17147
17356
|
description: "User get groups.",
|
|
17148
17357
|
inputSchema: GetGroupsInputSchema,
|
|
@@ -17162,7 +17371,7 @@ var GetUidOutputSchema = z.object({
|
|
|
17162
17371
|
uid: z.string().optional()
|
|
17163
17372
|
})
|
|
17164
17373
|
);
|
|
17165
|
-
async function
|
|
17374
|
+
async function run138(context) {
|
|
17166
17375
|
const { params, exec } = context;
|
|
17167
17376
|
const { user } = params;
|
|
17168
17377
|
const command = ["id", "-u", user].filter(Boolean).join(" ");
|
|
@@ -17172,7 +17381,7 @@ async function run137(context) {
|
|
|
17172
17381
|
uid: uid.trim()
|
|
17173
17382
|
};
|
|
17174
17383
|
}
|
|
17175
|
-
var get_uid_default = task(
|
|
17384
|
+
var get_uid_default = task(run138, {
|
|
17176
17385
|
name: "get_uid",
|
|
17177
17386
|
description: "User get uid.",
|
|
17178
17387
|
inputSchema: GetUidInputSchema,
|
|
@@ -17193,7 +17402,7 @@ var SetUserGroupsOutputSchema = z.object({
|
|
|
17193
17402
|
error: z.string().optional()
|
|
17194
17403
|
})
|
|
17195
17404
|
);
|
|
17196
|
-
async function
|
|
17405
|
+
async function run139(context) {
|
|
17197
17406
|
const { params, exec } = context;
|
|
17198
17407
|
const { user, groups, sudo = true } = params;
|
|
17199
17408
|
const normalizedGroups = Array.isArray(groups) ? groups : typeof groups === "string" ? groups.split(",").map((group) => group.trim()).filter(Boolean) : [];
|
|
@@ -17208,7 +17417,7 @@ async function run138(context) {
|
|
|
17208
17417
|
error: success ? void 0 : stderr || stdout
|
|
17209
17418
|
};
|
|
17210
17419
|
}
|
|
17211
|
-
var set_groups_default = task(
|
|
17420
|
+
var set_groups_default = task(run139, {
|
|
17212
17421
|
name: "set_groups",
|
|
17213
17422
|
description: "User set groups.",
|
|
17214
17423
|
inputSchema: SetUserGroupsInputSchema,
|
|
@@ -17229,7 +17438,7 @@ var SetUserShellOutputSchema = z.object({
|
|
|
17229
17438
|
error: z.string().optional()
|
|
17230
17439
|
})
|
|
17231
17440
|
);
|
|
17232
|
-
async function
|
|
17441
|
+
async function run140(context) {
|
|
17233
17442
|
const { params, exec } = context;
|
|
17234
17443
|
const { user, shell, sudo = true } = params;
|
|
17235
17444
|
const command = [sudo ? "sudo" : "", "usermod", "-s", shell, user].filter(Boolean).join(" ");
|
|
@@ -17239,7 +17448,7 @@ async function run139(context) {
|
|
|
17239
17448
|
error: success ? void 0 : stderr || stdout
|
|
17240
17449
|
};
|
|
17241
17450
|
}
|
|
17242
|
-
var set_shell_default = task(
|
|
17451
|
+
var set_shell_default = task(run140, {
|
|
17243
17452
|
name: "set_shell",
|
|
17244
17453
|
description: "User set shell.",
|
|
17245
17454
|
inputSchema: SetUserShellInputSchema,
|
|
@@ -17258,8 +17467,8 @@ var UserDeleteOutputSchema = z.object({
|
|
|
17258
17467
|
success: z.boolean(),
|
|
17259
17468
|
error: z.string().optional()
|
|
17260
17469
|
});
|
|
17261
|
-
async function
|
|
17262
|
-
const { params, debug, exec, run:
|
|
17470
|
+
async function run141(context) {
|
|
17471
|
+
const { params, debug, exec, run: run253, error } = context;
|
|
17263
17472
|
const { user, remove: remove4 = false, sudo = true } = params;
|
|
17264
17473
|
if (!user) {
|
|
17265
17474
|
error('Required parameter "user" is missing');
|
|
@@ -17269,7 +17478,7 @@ async function run140(context) {
|
|
|
17269
17478
|
};
|
|
17270
17479
|
}
|
|
17271
17480
|
try {
|
|
17272
|
-
const { exists: userExists } = await
|
|
17481
|
+
const { exists: userExists } = await run253(exists_default4({ user }));
|
|
17273
17482
|
if (!userExists) {
|
|
17274
17483
|
debug(`User '${user}' does not exist, considering task successful (idempotent).`);
|
|
17275
17484
|
return { success: true };
|
|
@@ -17297,7 +17506,7 @@ async function run140(context) {
|
|
|
17297
17506
|
};
|
|
17298
17507
|
}
|
|
17299
17508
|
}
|
|
17300
|
-
var delete_default5 = task(
|
|
17509
|
+
var delete_default5 = task(run141, {
|
|
17301
17510
|
description: "Deletes a user from the system idempotently",
|
|
17302
17511
|
inputSchema: UserDeleteInputSchema,
|
|
17303
17512
|
outputSchema: UserDeleteOutputSchema
|
|
@@ -17327,7 +17536,7 @@ var ModifyUserOutputSchema = z.object({
|
|
|
17327
17536
|
error: z.string().optional()
|
|
17328
17537
|
})
|
|
17329
17538
|
);
|
|
17330
|
-
async function
|
|
17539
|
+
async function run142(context) {
|
|
17331
17540
|
const { params, exec, run: runTask, error } = context;
|
|
17332
17541
|
const {
|
|
17333
17542
|
user,
|
|
@@ -17386,7 +17595,7 @@ async function run141(context) {
|
|
|
17386
17595
|
};
|
|
17387
17596
|
}
|
|
17388
17597
|
}
|
|
17389
|
-
var modify_default2 = task(
|
|
17598
|
+
var modify_default2 = task(run142, {
|
|
17390
17599
|
name: "modify",
|
|
17391
17600
|
description: "Modify an existing user account.",
|
|
17392
17601
|
inputSchema: ModifyUserInputSchema,
|
|
@@ -17671,7 +17880,7 @@ var XcpngAttachVdiResultSchema = z.object({
|
|
|
17671
17880
|
plugged: z.boolean().optional(),
|
|
17672
17881
|
error: z.string().optional()
|
|
17673
17882
|
});
|
|
17674
|
-
async function
|
|
17883
|
+
async function run143(context) {
|
|
17675
17884
|
const { params, error, debug } = context;
|
|
17676
17885
|
const { vm_uuid, vdi_uuid, device = "0", mode = "RW", bootable: rawBootable = false } = params;
|
|
17677
17886
|
if (!vm_uuid) {
|
|
@@ -17730,7 +17939,7 @@ async function run142(context) {
|
|
|
17730
17939
|
plugged: true
|
|
17731
17940
|
};
|
|
17732
17941
|
}
|
|
17733
|
-
var attach_vdi_default = task(
|
|
17942
|
+
var attach_vdi_default = task(run143, {
|
|
17734
17943
|
inputSchema: XcpngAttachVdiParamsSchema,
|
|
17735
17944
|
outputSchema: XcpngAttachVdiResultSchema,
|
|
17736
17945
|
description: "Attaches an existing virtual disk image to a VM and plugs it into the guest."
|
|
@@ -17794,7 +18003,7 @@ var XcpngCreateVdiResultSchema = z.object({
|
|
|
17794
18003
|
command: z.string().optional(),
|
|
17795
18004
|
error: z.string().optional()
|
|
17796
18005
|
});
|
|
17797
|
-
async function
|
|
18006
|
+
async function run144(context) {
|
|
17798
18007
|
const { params, error } = context;
|
|
17799
18008
|
const { name_label, sr_uuid, size_bytes, size_mb, size_gb, description, type = "user", shareable = false } = params;
|
|
17800
18009
|
if (!name_label) {
|
|
@@ -17847,7 +18056,7 @@ async function run143(context) {
|
|
|
17847
18056
|
command: result.command
|
|
17848
18057
|
};
|
|
17849
18058
|
}
|
|
17850
|
-
var create_vdi_default = task(
|
|
18059
|
+
var create_vdi_default = task(run144, {
|
|
17851
18060
|
inputSchema: XcpngCreateVdiParamsSchema,
|
|
17852
18061
|
outputSchema: XcpngCreateVdiResultSchema,
|
|
17853
18062
|
description: "Creates a new virtual disk image on the specified XCP-ng storage repository."
|
|
@@ -17862,7 +18071,7 @@ var XcpngListSrParamsResultSchema = z.object({
|
|
|
17862
18071
|
items: z.any().optional(),
|
|
17863
18072
|
error: z.string().optional()
|
|
17864
18073
|
});
|
|
17865
|
-
async function
|
|
18074
|
+
async function run145(context) {
|
|
17866
18075
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
17867
18076
|
const result = await runXeCommand(context, "sr-param-list", filters);
|
|
17868
18077
|
if (!result.success) {
|
|
@@ -17876,7 +18085,7 @@ async function run144(context) {
|
|
|
17876
18085
|
items: parseKeyValueOutput(result.stdout)
|
|
17877
18086
|
};
|
|
17878
18087
|
}
|
|
17879
|
-
var list_sr_params_default = task(
|
|
18088
|
+
var list_sr_params_default = task(run145, {
|
|
17880
18089
|
inputSchema: XcpngListSrParamsParamsSchema,
|
|
17881
18090
|
outputSchema: XcpngListSrParamsResultSchema,
|
|
17882
18091
|
description: "Lists parameters for storage repositories (SRs) on an XCP-ng host."
|
|
@@ -17891,7 +18100,7 @@ var XcpngListStorageRepositoriesResultSchema = z.object({
|
|
|
17891
18100
|
items: z.array(z.any()).optional(),
|
|
17892
18101
|
error: z.string().optional()
|
|
17893
18102
|
});
|
|
17894
|
-
async function
|
|
18103
|
+
async function run146(context) {
|
|
17895
18104
|
const { params } = context;
|
|
17896
18105
|
const filters = normalizeFilterArgs(params?.filters);
|
|
17897
18106
|
const result = await runXeCommand(context, "sr-list", filters);
|
|
@@ -17940,7 +18149,7 @@ async function run145(context) {
|
|
|
17940
18149
|
items: enrichedItems
|
|
17941
18150
|
};
|
|
17942
18151
|
}
|
|
17943
|
-
var list_storage_repositories_default = task(
|
|
18152
|
+
var list_storage_repositories_default = task(run146, {
|
|
17944
18153
|
inputSchema: XcpngListStorageRepositoriesParamsSchema,
|
|
17945
18154
|
outputSchema: XcpngListStorageRepositoriesResultSchema,
|
|
17946
18155
|
description: "Lists storage repositories on an XCP-ng host."
|
|
@@ -17963,7 +18172,7 @@ var XcpngFindStorageRepositoryResultSchema = z.object({
|
|
|
17963
18172
|
multiple: z.boolean().optional(),
|
|
17964
18173
|
error: z.string().optional()
|
|
17965
18174
|
});
|
|
17966
|
-
async function
|
|
18175
|
+
async function run147(context) {
|
|
17967
18176
|
const params = context.params ?? {};
|
|
17968
18177
|
const {
|
|
17969
18178
|
name_label: nameLabel,
|
|
@@ -18083,7 +18292,7 @@ async function runListStorageRepositories(context, params) {
|
|
|
18083
18292
|
})
|
|
18084
18293
|
);
|
|
18085
18294
|
}
|
|
18086
|
-
var find_storage_repository_default = task(
|
|
18295
|
+
var find_storage_repository_default = task(run147, {
|
|
18087
18296
|
inputSchema: XcpngFindStorageRepositoryParamsSchema,
|
|
18088
18297
|
outputSchema: XcpngFindStorageRepositoryResultSchema,
|
|
18089
18298
|
description: "Finds a single storage repository on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -18116,7 +18325,7 @@ var XcpngAddDiskResultSchema = z.object({
|
|
|
18116
18325
|
plugged: z.boolean().optional(),
|
|
18117
18326
|
error: z.string().optional()
|
|
18118
18327
|
});
|
|
18119
|
-
async function
|
|
18328
|
+
async function run148(context) {
|
|
18120
18329
|
const { params, error } = context;
|
|
18121
18330
|
const {
|
|
18122
18331
|
vm_uuid: vmUuid,
|
|
@@ -18249,7 +18458,7 @@ async function destroyVdi(context, vdiUuid, appliedCommands) {
|
|
|
18249
18458
|
context.warn(`Failed to clean up VDI ${vdiUuid}: ${xeErrorMessage(result, "unknown error")}`);
|
|
18250
18459
|
}
|
|
18251
18460
|
}
|
|
18252
|
-
var add_disk_default = task(
|
|
18461
|
+
var add_disk_default = task(run148, {
|
|
18253
18462
|
inputSchema: XcpngAddDiskParamsSchema,
|
|
18254
18463
|
outputSchema: XcpngAddDiskResultSchema,
|
|
18255
18464
|
description: "Creates a VDI and attaches it to a VM on XCP-ng."
|
|
@@ -18268,7 +18477,7 @@ var XcpngAttachIsoResultSchema = z.object({
|
|
|
18268
18477
|
plugged: z.boolean().optional(),
|
|
18269
18478
|
error: z.string().optional()
|
|
18270
18479
|
});
|
|
18271
|
-
async function
|
|
18480
|
+
async function run149(context) {
|
|
18272
18481
|
const { params, error, debug } = context;
|
|
18273
18482
|
const { vm_uuid, iso_vdi_uuid, device, eject_before_insert = true } = params;
|
|
18274
18483
|
if (!vm_uuid) {
|
|
@@ -18361,7 +18570,7 @@ async function run148(context) {
|
|
|
18361
18570
|
plugged
|
|
18362
18571
|
};
|
|
18363
18572
|
}
|
|
18364
|
-
var attach_iso_default = task(
|
|
18573
|
+
var attach_iso_default = task(run149, {
|
|
18365
18574
|
inputSchema: XcpngAttachIsoParamsSchema,
|
|
18366
18575
|
outputSchema: XcpngAttachIsoResultSchema,
|
|
18367
18576
|
description: "Attaches an ISO image to a VM by invoking xe vm-cd-insert, ejecting existing media if requested."
|
|
@@ -18382,7 +18591,7 @@ var XcpngAttachNetworkInterfaceResultSchema = z.object({
|
|
|
18382
18591
|
plugged: z.boolean().optional(),
|
|
18383
18592
|
error: z.string().optional()
|
|
18384
18593
|
});
|
|
18385
|
-
async function
|
|
18594
|
+
async function run150(context) {
|
|
18386
18595
|
const { params, error, debug } = context;
|
|
18387
18596
|
const { vm_uuid, network_uuid, device = "0", mac_address, mtu } = params;
|
|
18388
18597
|
if (!vm_uuid) {
|
|
@@ -18447,7 +18656,7 @@ async function run149(context) {
|
|
|
18447
18656
|
plugged: true
|
|
18448
18657
|
};
|
|
18449
18658
|
}
|
|
18450
|
-
var attach_network_interface_default = task(
|
|
18659
|
+
var attach_network_interface_default = task(run150, {
|
|
18451
18660
|
inputSchema: XcpngAttachNetworkInterfaceParamsSchema,
|
|
18452
18661
|
outputSchema: XcpngAttachNetworkInterfaceResultSchema,
|
|
18453
18662
|
description: "Creates and plugs a virtual network interface for a VM on XCP-ng."
|
|
@@ -18462,7 +18671,7 @@ var XcpngListTemplateParamsResultSchema = z.object({
|
|
|
18462
18671
|
items: z.any().optional(),
|
|
18463
18672
|
error: z.string().optional()
|
|
18464
18673
|
});
|
|
18465
|
-
async function
|
|
18674
|
+
async function run151(context) {
|
|
18466
18675
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18467
18676
|
const result = await runXeCommand(context, "template-param-list", filters);
|
|
18468
18677
|
if (!result.success) {
|
|
@@ -18476,7 +18685,7 @@ async function run150(context) {
|
|
|
18476
18685
|
items: parseKeyValueOutput(result.stdout)
|
|
18477
18686
|
};
|
|
18478
18687
|
}
|
|
18479
|
-
var list_template_params_default = task(
|
|
18688
|
+
var list_template_params_default = task(run151, {
|
|
18480
18689
|
inputSchema: XcpngListTemplateParamsParamsSchema,
|
|
18481
18690
|
outputSchema: XcpngListTemplateParamsResultSchema,
|
|
18482
18691
|
description: "Lists parameters for templates on an XCP-ng host."
|
|
@@ -18491,7 +18700,7 @@ var XcpngListTemplatesResultSchema = z.object({
|
|
|
18491
18700
|
items: z.array(z.any()).optional(),
|
|
18492
18701
|
error: z.string().optional()
|
|
18493
18702
|
});
|
|
18494
|
-
async function
|
|
18703
|
+
async function run152(context) {
|
|
18495
18704
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18496
18705
|
const result = await runXeCommand(context, "template-list", filters);
|
|
18497
18706
|
if (!result.success) {
|
|
@@ -18541,7 +18750,7 @@ async function run151(context) {
|
|
|
18541
18750
|
items: enriched
|
|
18542
18751
|
};
|
|
18543
18752
|
}
|
|
18544
|
-
var list_templates_default = task(
|
|
18753
|
+
var list_templates_default = task(run152, {
|
|
18545
18754
|
inputSchema: XcpngListTemplatesParamsSchema,
|
|
18546
18755
|
outputSchema: XcpngListTemplatesResultSchema,
|
|
18547
18756
|
description: "Lists VM templates available on the XCP-ng host."
|
|
@@ -18562,7 +18771,7 @@ var XcpngFindTemplateResultSchema = z.object({
|
|
|
18562
18771
|
multiple: z.boolean().optional(),
|
|
18563
18772
|
error: z.string().optional()
|
|
18564
18773
|
});
|
|
18565
|
-
async function
|
|
18774
|
+
async function run153(context) {
|
|
18566
18775
|
const params = context.params ?? {};
|
|
18567
18776
|
const {
|
|
18568
18777
|
name_label: nameLabel,
|
|
@@ -18660,7 +18869,7 @@ async function runListTemplates(context, params) {
|
|
|
18660
18869
|
})
|
|
18661
18870
|
);
|
|
18662
18871
|
}
|
|
18663
|
-
var find_template_default = task(
|
|
18872
|
+
var find_template_default = task(run153, {
|
|
18664
18873
|
inputSchema: XcpngFindTemplateParamsSchema,
|
|
18665
18874
|
outputSchema: XcpngFindTemplateResultSchema,
|
|
18666
18875
|
description: "Finds a single template on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -18685,7 +18894,7 @@ var XcpngCloneTemplateResultSchema = z.object({
|
|
|
18685
18894
|
alreadyExists: z.boolean().optional(),
|
|
18686
18895
|
error: z.string().optional()
|
|
18687
18896
|
});
|
|
18688
|
-
async function
|
|
18897
|
+
async function run154(context) {
|
|
18689
18898
|
const { params, error } = context;
|
|
18690
18899
|
const {
|
|
18691
18900
|
source_template_uuid: sourceTemplateUuidParam,
|
|
@@ -18805,7 +19014,7 @@ async function run153(context) {
|
|
|
18805
19014
|
appliedCommands
|
|
18806
19015
|
};
|
|
18807
19016
|
}
|
|
18808
|
-
var clone_template_default = task(
|
|
19017
|
+
var clone_template_default = task(run154, {
|
|
18809
19018
|
inputSchema: XcpngCloneTemplateParamsSchema,
|
|
18810
19019
|
outputSchema: XcpngCloneTemplateResultSchema,
|
|
18811
19020
|
description: "Clones an existing XCP-ng template to a new template name."
|
|
@@ -18820,7 +19029,7 @@ var XcpngListHostsResultSchema = z.object({
|
|
|
18820
19029
|
items: z.any().optional(),
|
|
18821
19030
|
error: z.string().optional()
|
|
18822
19031
|
});
|
|
18823
|
-
async function
|
|
19032
|
+
async function run155(context) {
|
|
18824
19033
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18825
19034
|
const result = await runXeCommand(context, "host-list", filters);
|
|
18826
19035
|
if (!result.success) {
|
|
@@ -18834,7 +19043,7 @@ async function run154(context) {
|
|
|
18834
19043
|
items: parseKeyValueOutput(result.stdout)
|
|
18835
19044
|
};
|
|
18836
19045
|
}
|
|
18837
|
-
var list_hosts_default = task(
|
|
19046
|
+
var list_hosts_default = task(run155, {
|
|
18838
19047
|
inputSchema: XcpngListHostsParamsSchema,
|
|
18839
19048
|
outputSchema: XcpngListHostsResultSchema,
|
|
18840
19049
|
description: "Lists hosts in an XCP-ng pool, returning parsed xe host-list output."
|
|
@@ -18855,7 +19064,7 @@ var XcpngFindHostResultSchema = z.object({
|
|
|
18855
19064
|
multiple: z.boolean().optional(),
|
|
18856
19065
|
error: z.string().optional()
|
|
18857
19066
|
});
|
|
18858
|
-
async function
|
|
19067
|
+
async function run156(context) {
|
|
18859
19068
|
const params = context.params ?? {};
|
|
18860
19069
|
const {
|
|
18861
19070
|
name_label: nameLabel,
|
|
@@ -18955,7 +19164,7 @@ async function runListHosts(context, params) {
|
|
|
18955
19164
|
})
|
|
18956
19165
|
);
|
|
18957
19166
|
}
|
|
18958
|
-
var find_host_default = task(
|
|
19167
|
+
var find_host_default = task(run156, {
|
|
18959
19168
|
inputSchema: XcpngFindHostParamsSchema,
|
|
18960
19169
|
outputSchema: XcpngFindHostResultSchema,
|
|
18961
19170
|
description: "Finds a single host on an XCP-ng pool, optionally allowing multiple matches."
|
|
@@ -18970,7 +19179,7 @@ var XcpngListNetworkParamsResultSchema = z.object({
|
|
|
18970
19179
|
items: z.any().optional(),
|
|
18971
19180
|
error: z.string().optional()
|
|
18972
19181
|
});
|
|
18973
|
-
async function
|
|
19182
|
+
async function run157(context) {
|
|
18974
19183
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18975
19184
|
const result = await runXeCommand(context, "network-param-list", filters);
|
|
18976
19185
|
if (!result.success) {
|
|
@@ -18984,7 +19193,7 @@ async function run156(context) {
|
|
|
18984
19193
|
items: parseKeyValueOutput(result.stdout)
|
|
18985
19194
|
};
|
|
18986
19195
|
}
|
|
18987
|
-
var list_network_params_default = task(
|
|
19196
|
+
var list_network_params_default = task(run157, {
|
|
18988
19197
|
inputSchema: XcpngListNetworkParamsParamsSchema,
|
|
18989
19198
|
outputSchema: XcpngListNetworkParamsResultSchema,
|
|
18990
19199
|
description: "Lists parameters for networks on an XCP-ng host."
|
|
@@ -18999,7 +19208,7 @@ var XcpngListNetworksResultSchema = z.object({
|
|
|
18999
19208
|
items: z.array(z.any()).optional(),
|
|
19000
19209
|
error: z.string().optional()
|
|
19001
19210
|
});
|
|
19002
|
-
async function
|
|
19211
|
+
async function run158(context) {
|
|
19003
19212
|
const { params } = context;
|
|
19004
19213
|
const filters = normalizeFilterArgs(params?.filters);
|
|
19005
19214
|
const result = await runXeCommand(context, "network-list", filters);
|
|
@@ -19048,7 +19257,7 @@ async function run157(context) {
|
|
|
19048
19257
|
items: enrichedItems
|
|
19049
19258
|
};
|
|
19050
19259
|
}
|
|
19051
|
-
var list_networks_default = task(
|
|
19260
|
+
var list_networks_default = task(run158, {
|
|
19052
19261
|
inputSchema: XcpngListNetworksParamsSchema,
|
|
19053
19262
|
outputSchema: XcpngListNetworksResultSchema,
|
|
19054
19263
|
description: "Lists networks on an XCP-ng host."
|
|
@@ -19069,7 +19278,7 @@ var XcpngFindNetworkResultSchema = z.object({
|
|
|
19069
19278
|
multiple: z.boolean().optional(),
|
|
19070
19279
|
error: z.string().optional()
|
|
19071
19280
|
});
|
|
19072
|
-
async function
|
|
19281
|
+
async function run159(context) {
|
|
19073
19282
|
const params = context.params ?? {};
|
|
19074
19283
|
const {
|
|
19075
19284
|
name_label: nameLabel,
|
|
@@ -19160,7 +19369,7 @@ function buildMultipleMessage4(nameLabel, uuid, count) {
|
|
|
19160
19369
|
const detail = identifiers.length > 0 ? identifiers.join(", ") : "specified criteria";
|
|
19161
19370
|
return `Multiple networks (${count}) matched ${detail}; refine filters or set allow_multiple:true.`;
|
|
19162
19371
|
}
|
|
19163
|
-
var find_network_default = task(
|
|
19372
|
+
var find_network_default = task(run159, {
|
|
19164
19373
|
inputSchema: XcpngFindNetworkParamsSchema,
|
|
19165
19374
|
outputSchema: XcpngFindNetworkResultSchema,
|
|
19166
19375
|
description: "Finds a single network on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -19187,7 +19396,7 @@ var XcpngCreateBondResultSchema = z.object({
|
|
|
19187
19396
|
appliedCommands: z.array(z.string()),
|
|
19188
19397
|
error: z.string().optional()
|
|
19189
19398
|
});
|
|
19190
|
-
async function
|
|
19399
|
+
async function run160(context) {
|
|
19191
19400
|
const { params, error } = context;
|
|
19192
19401
|
const {
|
|
19193
19402
|
host_uuid: hostUuidParam,
|
|
@@ -19309,7 +19518,7 @@ async function run159(context) {
|
|
|
19309
19518
|
appliedCommands
|
|
19310
19519
|
};
|
|
19311
19520
|
}
|
|
19312
|
-
var create_bond_default = task(
|
|
19521
|
+
var create_bond_default = task(run160, {
|
|
19313
19522
|
inputSchema: XcpngCreateBondParamsSchema,
|
|
19314
19523
|
outputSchema: XcpngCreateBondResultSchema,
|
|
19315
19524
|
description: "Creates a bonded interface on a host, wrapping xe bond-create."
|
|
@@ -19324,7 +19533,7 @@ var XcpngListPbdParamsResultSchema = z.object({
|
|
|
19324
19533
|
items: z.any().optional(),
|
|
19325
19534
|
error: z.string().optional()
|
|
19326
19535
|
});
|
|
19327
|
-
async function
|
|
19536
|
+
async function run161(context) {
|
|
19328
19537
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
19329
19538
|
const result = await runXeCommand(context, "pbd-param-list", filters);
|
|
19330
19539
|
if (!result.success) {
|
|
@@ -19338,7 +19547,7 @@ async function run160(context) {
|
|
|
19338
19547
|
items: parseKeyValueOutput(result.stdout)
|
|
19339
19548
|
};
|
|
19340
19549
|
}
|
|
19341
|
-
var list_pbd_params_default = task(
|
|
19550
|
+
var list_pbd_params_default = task(run161, {
|
|
19342
19551
|
inputSchema: XcpngListPbdParamsParamsSchema,
|
|
19343
19552
|
outputSchema: XcpngListPbdParamsResultSchema,
|
|
19344
19553
|
description: "Lists parameters for PBDs on an XCP-ng host."
|
|
@@ -19353,7 +19562,7 @@ var XcpngListPbdsResultSchema = z.object({
|
|
|
19353
19562
|
items: z.array(z.any()).optional(),
|
|
19354
19563
|
error: z.string().optional()
|
|
19355
19564
|
});
|
|
19356
|
-
async function
|
|
19565
|
+
async function run162(context) {
|
|
19357
19566
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
19358
19567
|
const result = await runXeCommand(context, "pbd-list", filters);
|
|
19359
19568
|
if (!result.success) {
|
|
@@ -19401,7 +19610,7 @@ async function run161(context) {
|
|
|
19401
19610
|
items: enrichedItems
|
|
19402
19611
|
};
|
|
19403
19612
|
}
|
|
19404
|
-
var list_pbds_default = task(
|
|
19613
|
+
var list_pbds_default = task(run162, {
|
|
19405
19614
|
inputSchema: XcpngListPbdsParamsSchema,
|
|
19406
19615
|
outputSchema: XcpngListPbdsResultSchema,
|
|
19407
19616
|
description: "Lists storage bindings (PBDs) between hosts and storage repositories."
|
|
@@ -19423,7 +19632,7 @@ var XcpngFindPbdResultSchema = z.object({
|
|
|
19423
19632
|
multiple: z.boolean().optional(),
|
|
19424
19633
|
error: z.string().optional()
|
|
19425
19634
|
});
|
|
19426
|
-
async function
|
|
19635
|
+
async function run163(context) {
|
|
19427
19636
|
const params = context.params ?? {};
|
|
19428
19637
|
const {
|
|
19429
19638
|
uuid,
|
|
@@ -19536,7 +19745,7 @@ async function runListPbds(context, params) {
|
|
|
19536
19745
|
})
|
|
19537
19746
|
);
|
|
19538
19747
|
}
|
|
19539
|
-
var find_pbd_default = task(
|
|
19748
|
+
var find_pbd_default = task(run163, {
|
|
19540
19749
|
inputSchema: XcpngFindPbdParamsSchema,
|
|
19541
19750
|
outputSchema: XcpngFindPbdResultSchema,
|
|
19542
19751
|
description: "Finds a single PBD (host \u2194 SR binding), optionally allowing multiple matches."
|
|
@@ -19561,7 +19770,7 @@ var XcpngCreatePbdResultSchema = z.object({
|
|
|
19561
19770
|
skipped: z.boolean().optional(),
|
|
19562
19771
|
error: z.string().optional()
|
|
19563
19772
|
});
|
|
19564
|
-
async function
|
|
19773
|
+
async function run164(context) {
|
|
19565
19774
|
const { params, error } = context;
|
|
19566
19775
|
const {
|
|
19567
19776
|
host_uuid: hostUuidParam,
|
|
@@ -19678,7 +19887,7 @@ async function run163(context) {
|
|
|
19678
19887
|
appliedCommands
|
|
19679
19888
|
};
|
|
19680
19889
|
}
|
|
19681
|
-
var create_pbd_default = task(
|
|
19890
|
+
var create_pbd_default = task(run164, {
|
|
19682
19891
|
inputSchema: XcpngCreatePbdParamsSchema,
|
|
19683
19892
|
outputSchema: XcpngCreatePbdResultSchema,
|
|
19684
19893
|
description: "Creates a host \u2194 storage repository binding (PBD)."
|
|
@@ -19693,7 +19902,7 @@ var XcpngListVmParamsResultSchema = z.object({
|
|
|
19693
19902
|
items: z.any().optional(),
|
|
19694
19903
|
error: z.string().optional()
|
|
19695
19904
|
});
|
|
19696
|
-
async function
|
|
19905
|
+
async function run165(context) {
|
|
19697
19906
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
19698
19907
|
const result = await runXeCommand(context, "vm-param-list", filters);
|
|
19699
19908
|
if (!result.success) {
|
|
@@ -19707,7 +19916,7 @@ async function run164(context) {
|
|
|
19707
19916
|
items: parseKeyValueOutput(result.stdout)
|
|
19708
19917
|
};
|
|
19709
19918
|
}
|
|
19710
|
-
var list_vm_params_default = task(
|
|
19919
|
+
var list_vm_params_default = task(run165, {
|
|
19711
19920
|
inputSchema: XcpngListVmParamsParamsSchema,
|
|
19712
19921
|
outputSchema: XcpngListVmParamsResultSchema,
|
|
19713
19922
|
description: "Lists virtual machines (VMs) on an XCP-ng host."
|
|
@@ -19723,7 +19932,7 @@ var XcpngListVmsResultSchema = z.object({
|
|
|
19723
19932
|
items: z.array(z.any()).optional(),
|
|
19724
19933
|
error: z.string().optional()
|
|
19725
19934
|
});
|
|
19726
|
-
async function
|
|
19935
|
+
async function run166(context) {
|
|
19727
19936
|
const { params } = context;
|
|
19728
19937
|
const filters = normalizeFilterArgs(params?.filters);
|
|
19729
19938
|
const paramsArg = buildParamsArg(params?.params);
|
|
@@ -19776,7 +19985,7 @@ async function run165(context) {
|
|
|
19776
19985
|
items: enrichedItems
|
|
19777
19986
|
};
|
|
19778
19987
|
}
|
|
19779
|
-
var list_vms_default = task(
|
|
19988
|
+
var list_vms_default = task(run166, {
|
|
19780
19989
|
inputSchema: XcpngListVmsParamsSchema,
|
|
19781
19990
|
outputSchema: XcpngListVmsResultSchema,
|
|
19782
19991
|
description: "Lists VMs on an XCP-ng host and returns structured metadata."
|
|
@@ -19827,7 +20036,7 @@ var XcpngFindVmResultSchema = z.object({
|
|
|
19827
20036
|
multiple: z.boolean().optional(),
|
|
19828
20037
|
error: z.string().optional()
|
|
19829
20038
|
});
|
|
19830
|
-
async function
|
|
20039
|
+
async function run167(context) {
|
|
19831
20040
|
const params = context.params ?? {};
|
|
19832
20041
|
const {
|
|
19833
20042
|
name_label: nameLabel,
|
|
@@ -19955,7 +20164,7 @@ async function runListVms(context, params) {
|
|
|
19955
20164
|
})
|
|
19956
20165
|
);
|
|
19957
20166
|
}
|
|
19958
|
-
var find_vm_default = task(
|
|
20167
|
+
var find_vm_default = task(run167, {
|
|
19959
20168
|
inputSchema: XcpngFindVmParamsSchema,
|
|
19960
20169
|
outputSchema: XcpngFindVmResultSchema,
|
|
19961
20170
|
description: "Finds a single VM on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -20060,7 +20269,7 @@ var XcpngCreateTemplateResultSchema = z.object({
|
|
|
20060
20269
|
powerState: z.string().optional(),
|
|
20061
20270
|
waitAttempts: z.number().optional()
|
|
20062
20271
|
});
|
|
20063
|
-
async function
|
|
20272
|
+
async function run168(context) {
|
|
20064
20273
|
const { params, error } = context;
|
|
20065
20274
|
const {
|
|
20066
20275
|
source_vm_uuid: sourceVmUuidParam,
|
|
@@ -20168,7 +20377,7 @@ async function run167(context) {
|
|
|
20168
20377
|
waitAttempts: ensureHalted.attempts
|
|
20169
20378
|
};
|
|
20170
20379
|
}
|
|
20171
|
-
var create_template_default = task(
|
|
20380
|
+
var create_template_default = task(run168, {
|
|
20172
20381
|
inputSchema: XcpngCreateTemplateParamsSchema,
|
|
20173
20382
|
outputSchema: XcpngCreateTemplateResultSchema,
|
|
20174
20383
|
description: "Clones a VM and converts it into an XCP-ng template."
|
|
@@ -20195,7 +20404,7 @@ var XcpngCreateVmResultSchema = z.object({
|
|
|
20195
20404
|
appliedCommands: z.array(z.string()),
|
|
20196
20405
|
error: z.string().optional()
|
|
20197
20406
|
});
|
|
20198
|
-
async function
|
|
20407
|
+
async function run169(context) {
|
|
20199
20408
|
const { params, error } = context;
|
|
20200
20409
|
const {
|
|
20201
20410
|
name_label,
|
|
@@ -20321,7 +20530,7 @@ async function run168(context) {
|
|
|
20321
20530
|
appliedCommands
|
|
20322
20531
|
};
|
|
20323
20532
|
}
|
|
20324
|
-
var create_vm_default = task(
|
|
20533
|
+
var create_vm_default = task(run169, {
|
|
20325
20534
|
inputSchema: XcpngCreateVmParamsSchema,
|
|
20326
20535
|
outputSchema: XcpngCreateVmResultSchema,
|
|
20327
20536
|
description: "Creates a new VM on XCP-ng and optionally applies memory and CPU sizing."
|
|
@@ -20336,7 +20545,7 @@ var XcpngListVdiParamsResultSchema = z.object({
|
|
|
20336
20545
|
items: z.any().optional(),
|
|
20337
20546
|
error: z.string().optional()
|
|
20338
20547
|
});
|
|
20339
|
-
async function
|
|
20548
|
+
async function run170(context) {
|
|
20340
20549
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
20341
20550
|
const result = await runXeCommand(context, "vdi-param-list", filters);
|
|
20342
20551
|
if (!result.success) {
|
|
@@ -20350,7 +20559,7 @@ async function run169(context) {
|
|
|
20350
20559
|
items: parseKeyValueOutput(result.stdout)
|
|
20351
20560
|
};
|
|
20352
20561
|
}
|
|
20353
|
-
var list_vdi_params_default = task(
|
|
20562
|
+
var list_vdi_params_default = task(run170, {
|
|
20354
20563
|
inputSchema: XcpngListVdiParamsParamsSchema,
|
|
20355
20564
|
outputSchema: XcpngListVdiParamsResultSchema,
|
|
20356
20565
|
description: "Lists virtual disk image parameters (VDI params) on an XCP-ng host."
|
|
@@ -20365,7 +20574,7 @@ var XcpngListVdisResultSchema = z.object({
|
|
|
20365
20574
|
items: z.array(z.any()).optional(),
|
|
20366
20575
|
error: z.string().optional()
|
|
20367
20576
|
});
|
|
20368
|
-
async function
|
|
20577
|
+
async function run171(context) {
|
|
20369
20578
|
const { params } = context;
|
|
20370
20579
|
const filters = normalizeFilterArgs(params?.filters);
|
|
20371
20580
|
const result = await runXeCommand(context, "vdi-list", filters);
|
|
@@ -20416,7 +20625,7 @@ async function run170(context) {
|
|
|
20416
20625
|
items: enrichedItems
|
|
20417
20626
|
};
|
|
20418
20627
|
}
|
|
20419
|
-
var list_vdis_default = task(
|
|
20628
|
+
var list_vdis_default = task(run171, {
|
|
20420
20629
|
inputSchema: XcpngListVdisParamsSchema,
|
|
20421
20630
|
outputSchema: XcpngListVdisResultSchema,
|
|
20422
20631
|
description: "Lists VDIs on an XCP-ng host with optional filtering."
|
|
@@ -20438,7 +20647,7 @@ var XcpngFindVdiResultSchema = z.object({
|
|
|
20438
20647
|
multiple: z.boolean().optional(),
|
|
20439
20648
|
error: z.string().optional()
|
|
20440
20649
|
});
|
|
20441
|
-
async function
|
|
20650
|
+
async function run172(context) {
|
|
20442
20651
|
const params = context.params ?? {};
|
|
20443
20652
|
const {
|
|
20444
20653
|
name_label: nameLabel,
|
|
@@ -20544,7 +20753,7 @@ function buildMultipleMessage7(nameLabel, uuid, srUuid, count) {
|
|
|
20544
20753
|
const detail = identifiers.length > 0 ? identifiers.join(", ") : "specified criteria";
|
|
20545
20754
|
return `Multiple VDIs (${count}) matched ${detail}; refine filters or set allow_multiple:true.`;
|
|
20546
20755
|
}
|
|
20547
|
-
var find_vdi_default = task(
|
|
20756
|
+
var find_vdi_default = task(run172, {
|
|
20548
20757
|
inputSchema: XcpngFindVdiParamsSchema,
|
|
20549
20758
|
outputSchema: XcpngFindVdiResultSchema,
|
|
20550
20759
|
description: "Finds a single VDI on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -20559,7 +20768,7 @@ var XcpngListVbdParamsResultSchema = z.object({
|
|
|
20559
20768
|
items: z.any().optional(),
|
|
20560
20769
|
error: z.string().optional()
|
|
20561
20770
|
});
|
|
20562
|
-
async function
|
|
20771
|
+
async function run173(context) {
|
|
20563
20772
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
20564
20773
|
const result = await runXeCommand(context, "vbd-param-list", filters);
|
|
20565
20774
|
if (!result.success) {
|
|
@@ -20573,7 +20782,7 @@ async function run172(context) {
|
|
|
20573
20782
|
items: parseKeyValueOutput(result.stdout)
|
|
20574
20783
|
};
|
|
20575
20784
|
}
|
|
20576
|
-
var list_vbd_params_default = task(
|
|
20785
|
+
var list_vbd_params_default = task(run173, {
|
|
20577
20786
|
inputSchema: XcpngListVbdParamsParamsSchema,
|
|
20578
20787
|
outputSchema: XcpngListVbdParamsResultSchema,
|
|
20579
20788
|
description: "Lists virtual block devices (VBDs) on an XCP-ng host."
|
|
@@ -20588,7 +20797,7 @@ var XcpngListVbdsResultSchema = z.object({
|
|
|
20588
20797
|
items: z.array(z.any()).optional(),
|
|
20589
20798
|
error: z.string().optional()
|
|
20590
20799
|
});
|
|
20591
|
-
async function
|
|
20800
|
+
async function run174(context) {
|
|
20592
20801
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
20593
20802
|
const result = await runXeCommand(context, "vbd-list", filters);
|
|
20594
20803
|
if (!result.success) {
|
|
@@ -20638,7 +20847,7 @@ async function run173(context) {
|
|
|
20638
20847
|
items: enrichedItems
|
|
20639
20848
|
};
|
|
20640
20849
|
}
|
|
20641
|
-
var list_vbds_default = task(
|
|
20850
|
+
var list_vbds_default = task(run174, {
|
|
20642
20851
|
inputSchema: XcpngListVbdsParamsSchema,
|
|
20643
20852
|
outputSchema: XcpngListVbdsResultSchema,
|
|
20644
20853
|
description: "Lists virtual block devices (VBDs) on an XCP-ng host."
|
|
@@ -20655,7 +20864,7 @@ var XcpngListAttachedDisksResultSchema = z.object({
|
|
|
20655
20864
|
disks: z.array(z.any()).optional(),
|
|
20656
20865
|
error: z.string().optional()
|
|
20657
20866
|
});
|
|
20658
|
-
async function
|
|
20867
|
+
async function run175(context) {
|
|
20659
20868
|
const { params, error } = context;
|
|
20660
20869
|
const { vm_uuid: vmUuid, include_readonly: rawIncludeReadonly } = params ?? {};
|
|
20661
20870
|
if (!vmUuid) {
|
|
@@ -20749,7 +20958,7 @@ async function run174(context) {
|
|
|
20749
20958
|
disks
|
|
20750
20959
|
};
|
|
20751
20960
|
}
|
|
20752
|
-
var list_attached_disks_default = task(
|
|
20961
|
+
var list_attached_disks_default = task(run175, {
|
|
20753
20962
|
inputSchema: XcpngListAttachedDisksParamsSchema,
|
|
20754
20963
|
outputSchema: XcpngListAttachedDisksResultSchema,
|
|
20755
20964
|
description: "Lists VBDs attached to a VM and enriches them with VDI metadata so disks vs CD drives can be distinguished."
|
|
@@ -20776,7 +20985,7 @@ var XcpngRemoveDiskResultSchema = z.object({
|
|
|
20776
20985
|
appliedCommands: z.array(z.string()),
|
|
20777
20986
|
error: z.string().optional()
|
|
20778
20987
|
});
|
|
20779
|
-
async function
|
|
20988
|
+
async function run176(context) {
|
|
20780
20989
|
const { params, error } = context;
|
|
20781
20990
|
const {
|
|
20782
20991
|
vbd_uuid: vbdUuidParam,
|
|
@@ -20964,7 +21173,7 @@ async function waitForVdiRemoval(context, vdiUuid, timeoutMs) {
|
|
|
20964
21173
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
20965
21174
|
}
|
|
20966
21175
|
}
|
|
20967
|
-
var remove_disk_default = task(
|
|
21176
|
+
var remove_disk_default = task(run176, {
|
|
20968
21177
|
inputSchema: XcpngRemoveDiskParamsSchema,
|
|
20969
21178
|
outputSchema: XcpngRemoveDiskResultSchema,
|
|
20970
21179
|
description: "Detaches a VDI from a VM and optionally destroys the backing disk on XCP-ng."
|
|
@@ -20981,7 +21190,7 @@ var XcpngSetBootOrderResultSchema = z.object({
|
|
|
20981
21190
|
appliedCommands: z.array(z.string()),
|
|
20982
21191
|
error: z.string().optional()
|
|
20983
21192
|
});
|
|
20984
|
-
async function
|
|
21193
|
+
async function run177(context) {
|
|
20985
21194
|
const { params, error } = context;
|
|
20986
21195
|
const { vm_uuid, boot_order, firmware } = params;
|
|
20987
21196
|
if (!vm_uuid) {
|
|
@@ -21045,7 +21254,7 @@ async function run176(context) {
|
|
|
21045
21254
|
appliedCommands
|
|
21046
21255
|
};
|
|
21047
21256
|
}
|
|
21048
|
-
var set_boot_order_default = task(
|
|
21257
|
+
var set_boot_order_default = task(run177, {
|
|
21049
21258
|
inputSchema: XcpngSetBootOrderParamsSchema,
|
|
21050
21259
|
outputSchema: XcpngSetBootOrderResultSchema,
|
|
21051
21260
|
description: "Configures VM boot order and optional firmware mode via xe vm-param-set."
|
|
@@ -21098,7 +21307,7 @@ var OTHER_CONFIG_KEYS_TO_REMOVE = [
|
|
|
21098
21307
|
"cloud-init-hostname",
|
|
21099
21308
|
"cloud-init-instance-id"
|
|
21100
21309
|
];
|
|
21101
|
-
async function
|
|
21310
|
+
async function run178(context) {
|
|
21102
21311
|
if (!context.host) {
|
|
21103
21312
|
const message = "core.xcpng.create-template-from-vdi must run against a remote XCP-ng host.";
|
|
21104
21313
|
return {
|
|
@@ -21631,7 +21840,7 @@ async function run177(context) {
|
|
|
21631
21840
|
steps
|
|
21632
21841
|
};
|
|
21633
21842
|
}
|
|
21634
|
-
var create_template_from_vdi_default = task(
|
|
21843
|
+
var create_template_from_vdi_default = task(run178, {
|
|
21635
21844
|
inputSchema: XcpngCreateTemplateFromVdiParamsSchema,
|
|
21636
21845
|
outputSchema: XcpngCreateTemplateFromVdiResultSchema,
|
|
21637
21846
|
description: "Creates an XCP-ng template from an existing VDI by staging a VM and converting it."
|
|
@@ -21748,7 +21957,7 @@ var XcpngCreateNetworkResultSchema = z.object({
|
|
|
21748
21957
|
skipped: z.boolean().optional(),
|
|
21749
21958
|
error: z.string().optional()
|
|
21750
21959
|
});
|
|
21751
|
-
async function
|
|
21960
|
+
async function run179(context) {
|
|
21752
21961
|
const { params, error } = context;
|
|
21753
21962
|
const { name_label: nameLabel, description, bridge, mtu, tags, allow_existing: rawAllowExisting } = params ?? {};
|
|
21754
21963
|
if (!nameLabel) {
|
|
@@ -21813,7 +22022,7 @@ async function run178(context) {
|
|
|
21813
22022
|
appliedCommands
|
|
21814
22023
|
};
|
|
21815
22024
|
}
|
|
21816
|
-
var create_network_default = task(
|
|
22025
|
+
var create_network_default = task(run179, {
|
|
21817
22026
|
inputSchema: XcpngCreateNetworkParamsSchema,
|
|
21818
22027
|
outputSchema: XcpngCreateNetworkResultSchema,
|
|
21819
22028
|
description: "Creates a new network on an XCP-ng host (bridge, MTU, and tags optional)."
|
|
@@ -21845,7 +22054,7 @@ var XcpngFindOrCreateIsoSrResultSchema = z.object({
|
|
|
21845
22054
|
commands: z.array(z.string()),
|
|
21846
22055
|
error: z.string().optional()
|
|
21847
22056
|
});
|
|
21848
|
-
async function
|
|
22057
|
+
async function run180(context) {
|
|
21849
22058
|
const { params, debug, error: logError2 } = context;
|
|
21850
22059
|
const {
|
|
21851
22060
|
name_label: nameLabel,
|
|
@@ -21997,7 +22206,7 @@ async function runDirCreate(context, params) {
|
|
|
21997
22206
|
})
|
|
21998
22207
|
);
|
|
21999
22208
|
}
|
|
22000
|
-
var find_or_create_iso_sr_default = task(
|
|
22209
|
+
var find_or_create_iso_sr_default = task(run180, {
|
|
22001
22210
|
inputSchema: XcpngFindOrCreateIsoSrParamsSchema,
|
|
22002
22211
|
outputSchema: XcpngFindOrCreateIsoSrResultSchema,
|
|
22003
22212
|
description: "Finds an ISO storage repository by name, creating it if missing using xe sr-create."
|
|
@@ -22040,7 +22249,7 @@ var XcpngCreateConfigDriveResultSchema = z.object({
|
|
|
22040
22249
|
steps: z.array(z.any()),
|
|
22041
22250
|
error: z.string().optional()
|
|
22042
22251
|
});
|
|
22043
|
-
async function
|
|
22252
|
+
async function run181(context) {
|
|
22044
22253
|
if (!context.host) {
|
|
22045
22254
|
return {
|
|
22046
22255
|
success: false,
|
|
@@ -22559,7 +22768,7 @@ function decodeBase64Field(field, value) {
|
|
|
22559
22768
|
};
|
|
22560
22769
|
}
|
|
22561
22770
|
}
|
|
22562
|
-
var create_config_drive_default = task(
|
|
22771
|
+
var create_config_drive_default = task(run181, {
|
|
22563
22772
|
inputSchema: XcpngCreateConfigDriveParamsSchema,
|
|
22564
22773
|
outputSchema: XcpngCreateConfigDriveResultSchema,
|
|
22565
22774
|
description: "Generates a NoCloud config-drive ISO, stores it in an ISO SR, and returns the associated VDI."
|
|
@@ -22583,7 +22792,7 @@ var XcpngConvertTemplateToVmResultSchema = z.object({
|
|
|
22583
22792
|
alreadyVm: z.boolean().optional(),
|
|
22584
22793
|
error: z.string().optional()
|
|
22585
22794
|
});
|
|
22586
|
-
async function
|
|
22795
|
+
async function run182(context) {
|
|
22587
22796
|
const { params, error } = context;
|
|
22588
22797
|
const {
|
|
22589
22798
|
template_uuid: templateUuidParam,
|
|
@@ -22682,7 +22891,7 @@ async function run181(context) {
|
|
|
22682
22891
|
alreadyVm
|
|
22683
22892
|
};
|
|
22684
22893
|
}
|
|
22685
|
-
var convert_template_to_vm_default = task(
|
|
22894
|
+
var convert_template_to_vm_default = task(run182, {
|
|
22686
22895
|
inputSchema: XcpngConvertTemplateToVmParamsSchema,
|
|
22687
22896
|
outputSchema: XcpngConvertTemplateToVmResultSchema,
|
|
22688
22897
|
description: "Converts an XCP-ng template into a VM by clearing the template flag and optionally renaming it."
|
|
@@ -22703,7 +22912,7 @@ var XcpngDestroyIsoSrResultSchema = z.object({
|
|
|
22703
22912
|
skipped: z.boolean().optional(),
|
|
22704
22913
|
error: z.string().optional()
|
|
22705
22914
|
});
|
|
22706
|
-
async function
|
|
22915
|
+
async function run183(context) {
|
|
22707
22916
|
const { params, error } = context;
|
|
22708
22917
|
const { sr_uuid: srUuidParam, sr_name_label: srName, location, allow_missing: rawAllowMissing } = params ?? {};
|
|
22709
22918
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -22869,7 +23078,7 @@ async function detachSrPbds(context, srUuid, allowMissing) {
|
|
|
22869
23078
|
}
|
|
22870
23079
|
return { commands };
|
|
22871
23080
|
}
|
|
22872
|
-
var destroy_iso_sr_default = task(
|
|
23081
|
+
var destroy_iso_sr_default = task(run183, {
|
|
22873
23082
|
inputSchema: XcpngDestroyIsoSrParamsSchema,
|
|
22874
23083
|
outputSchema: XcpngDestroyIsoSrResultSchema,
|
|
22875
23084
|
description: "Destroys an ISO storage repository and optionally removes its backing directory."
|
|
@@ -22888,7 +23097,7 @@ var XcpngDestroyBondResultSchema = z.object({
|
|
|
22888
23097
|
skipped: z.boolean().optional(),
|
|
22889
23098
|
error: z.string().optional()
|
|
22890
23099
|
});
|
|
22891
|
-
async function
|
|
23100
|
+
async function run184(context) {
|
|
22892
23101
|
const { params, error } = context;
|
|
22893
23102
|
const { bond_uuid: bondUuidParam, pif_uuid: pifUuidParam, allow_missing: rawAllowMissing } = params ?? {};
|
|
22894
23103
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -22925,7 +23134,7 @@ async function run183(context) {
|
|
|
22925
23134
|
appliedCommands
|
|
22926
23135
|
};
|
|
22927
23136
|
}
|
|
22928
|
-
var destroy_bond_default = task(
|
|
23137
|
+
var destroy_bond_default = task(run184, {
|
|
22929
23138
|
inputSchema: XcpngDestroyBondParamsSchema,
|
|
22930
23139
|
outputSchema: XcpngDestroyBondResultSchema,
|
|
22931
23140
|
description: "Destroys a bonded interface, wrapping xe bond-destroy."
|
|
@@ -22947,7 +23156,7 @@ var XcpngCreateSrResultSchema = z.object({
|
|
|
22947
23156
|
skipped: z.boolean().optional(),
|
|
22948
23157
|
error: z.string().optional()
|
|
22949
23158
|
});
|
|
22950
|
-
async function
|
|
23159
|
+
async function run185(context) {
|
|
22951
23160
|
const { params, error } = context;
|
|
22952
23161
|
const {
|
|
22953
23162
|
name_label: nameLabel,
|
|
@@ -23022,7 +23231,7 @@ async function run184(context) {
|
|
|
23022
23231
|
appliedCommands
|
|
23023
23232
|
};
|
|
23024
23233
|
}
|
|
23025
|
-
var create_sr_default = task(
|
|
23234
|
+
var create_sr_default = task(run185, {
|
|
23026
23235
|
inputSchema: XcpngCreateSrParamsSchema,
|
|
23027
23236
|
outputSchema: XcpngCreateSrResultSchema,
|
|
23028
23237
|
description: "Creates a new storage repository (SR) with the specified device configuration."
|
|
@@ -23042,7 +23251,7 @@ var XcpngDestroySrResultSchema = z.object({
|
|
|
23042
23251
|
skipped: z.boolean().optional(),
|
|
23043
23252
|
error: z.string().optional()
|
|
23044
23253
|
});
|
|
23045
|
-
async function
|
|
23254
|
+
async function run186(context) {
|
|
23046
23255
|
const { params, error } = context;
|
|
23047
23256
|
const {
|
|
23048
23257
|
sr_uuid: srUuidParam,
|
|
@@ -23116,7 +23325,7 @@ async function run185(context) {
|
|
|
23116
23325
|
appliedCommands
|
|
23117
23326
|
};
|
|
23118
23327
|
}
|
|
23119
|
-
var destroy_sr_default = task(
|
|
23328
|
+
var destroy_sr_default = task(run186, {
|
|
23120
23329
|
inputSchema: XcpngDestroySrParamsSchema,
|
|
23121
23330
|
outputSchema: XcpngDestroySrResultSchema,
|
|
23122
23331
|
description: "Destroys a storage repository by UUID or name-label (optionally forcing)."
|
|
@@ -23135,7 +23344,7 @@ var XcpngDestroyNetworkResultSchema = z.object({
|
|
|
23135
23344
|
skipped: z.boolean().optional(),
|
|
23136
23345
|
error: z.string().optional()
|
|
23137
23346
|
});
|
|
23138
|
-
async function
|
|
23347
|
+
async function run187(context) {
|
|
23139
23348
|
const { params, error } = context;
|
|
23140
23349
|
const {
|
|
23141
23350
|
network_uuid: networkUuidParam,
|
|
@@ -23202,7 +23411,7 @@ async function run186(context) {
|
|
|
23202
23411
|
appliedCommands
|
|
23203
23412
|
};
|
|
23204
23413
|
}
|
|
23205
|
-
var destroy_network_default = task(
|
|
23414
|
+
var destroy_network_default = task(run187, {
|
|
23206
23415
|
inputSchema: XcpngDestroyNetworkParamsSchema,
|
|
23207
23416
|
outputSchema: XcpngDestroyNetworkResultSchema,
|
|
23208
23417
|
description: "Destroys an XCP-ng network by UUID or name-label."
|
|
@@ -23224,7 +23433,7 @@ var XcpngDestroyPbdResultSchema = z.object({
|
|
|
23224
23433
|
skipped: z.boolean().optional(),
|
|
23225
23434
|
error: z.string().optional()
|
|
23226
23435
|
});
|
|
23227
|
-
async function
|
|
23436
|
+
async function run188(context) {
|
|
23228
23437
|
const { params, error } = context;
|
|
23229
23438
|
const {
|
|
23230
23439
|
pbd_uuid: pbdUuidParam,
|
|
@@ -23333,7 +23542,7 @@ async function run187(context) {
|
|
|
23333
23542
|
appliedCommands
|
|
23334
23543
|
};
|
|
23335
23544
|
}
|
|
23336
|
-
var destroy_pbd_default = task(
|
|
23545
|
+
var destroy_pbd_default = task(run188, {
|
|
23337
23546
|
inputSchema: XcpngDestroyPbdParamsSchema,
|
|
23338
23547
|
outputSchema: XcpngDestroyPbdResultSchema,
|
|
23339
23548
|
description: "Destroys a host \u2194 storage repository binding (PBD)."
|
|
@@ -23349,7 +23558,7 @@ var XcpngDestroySnapshotResultSchema = z.object({
|
|
|
23349
23558
|
command: z.string().optional(),
|
|
23350
23559
|
error: z.string().optional()
|
|
23351
23560
|
});
|
|
23352
|
-
async function
|
|
23561
|
+
async function run189(context) {
|
|
23353
23562
|
const { params, error } = context;
|
|
23354
23563
|
const { snapshot_uuid: snapshotUuid } = params ?? {};
|
|
23355
23564
|
if (!snapshotUuid) {
|
|
@@ -23372,7 +23581,7 @@ async function run188(context) {
|
|
|
23372
23581
|
command: result.command
|
|
23373
23582
|
};
|
|
23374
23583
|
}
|
|
23375
|
-
var destroy_snapshot_default = task(
|
|
23584
|
+
var destroy_snapshot_default = task(run189, {
|
|
23376
23585
|
inputSchema: XcpngDestroySnapshotParamsSchema,
|
|
23377
23586
|
outputSchema: XcpngDestroySnapshotResultSchema,
|
|
23378
23587
|
description: "Destroys an XCP-ng VM snapshot."
|
|
@@ -23392,7 +23601,7 @@ var XcpngIntroduceSrResultSchema = z.object({
|
|
|
23392
23601
|
appliedCommands: z.array(z.string()),
|
|
23393
23602
|
error: z.string().optional()
|
|
23394
23603
|
});
|
|
23395
|
-
async function
|
|
23604
|
+
async function run190(context) {
|
|
23396
23605
|
const { params, error } = context;
|
|
23397
23606
|
const { sr_uuid: srUuid, name_label: nameLabel, type, content_type: contentType, shared } = params ?? {};
|
|
23398
23607
|
if (!srUuid) {
|
|
@@ -23433,7 +23642,7 @@ async function run189(context) {
|
|
|
23433
23642
|
appliedCommands
|
|
23434
23643
|
};
|
|
23435
23644
|
}
|
|
23436
|
-
var introduce_sr_default = task(
|
|
23645
|
+
var introduce_sr_default = task(run190, {
|
|
23437
23646
|
inputSchema: XcpngIntroduceSrParamsSchema,
|
|
23438
23647
|
outputSchema: XcpngIntroduceSrResultSchema,
|
|
23439
23648
|
description: "Introduces an existing storage repository into the pool."
|
|
@@ -23452,7 +23661,7 @@ var XcpngForgetSrResultSchema = z.object({
|
|
|
23452
23661
|
skipped: z.boolean().optional(),
|
|
23453
23662
|
error: z.string().optional()
|
|
23454
23663
|
});
|
|
23455
|
-
async function
|
|
23664
|
+
async function run191(context) {
|
|
23456
23665
|
const { params, error } = context;
|
|
23457
23666
|
const { sr_uuid: srUuidParam, sr_name_label: srNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
23458
23667
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -23515,7 +23724,7 @@ async function run190(context) {
|
|
|
23515
23724
|
appliedCommands
|
|
23516
23725
|
};
|
|
23517
23726
|
}
|
|
23518
|
-
var forget_sr_default = task(
|
|
23727
|
+
var forget_sr_default = task(run191, {
|
|
23519
23728
|
inputSchema: XcpngForgetSrParamsSchema,
|
|
23520
23729
|
outputSchema: XcpngForgetSrResultSchema,
|
|
23521
23730
|
description: "Forgets an SR from the pool metadata without destroying the underlying storage."
|
|
@@ -23530,7 +23739,7 @@ var XcpngListSnapshotsResultSchema = z.object({
|
|
|
23530
23739
|
items: z.any().optional(),
|
|
23531
23740
|
error: z.string().optional()
|
|
23532
23741
|
});
|
|
23533
|
-
async function
|
|
23742
|
+
async function run192(context) {
|
|
23534
23743
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
23535
23744
|
const result = await runXeCommand(context, "snapshot-list", filters);
|
|
23536
23745
|
if (!result.success) {
|
|
@@ -23544,7 +23753,7 @@ async function run191(context) {
|
|
|
23544
23753
|
items: parseKeyValueOutput(result.stdout)
|
|
23545
23754
|
};
|
|
23546
23755
|
}
|
|
23547
|
-
var list_snapshots_default = task(
|
|
23756
|
+
var list_snapshots_default = task(run192, {
|
|
23548
23757
|
inputSchema: XcpngListSnapshotsParamsSchema,
|
|
23549
23758
|
outputSchema: XcpngListSnapshotsResultSchema,
|
|
23550
23759
|
description: "Lists VM snapshots available on the host."
|
|
@@ -23559,7 +23768,7 @@ var XcpngListMessagesResultSchema = z.object({
|
|
|
23559
23768
|
items: z.any().optional(),
|
|
23560
23769
|
error: z.string().optional()
|
|
23561
23770
|
});
|
|
23562
|
-
async function
|
|
23771
|
+
async function run193(context) {
|
|
23563
23772
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
23564
23773
|
const result = await runXeCommand(context, "message-list", filters);
|
|
23565
23774
|
if (!result.success) {
|
|
@@ -23573,7 +23782,7 @@ async function run192(context) {
|
|
|
23573
23782
|
items: parseKeyValueOutput(result.stdout)
|
|
23574
23783
|
};
|
|
23575
23784
|
}
|
|
23576
|
-
var list_messages_default = task(
|
|
23785
|
+
var list_messages_default = task(run193, {
|
|
23577
23786
|
inputSchema: XcpngListMessagesParamsSchema,
|
|
23578
23787
|
outputSchema: XcpngListMessagesResultSchema,
|
|
23579
23788
|
description: "Lists messages emitted by the XCP-ng pool."
|
|
@@ -23592,7 +23801,7 @@ var XcpngClearMessagesResultSchema = z.object({
|
|
|
23592
23801
|
commands: z.any().optional(),
|
|
23593
23802
|
error: z.string().optional()
|
|
23594
23803
|
});
|
|
23595
|
-
async function
|
|
23804
|
+
async function run194(context) {
|
|
23596
23805
|
const { params, error } = context;
|
|
23597
23806
|
const { uuid, uuid_prefix: uuidPrefix, all: rawAll, filters } = params ?? {};
|
|
23598
23807
|
const all = coerceBoolean(rawAll, false);
|
|
@@ -23650,7 +23859,7 @@ async function run193(context) {
|
|
|
23650
23859
|
commands
|
|
23651
23860
|
};
|
|
23652
23861
|
}
|
|
23653
|
-
var clear_messages_default = task(
|
|
23862
|
+
var clear_messages_default = task(run194, {
|
|
23654
23863
|
inputSchema: XcpngClearMessagesParamsSchema,
|
|
23655
23864
|
outputSchema: XcpngClearMessagesResultSchema,
|
|
23656
23865
|
description: "Clears messages (all, by UUID, or UUID prefix)."
|
|
@@ -23671,7 +23880,7 @@ var XcpngDestroyTemplateResultSchema = z.object({
|
|
|
23671
23880
|
skipped: z.boolean().optional(),
|
|
23672
23881
|
error: z.string().optional()
|
|
23673
23882
|
});
|
|
23674
|
-
async function
|
|
23883
|
+
async function run195(context) {
|
|
23675
23884
|
const { params, error } = context;
|
|
23676
23885
|
const {
|
|
23677
23886
|
template_uuid: templateUuidParam,
|
|
@@ -23746,7 +23955,7 @@ async function run194(context) {
|
|
|
23746
23955
|
command: commandResult.command
|
|
23747
23956
|
};
|
|
23748
23957
|
}
|
|
23749
|
-
var destroy_template_default = task(
|
|
23958
|
+
var destroy_template_default = task(run195, {
|
|
23750
23959
|
inputSchema: XcpngDestroyTemplateParamsSchema,
|
|
23751
23960
|
outputSchema: XcpngDestroyTemplateResultSchema,
|
|
23752
23961
|
description: "Destroys an XCP-ng template by UUID or name-label."
|
|
@@ -23766,7 +23975,7 @@ var XcpngDestroyVdiResultSchema = z.object({
|
|
|
23766
23975
|
skipped: z.boolean().optional(),
|
|
23767
23976
|
error: z.string().optional()
|
|
23768
23977
|
});
|
|
23769
|
-
async function
|
|
23978
|
+
async function run196(context) {
|
|
23770
23979
|
const { params, error } = context;
|
|
23771
23980
|
const {
|
|
23772
23981
|
vdi_uuid: vdiUuidParam,
|
|
@@ -23831,7 +24040,7 @@ async function run195(context) {
|
|
|
23831
24040
|
command: result.command
|
|
23832
24041
|
};
|
|
23833
24042
|
}
|
|
23834
|
-
var destroy_vdi_default = task(
|
|
24043
|
+
var destroy_vdi_default = task(run196, {
|
|
23835
24044
|
inputSchema: XcpngDestroyVdiParamsSchema,
|
|
23836
24045
|
outputSchema: XcpngDestroyVdiResultSchema,
|
|
23837
24046
|
description: "Destroys an XCP-ng VDI by UUID (optionally resolving by name-label)."
|
|
@@ -23856,7 +24065,7 @@ var XcpngDestroyVmResultSchema = z.object({
|
|
|
23856
24065
|
skipped: z.boolean().optional(),
|
|
23857
24066
|
error: z.string().optional()
|
|
23858
24067
|
});
|
|
23859
|
-
async function
|
|
24068
|
+
async function run197(context) {
|
|
23860
24069
|
const { params, error } = context;
|
|
23861
24070
|
const {
|
|
23862
24071
|
vm_uuid: vmUuidParam,
|
|
@@ -24019,7 +24228,7 @@ async function run196(context) {
|
|
|
24019
24228
|
destroyedVdiUuids
|
|
24020
24229
|
};
|
|
24021
24230
|
}
|
|
24022
|
-
var destroy_vm_default = task(
|
|
24231
|
+
var destroy_vm_default = task(run197, {
|
|
24023
24232
|
inputSchema: XcpngDestroyVmParamsSchema,
|
|
24024
24233
|
outputSchema: XcpngDestroyVmResultSchema,
|
|
24025
24234
|
description: "Destroys an XCP-ng VM, optionally forcing and pruning snapshots."
|
|
@@ -24048,7 +24257,7 @@ var XcpngCopyVdiResultSchema = z.object({
|
|
|
24048
24257
|
skipped: z.boolean().optional(),
|
|
24049
24258
|
error: z.string().optional()
|
|
24050
24259
|
});
|
|
24051
|
-
async function
|
|
24260
|
+
async function run198(context) {
|
|
24052
24261
|
const { params, error } = context;
|
|
24053
24262
|
const {
|
|
24054
24263
|
source_vdi_uuid: sourceVdiUuidParam,
|
|
@@ -24193,7 +24402,7 @@ async function run197(context) {
|
|
|
24193
24402
|
appliedCommands
|
|
24194
24403
|
};
|
|
24195
24404
|
}
|
|
24196
|
-
var copy_vdi_default = task(
|
|
24405
|
+
var copy_vdi_default = task(run198, {
|
|
24197
24406
|
inputSchema: XcpngCopyVdiParamsSchema,
|
|
24198
24407
|
outputSchema: XcpngCopyVdiResultSchema,
|
|
24199
24408
|
description: "Copies an XCP-ng VDI to a destination storage repository and optionally updates its metadata."
|
|
@@ -24211,7 +24420,7 @@ var XcpngDetachIsoResultSchema = z.object({
|
|
|
24211
24420
|
alreadyEmpty: z.boolean().optional(),
|
|
24212
24421
|
error: z.string().optional()
|
|
24213
24422
|
});
|
|
24214
|
-
async function
|
|
24423
|
+
async function run199(context) {
|
|
24215
24424
|
const { params, error } = context;
|
|
24216
24425
|
const { vm_uuid: vmUuid, allow_missing: rawAllowMissing } = params;
|
|
24217
24426
|
if (!vmUuid) {
|
|
@@ -24243,7 +24452,7 @@ async function run198(context) {
|
|
|
24243
24452
|
error: message
|
|
24244
24453
|
};
|
|
24245
24454
|
}
|
|
24246
|
-
var detach_iso_default = task(
|
|
24455
|
+
var detach_iso_default = task(run199, {
|
|
24247
24456
|
inputSchema: XcpngDetachIsoParamsSchema,
|
|
24248
24457
|
outputSchema: XcpngDetachIsoResultSchema,
|
|
24249
24458
|
description: "Ejects ISO media from a VM, tolerating empty drives when allow_missing:true."
|
|
@@ -24269,7 +24478,7 @@ var XcpngDetachVdiResultSchema = z.object({
|
|
|
24269
24478
|
appliedCommands: z.array(z.string()),
|
|
24270
24479
|
error: z.string().optional()
|
|
24271
24480
|
});
|
|
24272
|
-
async function
|
|
24481
|
+
async function run200(context) {
|
|
24273
24482
|
const { params } = context;
|
|
24274
24483
|
const {
|
|
24275
24484
|
vbd_uuid,
|
|
@@ -24306,7 +24515,7 @@ async function run199(context) {
|
|
|
24306
24515
|
error: result.error
|
|
24307
24516
|
};
|
|
24308
24517
|
}
|
|
24309
|
-
var detach_vdi_default = task(
|
|
24518
|
+
var detach_vdi_default = task(run200, {
|
|
24310
24519
|
inputSchema: XcpngDetachVdiParamsSchema,
|
|
24311
24520
|
outputSchema: XcpngDetachVdiResultSchema,
|
|
24312
24521
|
description: "Detaches a VDI from a VM by unplugging and optionally destroying the VBD, leaving the VDI intact by default."
|
|
@@ -24328,7 +24537,7 @@ var XcpngDetachNetworkInterfaceResultSchema = z.object({
|
|
|
24328
24537
|
appliedCommands: z.array(z.string()),
|
|
24329
24538
|
error: z.string().optional()
|
|
24330
24539
|
});
|
|
24331
|
-
async function
|
|
24540
|
+
async function run201(context) {
|
|
24332
24541
|
const { params, error } = context;
|
|
24333
24542
|
const {
|
|
24334
24543
|
vif_uuid: vifUuidParam,
|
|
@@ -24422,7 +24631,7 @@ async function run200(context) {
|
|
|
24422
24631
|
appliedCommands
|
|
24423
24632
|
};
|
|
24424
24633
|
}
|
|
24425
|
-
var detach_network_interface_default = task(
|
|
24634
|
+
var detach_network_interface_default = task(run201, {
|
|
24426
24635
|
inputSchema: XcpngDetachNetworkInterfaceParamsSchema,
|
|
24427
24636
|
outputSchema: XcpngDetachNetworkInterfaceResultSchema,
|
|
24428
24637
|
description: "Unplugs (and optionally destroys) a virtual network interface from an XCP-ng VM."
|
|
@@ -24442,7 +24651,7 @@ var XcpngEnableHostResultSchema = z.object({
|
|
|
24442
24651
|
skipped: z.boolean().optional(),
|
|
24443
24652
|
error: z.string().optional()
|
|
24444
24653
|
});
|
|
24445
|
-
async function
|
|
24654
|
+
async function run202(context) {
|
|
24446
24655
|
const { params, error } = context;
|
|
24447
24656
|
const {
|
|
24448
24657
|
host_uuid: hostUuidParam,
|
|
@@ -24510,7 +24719,7 @@ async function run201(context) {
|
|
|
24510
24719
|
appliedCommands
|
|
24511
24720
|
};
|
|
24512
24721
|
}
|
|
24513
|
-
var enable_host_default = task(
|
|
24722
|
+
var enable_host_default = task(run202, {
|
|
24514
24723
|
inputSchema: XcpngEnableHostParamsSchema,
|
|
24515
24724
|
outputSchema: XcpngEnableHostResultSchema,
|
|
24516
24725
|
description: "Enables maintenance-disabled hosts so they rejoin scheduling."
|
|
@@ -24532,7 +24741,7 @@ var XcpngDisableHostResultSchema = z.object({
|
|
|
24532
24741
|
evacuated: z.boolean().optional(),
|
|
24533
24742
|
error: z.string().optional()
|
|
24534
24743
|
});
|
|
24535
|
-
async function
|
|
24744
|
+
async function run203(context) {
|
|
24536
24745
|
const { params, error } = context;
|
|
24537
24746
|
const {
|
|
24538
24747
|
host_uuid: hostUuidParam,
|
|
@@ -24617,7 +24826,7 @@ async function run202(context) {
|
|
|
24617
24826
|
evacuated: evacuate
|
|
24618
24827
|
};
|
|
24619
24828
|
}
|
|
24620
|
-
var disable_host_default = task(
|
|
24829
|
+
var disable_host_default = task(run203, {
|
|
24621
24830
|
inputSchema: XcpngDisableHostParamsSchema,
|
|
24622
24831
|
outputSchema: XcpngDisableHostResultSchema,
|
|
24623
24832
|
description: "Disables a host (optionally evacuating resident VMs first)."
|
|
@@ -24637,7 +24846,7 @@ var XcpngPlugPbdResultSchema = z.object({
|
|
|
24637
24846
|
skipped: z.boolean().optional(),
|
|
24638
24847
|
error: z.string().optional()
|
|
24639
24848
|
});
|
|
24640
|
-
async function
|
|
24849
|
+
async function run204(context) {
|
|
24641
24850
|
const { params, error } = context;
|
|
24642
24851
|
const { pbd_uuid: pbdUuidParam, sr_uuid: srUuid, host_uuid: hostUuid, allow_missing: rawAllowMissing } = params ?? {};
|
|
24643
24852
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24701,7 +24910,7 @@ async function run203(context) {
|
|
|
24701
24910
|
appliedCommands
|
|
24702
24911
|
};
|
|
24703
24912
|
}
|
|
24704
|
-
var plug_pbd_default = task(
|
|
24913
|
+
var plug_pbd_default = task(run204, {
|
|
24705
24914
|
inputSchema: XcpngPlugPbdParamsSchema,
|
|
24706
24915
|
outputSchema: XcpngPlugPbdResultSchema,
|
|
24707
24916
|
description: "Plugs a PBD so the host reattaches the storage repository."
|
|
@@ -24721,7 +24930,7 @@ var XcpngUnplugPbdResultSchema = z.object({
|
|
|
24721
24930
|
skipped: z.boolean().optional(),
|
|
24722
24931
|
error: z.string().optional()
|
|
24723
24932
|
});
|
|
24724
|
-
async function
|
|
24933
|
+
async function run205(context) {
|
|
24725
24934
|
const { params, error } = context;
|
|
24726
24935
|
const { pbd_uuid: pbdUuidParam, sr_uuid: srUuid, host_uuid: hostUuid, allow_missing: rawAllowMissing } = params ?? {};
|
|
24727
24936
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24785,7 +24994,7 @@ async function run204(context) {
|
|
|
24785
24994
|
appliedCommands
|
|
24786
24995
|
};
|
|
24787
24996
|
}
|
|
24788
|
-
var unplug_pbd_default = task(
|
|
24997
|
+
var unplug_pbd_default = task(run205, {
|
|
24789
24998
|
inputSchema: XcpngUnplugPbdParamsSchema,
|
|
24790
24999
|
outputSchema: XcpngUnplugPbdResultSchema,
|
|
24791
25000
|
description: "Unplugs a PBD so the host detaches the storage repository."
|
|
@@ -24800,7 +25009,7 @@ var XcpngListPoolsResultSchema = z.object({
|
|
|
24800
25009
|
items: z.any().optional(),
|
|
24801
25010
|
error: z.string().optional()
|
|
24802
25011
|
});
|
|
24803
|
-
async function
|
|
25012
|
+
async function run206(context) {
|
|
24804
25013
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
24805
25014
|
const result = await runXeCommand(context, "pool-list", filters);
|
|
24806
25015
|
if (!result.success) {
|
|
@@ -24814,7 +25023,7 @@ async function run205(context) {
|
|
|
24814
25023
|
items: parseKeyValueOutput(result.stdout)
|
|
24815
25024
|
};
|
|
24816
25025
|
}
|
|
24817
|
-
var list_pools_default = task(
|
|
25026
|
+
var list_pools_default = task(run206, {
|
|
24818
25027
|
inputSchema: XcpngListPoolsParamsSchema,
|
|
24819
25028
|
outputSchema: XcpngListPoolsResultSchema,
|
|
24820
25029
|
description: "Lists pools available to the current host."
|
|
@@ -24835,7 +25044,7 @@ var XcpngFindPoolResultSchema = z.object({
|
|
|
24835
25044
|
multiple: z.boolean().optional(),
|
|
24836
25045
|
error: z.string().optional()
|
|
24837
25046
|
});
|
|
24838
|
-
async function
|
|
25047
|
+
async function run207(context) {
|
|
24839
25048
|
const params = context.params ?? {};
|
|
24840
25049
|
const {
|
|
24841
25050
|
uuid,
|
|
@@ -24935,7 +25144,7 @@ async function runListPools(context, params) {
|
|
|
24935
25144
|
})
|
|
24936
25145
|
);
|
|
24937
25146
|
}
|
|
24938
|
-
var find_pool_default = task(
|
|
25147
|
+
var find_pool_default = task(run207, {
|
|
24939
25148
|
inputSchema: XcpngFindPoolParamsSchema,
|
|
24940
25149
|
outputSchema: XcpngFindPoolResultSchema,
|
|
24941
25150
|
description: "Finds a single pool by UUID or name-label, optionally allowing multiple matches."
|
|
@@ -24954,7 +25163,7 @@ var XcpngSetPoolParamResultSchema = z.object({
|
|
|
24954
25163
|
appliedCommands: z.array(z.string()),
|
|
24955
25164
|
error: z.string().optional()
|
|
24956
25165
|
});
|
|
24957
|
-
async function
|
|
25166
|
+
async function run208(context) {
|
|
24958
25167
|
const { params, error } = context;
|
|
24959
25168
|
const { pool_uuid: poolUuidParam, pool_name_label: poolNameLabel, key, value } = params ?? {};
|
|
24960
25169
|
if (!key) {
|
|
@@ -25015,7 +25224,7 @@ async function run207(context) {
|
|
|
25015
25224
|
appliedCommands
|
|
25016
25225
|
};
|
|
25017
25226
|
}
|
|
25018
|
-
var set_pool_param_default = task(
|
|
25227
|
+
var set_pool_param_default = task(run208, {
|
|
25019
25228
|
inputSchema: XcpngSetPoolParamParamsSchema,
|
|
25020
25229
|
outputSchema: XcpngSetPoolParamResultSchema,
|
|
25021
25230
|
description: "Updates a pool parameter (wraps xe pool-param-set)."
|
|
@@ -25035,7 +25244,7 @@ var XcpngRebootHostResultSchema = z.object({
|
|
|
25035
25244
|
skipped: z.boolean().optional(),
|
|
25036
25245
|
error: z.string().optional()
|
|
25037
25246
|
});
|
|
25038
|
-
async function
|
|
25247
|
+
async function run209(context) {
|
|
25039
25248
|
const { params, error } = context;
|
|
25040
25249
|
const {
|
|
25041
25250
|
host_uuid: hostUuidParam,
|
|
@@ -25101,7 +25310,7 @@ async function run208(context) {
|
|
|
25101
25310
|
command: commandResult.command
|
|
25102
25311
|
};
|
|
25103
25312
|
}
|
|
25104
|
-
var reboot_host_default = task(
|
|
25313
|
+
var reboot_host_default = task(run209, {
|
|
25105
25314
|
inputSchema: XcpngRebootHostParamsSchema,
|
|
25106
25315
|
outputSchema: XcpngRebootHostResultSchema,
|
|
25107
25316
|
description: "Reboots an XCP-ng host (optionally forcing)."
|
|
@@ -25121,7 +25330,7 @@ var XcpngShutdownHostResultSchema = z.object({
|
|
|
25121
25330
|
skipped: z.boolean().optional(),
|
|
25122
25331
|
error: z.string().optional()
|
|
25123
25332
|
});
|
|
25124
|
-
async function
|
|
25333
|
+
async function run210(context) {
|
|
25125
25334
|
const { params, error } = context;
|
|
25126
25335
|
const {
|
|
25127
25336
|
host_uuid: hostUuidParam,
|
|
@@ -25185,7 +25394,7 @@ async function run209(context) {
|
|
|
25185
25394
|
command: commandResult.command
|
|
25186
25395
|
};
|
|
25187
25396
|
}
|
|
25188
|
-
var shutdown_host_default = task(
|
|
25397
|
+
var shutdown_host_default = task(run210, {
|
|
25189
25398
|
inputSchema: XcpngShutdownHostParamsSchema,
|
|
25190
25399
|
outputSchema: XcpngShutdownHostResultSchema,
|
|
25191
25400
|
description: "Shuts down an XCP-ng host (optionally forcing)."
|
|
@@ -25204,7 +25413,7 @@ var XcpngEvacuateHostResultSchema = z.object({
|
|
|
25204
25413
|
skipped: z.boolean().optional(),
|
|
25205
25414
|
error: z.string().optional()
|
|
25206
25415
|
});
|
|
25207
|
-
async function
|
|
25416
|
+
async function run211(context) {
|
|
25208
25417
|
const { params, error } = context;
|
|
25209
25418
|
const { host_uuid: hostUuidParam, host_name_label: hostNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
25210
25419
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -25257,7 +25466,7 @@ async function run210(context) {
|
|
|
25257
25466
|
command: commandResult.command
|
|
25258
25467
|
};
|
|
25259
25468
|
}
|
|
25260
|
-
var evacuate_host_default = task(
|
|
25469
|
+
var evacuate_host_default = task(run211, {
|
|
25261
25470
|
inputSchema: XcpngEvacuateHostParamsSchema,
|
|
25262
25471
|
outputSchema: XcpngEvacuateHostResultSchema,
|
|
25263
25472
|
description: "Evacuates all VMs from a host."
|
|
@@ -25278,7 +25487,7 @@ var XcpngPlugPifResultSchema = z.object({
|
|
|
25278
25487
|
skipped: z.boolean().optional(),
|
|
25279
25488
|
error: z.string().optional()
|
|
25280
25489
|
});
|
|
25281
|
-
async function
|
|
25490
|
+
async function run212(context) {
|
|
25282
25491
|
const { params, error } = context;
|
|
25283
25492
|
const {
|
|
25284
25493
|
pif_uuid: pifUuidParam,
|
|
@@ -25375,7 +25584,7 @@ async function run211(context) {
|
|
|
25375
25584
|
appliedCommands
|
|
25376
25585
|
};
|
|
25377
25586
|
}
|
|
25378
|
-
var plug_pif_default = task(
|
|
25587
|
+
var plug_pif_default = task(run212, {
|
|
25379
25588
|
inputSchema: XcpngPlugPifParamsSchema,
|
|
25380
25589
|
outputSchema: XcpngPlugPifResultSchema,
|
|
25381
25590
|
description: "Plugs a physical interface (PIF) on the specified host."
|
|
@@ -25394,7 +25603,7 @@ var XcpngPifScanResultSchema = z.object({
|
|
|
25394
25603
|
skipped: z.boolean().optional(),
|
|
25395
25604
|
error: z.string().optional()
|
|
25396
25605
|
});
|
|
25397
|
-
async function
|
|
25606
|
+
async function run213(context) {
|
|
25398
25607
|
const { params, error } = context;
|
|
25399
25608
|
const { host_uuid: hostUuidParam, host_name_label: hostNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
25400
25609
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -25459,7 +25668,7 @@ async function run212(context) {
|
|
|
25459
25668
|
appliedCommands
|
|
25460
25669
|
};
|
|
25461
25670
|
}
|
|
25462
|
-
var pif_scan_default = task(
|
|
25671
|
+
var pif_scan_default = task(run213, {
|
|
25463
25672
|
inputSchema: XcpngPifScanParamsSchema,
|
|
25464
25673
|
outputSchema: XcpngPifScanResultSchema,
|
|
25465
25674
|
description: "Rescans physical interfaces (PIFs) on a host to discover changes."
|
|
@@ -25480,7 +25689,7 @@ var XcpngUnplugPifResultSchema = z.object({
|
|
|
25480
25689
|
skipped: z.boolean().optional(),
|
|
25481
25690
|
error: z.string().optional()
|
|
25482
25691
|
});
|
|
25483
|
-
async function
|
|
25692
|
+
async function run214(context) {
|
|
25484
25693
|
const { params, error } = context;
|
|
25485
25694
|
const {
|
|
25486
25695
|
pif_uuid: pifUuidParam,
|
|
@@ -25577,7 +25786,7 @@ async function run213(context) {
|
|
|
25577
25786
|
appliedCommands
|
|
25578
25787
|
};
|
|
25579
25788
|
}
|
|
25580
|
-
var unplug_pif_default = task(
|
|
25789
|
+
var unplug_pif_default = task(run214, {
|
|
25581
25790
|
inputSchema: XcpngUnplugPifParamsSchema,
|
|
25582
25791
|
outputSchema: XcpngUnplugPifResultSchema,
|
|
25583
25792
|
description: "Unplugs a physical interface (PIF) on the specified host."
|
|
@@ -25595,7 +25804,7 @@ var XcpngSetPifParamResultSchema = z.object({
|
|
|
25595
25804
|
command: z.string().optional(),
|
|
25596
25805
|
error: z.string().optional()
|
|
25597
25806
|
});
|
|
25598
|
-
async function
|
|
25807
|
+
async function run215(context) {
|
|
25599
25808
|
const { params, error } = context;
|
|
25600
25809
|
const { pif_uuid: pifUuid, key, value } = params ?? {};
|
|
25601
25810
|
if (!pifUuid) {
|
|
@@ -25633,7 +25842,7 @@ async function run214(context) {
|
|
|
25633
25842
|
command: commandResult.command
|
|
25634
25843
|
};
|
|
25635
25844
|
}
|
|
25636
|
-
var set_pif_param_default = task(
|
|
25845
|
+
var set_pif_param_default = task(run215, {
|
|
25637
25846
|
inputSchema: XcpngSetPifParamParamsSchema,
|
|
25638
25847
|
outputSchema: XcpngSetPifParamResultSchema,
|
|
25639
25848
|
description: "Updates a PIF parameter (wraps `xe pif-param-set`)."
|
|
@@ -25650,7 +25859,7 @@ var XcpngUnplugVbdResultSchema = z.object({
|
|
|
25650
25859
|
alreadyDetached: z.boolean().optional(),
|
|
25651
25860
|
error: z.string().optional()
|
|
25652
25861
|
});
|
|
25653
|
-
async function
|
|
25862
|
+
async function run216(context) {
|
|
25654
25863
|
const { params, error } = context;
|
|
25655
25864
|
const { vbd_uuid: vbdUuid, allow_missing: rawAllowMissing } = params;
|
|
25656
25865
|
if (!vbdUuid) {
|
|
@@ -25680,7 +25889,7 @@ async function run215(context) {
|
|
|
25680
25889
|
error: message
|
|
25681
25890
|
};
|
|
25682
25891
|
}
|
|
25683
|
-
var unplug_vbd_default = task(
|
|
25892
|
+
var unplug_vbd_default = task(run216, {
|
|
25684
25893
|
inputSchema: XcpngUnplugVbdParamsSchema,
|
|
25685
25894
|
outputSchema: XcpngUnplugVbdResultSchema,
|
|
25686
25895
|
description: "Unplugs a VBD from an XCP-ng VM, tolerating already-detached devices when allow_missing:true."
|
|
@@ -25700,7 +25909,7 @@ var XcpngSuspendVmResultSchema = z.object({
|
|
|
25700
25909
|
waitAttempts: z.number().optional(),
|
|
25701
25910
|
error: z.string().optional()
|
|
25702
25911
|
});
|
|
25703
|
-
async function
|
|
25912
|
+
async function run217(context) {
|
|
25704
25913
|
const { params, error } = context;
|
|
25705
25914
|
const { vm_uuid: vmUuid, allow_running: rawAllowRunning } = params;
|
|
25706
25915
|
if (!vmUuid) {
|
|
@@ -25761,7 +25970,7 @@ async function run216(context) {
|
|
|
25761
25970
|
waitAttempts: waitResult.attempts
|
|
25762
25971
|
};
|
|
25763
25972
|
}
|
|
25764
|
-
var suspend_vm_default = task(
|
|
25973
|
+
var suspend_vm_default = task(run217, {
|
|
25765
25974
|
inputSchema: XcpngSuspendVmParamsSchema,
|
|
25766
25975
|
outputSchema: XcpngSuspendVmResultSchema,
|
|
25767
25976
|
description: "Suspends an XCP-ng VM, waiting until the VM reports the suspended power state."
|
|
@@ -25782,7 +25991,7 @@ var XcpngResumeVmResultSchema = z.object({
|
|
|
25782
25991
|
waitAttempts: z.number().optional(),
|
|
25783
25992
|
error: z.string().optional()
|
|
25784
25993
|
});
|
|
25785
|
-
async function
|
|
25994
|
+
async function run218(context) {
|
|
25786
25995
|
const { params, error } = context;
|
|
25787
25996
|
const { vm_uuid: vmUuid, start_paused: rawStartPaused, host_uuid: hostUuid } = params;
|
|
25788
25997
|
if (!vmUuid) {
|
|
@@ -25847,7 +26056,7 @@ async function run217(context) {
|
|
|
25847
26056
|
waitAttempts: waitResult.attempts
|
|
25848
26057
|
};
|
|
25849
26058
|
}
|
|
25850
|
-
var resume_vm_default = task(
|
|
26059
|
+
var resume_vm_default = task(run218, {
|
|
25851
26060
|
inputSchema: XcpngResumeVmParamsSchema,
|
|
25852
26061
|
outputSchema: XcpngResumeVmResultSchema,
|
|
25853
26062
|
description: "Resumes a suspended XCP-ng VM, optionally starting it in a paused state or on a specific host."
|
|
@@ -25862,7 +26071,7 @@ var XcpngListVifParamsResultSchema = z.object({
|
|
|
25862
26071
|
items: z.any().optional(),
|
|
25863
26072
|
error: z.string().optional()
|
|
25864
26073
|
});
|
|
25865
|
-
async function
|
|
26074
|
+
async function run219(context) {
|
|
25866
26075
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25867
26076
|
const result = await runXeCommand(context, "vif-param-list", filters);
|
|
25868
26077
|
if (!result.success) {
|
|
@@ -25876,7 +26085,7 @@ async function run218(context) {
|
|
|
25876
26085
|
items: parseKeyValueOutput(result.stdout)
|
|
25877
26086
|
};
|
|
25878
26087
|
}
|
|
25879
|
-
var list_vif_params_default = task(
|
|
26088
|
+
var list_vif_params_default = task(run219, {
|
|
25880
26089
|
inputSchema: XcpngListVifParamsParamsSchema,
|
|
25881
26090
|
outputSchema: XcpngListVifParamsResultSchema,
|
|
25882
26091
|
description: "Lists parameters for virtual interfaces (VIFs) on an XCP-ng host."
|
|
@@ -25891,7 +26100,7 @@ var XcpngListVifsResultSchema = z.object({
|
|
|
25891
26100
|
items: z.array(z.any()).optional(),
|
|
25892
26101
|
error: z.string().optional()
|
|
25893
26102
|
});
|
|
25894
|
-
async function
|
|
26103
|
+
async function run220(context) {
|
|
25895
26104
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25896
26105
|
const result = await runXeCommand(context, "vif-list", filters);
|
|
25897
26106
|
if (!result.success) {
|
|
@@ -25939,7 +26148,7 @@ async function run219(context) {
|
|
|
25939
26148
|
items: enrichedItems
|
|
25940
26149
|
};
|
|
25941
26150
|
}
|
|
25942
|
-
var list_vifs_default = task(
|
|
26151
|
+
var list_vifs_default = task(run220, {
|
|
25943
26152
|
inputSchema: XcpngListVifsParamsSchema,
|
|
25944
26153
|
outputSchema: XcpngListVifsResultSchema,
|
|
25945
26154
|
description: "Lists VIFs (virtual interfaces) attached to VMs."
|
|
@@ -25954,7 +26163,7 @@ var XcpngListPifParamsResultSchema = z.object({
|
|
|
25954
26163
|
items: z.any().optional(),
|
|
25955
26164
|
error: z.string().optional()
|
|
25956
26165
|
});
|
|
25957
|
-
async function
|
|
26166
|
+
async function run221(context) {
|
|
25958
26167
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25959
26168
|
const result = await runXeCommand(context, "pif-param-list", filters);
|
|
25960
26169
|
if (!result.success) {
|
|
@@ -25968,7 +26177,7 @@ async function run220(context) {
|
|
|
25968
26177
|
items: parseKeyValueOutput(result.stdout)
|
|
25969
26178
|
};
|
|
25970
26179
|
}
|
|
25971
|
-
var list_pif_params_default = task(
|
|
26180
|
+
var list_pif_params_default = task(run221, {
|
|
25972
26181
|
inputSchema: XcpngListPifParamsParamsSchema,
|
|
25973
26182
|
outputSchema: XcpngListPifParamsResultSchema,
|
|
25974
26183
|
description: "Lists parameters for PIFs on an XCP-ng host."
|
|
@@ -25983,7 +26192,7 @@ var XcpngListPifsResultSchema = z.object({
|
|
|
25983
26192
|
items: z.array(z.any()).optional(),
|
|
25984
26193
|
error: z.string().optional()
|
|
25985
26194
|
});
|
|
25986
|
-
async function
|
|
26195
|
+
async function run222(context) {
|
|
25987
26196
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25988
26197
|
const result = await runXeCommand(context, "pif-list", filters);
|
|
25989
26198
|
if (!result.success) {
|
|
@@ -26031,7 +26240,7 @@ async function run221(context) {
|
|
|
26031
26240
|
items: enrichedItems
|
|
26032
26241
|
};
|
|
26033
26242
|
}
|
|
26034
|
-
var list_pifs_default = task(
|
|
26243
|
+
var list_pifs_default = task(run222, {
|
|
26035
26244
|
inputSchema: XcpngListPifsParamsSchema,
|
|
26036
26245
|
outputSchema: XcpngListPifsResultSchema,
|
|
26037
26246
|
description: "Lists PIFs (physical interfaces) available on the XCP-ng host."
|
|
@@ -26051,7 +26260,7 @@ var XcpngRebootVmResultSchema = z.object({
|
|
|
26051
26260
|
powerState: z.string().optional(),
|
|
26052
26261
|
waitAttempts: z.number().optional()
|
|
26053
26262
|
});
|
|
26054
|
-
async function
|
|
26263
|
+
async function run223(context) {
|
|
26055
26264
|
const { params, error } = context;
|
|
26056
26265
|
const { vm_uuid: vmUuidParam, vm_name_label: vmNameLabel, force: rawForce } = params ?? {};
|
|
26057
26266
|
const force = coerceBoolean(rawForce, false);
|
|
@@ -26112,7 +26321,7 @@ async function run222(context) {
|
|
|
26112
26321
|
waitAttempts: waitResult.attempts
|
|
26113
26322
|
};
|
|
26114
26323
|
}
|
|
26115
|
-
var reboot_vm_default = task(
|
|
26324
|
+
var reboot_vm_default = task(run223, {
|
|
26116
26325
|
inputSchema: XcpngRebootVmParamsSchema,
|
|
26117
26326
|
outputSchema: XcpngRebootVmResultSchema,
|
|
26118
26327
|
description: "Reboots an XCP-ng VM using `xe vm-reboot`."
|
|
@@ -26131,7 +26340,7 @@ var XcpngSetNetworkParamResultSchema = z.object({
|
|
|
26131
26340
|
appliedCommands: z.array(z.string()),
|
|
26132
26341
|
error: z.string().optional()
|
|
26133
26342
|
});
|
|
26134
|
-
async function
|
|
26343
|
+
async function run224(context) {
|
|
26135
26344
|
const { params, error } = context;
|
|
26136
26345
|
const { network_uuid: networkUuidParam, network_name_label: networkNameLabel, key, value } = params ?? {};
|
|
26137
26346
|
if (!key) {
|
|
@@ -26192,7 +26401,7 @@ async function run223(context) {
|
|
|
26192
26401
|
appliedCommands
|
|
26193
26402
|
};
|
|
26194
26403
|
}
|
|
26195
|
-
var set_network_param_default = task(
|
|
26404
|
+
var set_network_param_default = task(run224, {
|
|
26196
26405
|
inputSchema: XcpngSetNetworkParamParamsSchema,
|
|
26197
26406
|
outputSchema: XcpngSetNetworkParamResultSchema,
|
|
26198
26407
|
description: "Updates a network parameter (wraps xe network-param-set)."
|
|
@@ -26216,7 +26425,7 @@ var XcpngResizeVdiResultSchema = z.object({
|
|
|
26216
26425
|
newSizeBytes: z.number().optional(),
|
|
26217
26426
|
error: z.string().optional()
|
|
26218
26427
|
});
|
|
26219
|
-
async function
|
|
26428
|
+
async function run225(context) {
|
|
26220
26429
|
const { params, error } = context;
|
|
26221
26430
|
const {
|
|
26222
26431
|
vdi_uuid: vdiUuidParam,
|
|
@@ -26290,7 +26499,7 @@ async function run224(context) {
|
|
|
26290
26499
|
newSizeBytes: sizeBytes
|
|
26291
26500
|
};
|
|
26292
26501
|
}
|
|
26293
|
-
var resize_vdi_default = task(
|
|
26502
|
+
var resize_vdi_default = task(run225, {
|
|
26294
26503
|
inputSchema: XcpngResizeVdiParamsSchema,
|
|
26295
26504
|
outputSchema: XcpngResizeVdiResultSchema,
|
|
26296
26505
|
description: "Resizes an existing VDI on XCP-ng using `xe vdi-resize`/`vdi-resize-online`."
|
|
@@ -26322,7 +26531,7 @@ var XcpngSetVmResourcesResultSchema = z.object({
|
|
|
26322
26531
|
powerState: z.string().optional(),
|
|
26323
26532
|
waitAttempts: z.number().optional()
|
|
26324
26533
|
});
|
|
26325
|
-
async function
|
|
26534
|
+
async function run226(context) {
|
|
26326
26535
|
const { params, error } = context;
|
|
26327
26536
|
const {
|
|
26328
26537
|
vm_uuid: vmUuidParam,
|
|
@@ -26625,7 +26834,7 @@ function ensurePositiveMib(value, fieldName) {
|
|
|
26625
26834
|
bytes: mibToBytes2(value)
|
|
26626
26835
|
};
|
|
26627
26836
|
}
|
|
26628
|
-
var set_vm_resources_default = task(
|
|
26837
|
+
var set_vm_resources_default = task(run226, {
|
|
26629
26838
|
inputSchema: XcpngSetVmResourcesParamsSchema,
|
|
26630
26839
|
outputSchema: XcpngSetVmResourcesResultSchema,
|
|
26631
26840
|
description: "Updates VM memory and vCPU settings on an XCP-ng host."
|
|
@@ -26650,7 +26859,7 @@ var XcpngResizeVmCpusResultSchema = z.object({
|
|
|
26650
26859
|
powerState: z.string().optional(),
|
|
26651
26860
|
waitAttempts: z.number().optional()
|
|
26652
26861
|
});
|
|
26653
|
-
async function
|
|
26862
|
+
async function run227(context) {
|
|
26654
26863
|
const { params, error } = context;
|
|
26655
26864
|
const {
|
|
26656
26865
|
vm_uuid: vmUuid,
|
|
@@ -26699,7 +26908,7 @@ async function run226(context) {
|
|
|
26699
26908
|
waitAttempts: result.waitAttempts
|
|
26700
26909
|
};
|
|
26701
26910
|
}
|
|
26702
|
-
var resize_vm_cpus_default = task(
|
|
26911
|
+
var resize_vm_cpus_default = task(run227, {
|
|
26703
26912
|
inputSchema: XcpngResizeVmCpusParamsSchema,
|
|
26704
26913
|
outputSchema: XcpngResizeVmCpusResultSchema,
|
|
26705
26914
|
description: "Resizes an XCP-ng VM\u2019s vCPU configuration."
|
|
@@ -26720,7 +26929,7 @@ var XcpngResizeVmMemoryResultSchema = z.object({
|
|
|
26720
26929
|
powerState: z.string().optional(),
|
|
26721
26930
|
waitAttempts: z.number().optional()
|
|
26722
26931
|
});
|
|
26723
|
-
async function
|
|
26932
|
+
async function run228(context) {
|
|
26724
26933
|
const { params, error } = context;
|
|
26725
26934
|
const { vm_uuid: vmUuid, vm_name_label: vmNameLabel, memory_mib: memoryMib } = params ?? {};
|
|
26726
26935
|
if (!memoryMib || !Number.isFinite(memoryMib) || memoryMib <= 0) {
|
|
@@ -26759,7 +26968,7 @@ async function run227(context) {
|
|
|
26759
26968
|
waitAttempts: result.waitAttempts
|
|
26760
26969
|
};
|
|
26761
26970
|
}
|
|
26762
|
-
var resize_vm_memory_default = task(
|
|
26971
|
+
var resize_vm_memory_default = task(run228, {
|
|
26763
26972
|
inputSchema: XcpngResizeVmMemoryParamsSchema,
|
|
26764
26973
|
outputSchema: XcpngResizeVmMemoryResultSchema,
|
|
26765
26974
|
description: "Resizes an XCP-ng VM\u2019s memory allocation (static/dynamic bounds)."
|
|
@@ -26778,7 +26987,7 @@ var XcpngRevertSnapshotResultSchema = z.object({
|
|
|
26778
26987
|
powerState: z.string().optional(),
|
|
26779
26988
|
waitAttempts: z.number().optional()
|
|
26780
26989
|
});
|
|
26781
|
-
async function
|
|
26990
|
+
async function run229(context) {
|
|
26782
26991
|
const { params, error } = context;
|
|
26783
26992
|
const { snapshot_uuid: snapshotUuid } = params ?? {};
|
|
26784
26993
|
if (!snapshotUuid) {
|
|
@@ -26867,7 +27076,7 @@ async function run228(context) {
|
|
|
26867
27076
|
waitAttempts
|
|
26868
27077
|
};
|
|
26869
27078
|
}
|
|
26870
|
-
var revert_snapshot_default = task(
|
|
27079
|
+
var revert_snapshot_default = task(run229, {
|
|
26871
27080
|
inputSchema: XcpngRevertSnapshotParamsSchema,
|
|
26872
27081
|
outputSchema: XcpngRevertSnapshotResultSchema,
|
|
26873
27082
|
description: "Reverts an XCP-ng VM to a specified snapshot."
|
|
@@ -26885,7 +27094,7 @@ var XcpngSetSnapshotParamResultSchema = z.object({
|
|
|
26885
27094
|
command: z.string().optional(),
|
|
26886
27095
|
error: z.string().optional()
|
|
26887
27096
|
});
|
|
26888
|
-
async function
|
|
27097
|
+
async function run230(context) {
|
|
26889
27098
|
const { params, error } = context;
|
|
26890
27099
|
const { snapshot_uuid: snapshotUuid, key, value } = params ?? {};
|
|
26891
27100
|
if (!snapshotUuid) {
|
|
@@ -26923,7 +27132,7 @@ async function run229(context) {
|
|
|
26923
27132
|
command: commandResult.command
|
|
26924
27133
|
};
|
|
26925
27134
|
}
|
|
26926
|
-
var set_snapshot_param_default = task(
|
|
27135
|
+
var set_snapshot_param_default = task(run230, {
|
|
26927
27136
|
inputSchema: XcpngSetSnapshotParamParamsSchema,
|
|
26928
27137
|
outputSchema: XcpngSetSnapshotParamResultSchema,
|
|
26929
27138
|
description: "Updates a snapshot parameter (wraps xe snapshot-param-set)."
|
|
@@ -26942,7 +27151,7 @@ var XcpngSetSrParamResultSchema = z.object({
|
|
|
26942
27151
|
appliedCommands: z.array(z.string()),
|
|
26943
27152
|
error: z.string().optional()
|
|
26944
27153
|
});
|
|
26945
|
-
async function
|
|
27154
|
+
async function run231(context) {
|
|
26946
27155
|
const { params, error } = context;
|
|
26947
27156
|
const { sr_uuid: srUuidParam, sr_name_label: srNameLabel, key, value } = params ?? {};
|
|
26948
27157
|
if (!key) {
|
|
@@ -27003,7 +27212,7 @@ async function run230(context) {
|
|
|
27003
27212
|
appliedCommands
|
|
27004
27213
|
};
|
|
27005
27214
|
}
|
|
27006
|
-
var set_sr_param_default = task(
|
|
27215
|
+
var set_sr_param_default = task(run231, {
|
|
27007
27216
|
inputSchema: XcpngSetSrParamParamsSchema,
|
|
27008
27217
|
outputSchema: XcpngSetSrParamResultSchema,
|
|
27009
27218
|
description: "Updates a storage repository parameter (wraps xe sr-param-set)."
|
|
@@ -27024,7 +27233,7 @@ var XcpngStartVmResultSchema = z.object({
|
|
|
27024
27233
|
finalPowerState: z.string().optional(),
|
|
27025
27234
|
waitAttempts: z.number().optional()
|
|
27026
27235
|
});
|
|
27027
|
-
async function
|
|
27236
|
+
async function run232(context) {
|
|
27028
27237
|
const { params, error } = context;
|
|
27029
27238
|
const { vm_uuid, start_paused: rawStartPaused, force: rawForce } = params;
|
|
27030
27239
|
const startPaused = coerceBoolean(rawStartPaused, false);
|
|
@@ -27091,7 +27300,7 @@ async function run231(context) {
|
|
|
27091
27300
|
waitAttempts: waitResult.attempts
|
|
27092
27301
|
};
|
|
27093
27302
|
}
|
|
27094
|
-
var start_vm_default = task(
|
|
27303
|
+
var start_vm_default = task(run232, {
|
|
27095
27304
|
inputSchema: XcpngStartVmParamsSchema,
|
|
27096
27305
|
outputSchema: XcpngStartVmResultSchema,
|
|
27097
27306
|
description: "Starts an XCP-ng virtual machine with optional paused or forced modes."
|
|
@@ -27112,7 +27321,7 @@ var XcpngStopVmResultSchema = z.object({
|
|
|
27112
27321
|
finalPowerState: z.string().optional(),
|
|
27113
27322
|
waitAttempts: z.number().optional()
|
|
27114
27323
|
});
|
|
27115
|
-
async function
|
|
27324
|
+
async function run233(context) {
|
|
27116
27325
|
const { params, error } = context;
|
|
27117
27326
|
const { vm_uuid, force: rawForce, timeout_seconds: rawTimeout } = params;
|
|
27118
27327
|
const force = coerceBoolean(rawForce, false);
|
|
@@ -27187,7 +27396,7 @@ async function run232(context) {
|
|
|
27187
27396
|
waitAttempts: waitResult.attempts
|
|
27188
27397
|
};
|
|
27189
27398
|
}
|
|
27190
|
-
var stop_vm_default = task(
|
|
27399
|
+
var stop_vm_default = task(run233, {
|
|
27191
27400
|
inputSchema: XcpngStopVmParamsSchema,
|
|
27192
27401
|
outputSchema: XcpngStopVmResultSchema,
|
|
27193
27402
|
description: "Stops an XCP-ng virtual machine gracefully or forcefully."
|
|
@@ -27216,7 +27425,7 @@ var XcpngImportIsoResultSchema = z.object({
|
|
|
27216
27425
|
commands: z.array(z.string()),
|
|
27217
27426
|
error: z.string().optional()
|
|
27218
27427
|
});
|
|
27219
|
-
async function
|
|
27428
|
+
async function run234(context) {
|
|
27220
27429
|
if (!context.host) {
|
|
27221
27430
|
return {
|
|
27222
27431
|
success: false,
|
|
@@ -27422,7 +27631,7 @@ async function findIsoVdi2(context, srUuid, isoFileName) {
|
|
|
27422
27631
|
}
|
|
27423
27632
|
return { vdi };
|
|
27424
27633
|
}
|
|
27425
|
-
var import_iso_default = task(
|
|
27634
|
+
var import_iso_default = task(run234, {
|
|
27426
27635
|
inputSchema: XcpngImportIsoParamsSchema,
|
|
27427
27636
|
outputSchema: XcpngImportIsoResultSchema,
|
|
27428
27637
|
description: "Ensures an ISO file is represented as a VDI in an ISO SR by rescanning and importing when necessary."
|
|
@@ -27451,7 +27660,7 @@ var XcpngUploadIsoHostResultSchema = z.object({
|
|
|
27451
27660
|
remotePath: z.string().optional(),
|
|
27452
27661
|
error: z.string().optional()
|
|
27453
27662
|
});
|
|
27454
|
-
async function
|
|
27663
|
+
async function run235(context) {
|
|
27455
27664
|
if (context.host) {
|
|
27456
27665
|
return {
|
|
27457
27666
|
success: false,
|
|
@@ -27506,10 +27715,10 @@ async function run234(context) {
|
|
|
27506
27715
|
const uploads = await context.ssh(
|
|
27507
27716
|
[],
|
|
27508
27717
|
async (remoteContext) => {
|
|
27509
|
-
const { run:
|
|
27718
|
+
const { run: run253 } = remoteContext;
|
|
27510
27719
|
const remotePath = pathPosix3.join(resolvedLocation, remoteFileName);
|
|
27511
27720
|
try {
|
|
27512
|
-
const srResult = await
|
|
27721
|
+
const srResult = await run253(
|
|
27513
27722
|
find_or_create_iso_sr_default({
|
|
27514
27723
|
name_label: isoSrName,
|
|
27515
27724
|
location: resolvedLocation,
|
|
@@ -27526,7 +27735,7 @@ async function run234(context) {
|
|
|
27526
27735
|
error: srResult.error ?? "Failed to ensure ISO SR exists."
|
|
27527
27736
|
};
|
|
27528
27737
|
}
|
|
27529
|
-
const fileExistsResult = await
|
|
27738
|
+
const fileExistsResult = await run253(exists_default2({ path: remotePath }));
|
|
27530
27739
|
if (fileExistsResult.exists) {
|
|
27531
27740
|
return {
|
|
27532
27741
|
success: true,
|
|
@@ -27593,7 +27802,7 @@ function resolveChunkSizeBytes(chunkSizeMb) {
|
|
|
27593
27802
|
const bounded = Math.min(Math.max(safeSize, MIN_CHUNK_SIZE_MB), MAX_CHUNK_SIZE_MB);
|
|
27594
27803
|
return bounded * 1024 * 1024;
|
|
27595
27804
|
}
|
|
27596
|
-
var upload_iso_default = task(
|
|
27805
|
+
var upload_iso_default = task(run235, {
|
|
27597
27806
|
inputSchema: XcpngUploadIsoParamsSchema,
|
|
27598
27807
|
outputSchema: XcpngUploadIsoHostResultSchema,
|
|
27599
27808
|
description: "Uploads a local ISO to the remote XCP-ng hypervisor, ensuring the target ISO SR exists beforehand."
|
|
@@ -27630,7 +27839,7 @@ function parseMapValue(raw) {
|
|
|
27630
27839
|
return acc;
|
|
27631
27840
|
}, {});
|
|
27632
27841
|
}
|
|
27633
|
-
async function
|
|
27842
|
+
async function run236(context) {
|
|
27634
27843
|
const { params, error } = context;
|
|
27635
27844
|
const {
|
|
27636
27845
|
vm_uuid: vmUuidParam,
|
|
@@ -27768,7 +27977,7 @@ async function run235(context) {
|
|
|
27768
27977
|
}
|
|
27769
27978
|
return result;
|
|
27770
27979
|
}
|
|
27771
|
-
var get_vm_info_default = task(
|
|
27980
|
+
var get_vm_info_default = task(run236, {
|
|
27772
27981
|
inputSchema: XcpngGetVmInfoParamsSchema,
|
|
27773
27982
|
outputSchema: XcpngGetVmInfoResultSchema,
|
|
27774
27983
|
description: "Returns structured VM details (platform, boot configuration, memory/CPU sizing, and optional VBD/VIF inventory)."
|
|
@@ -27792,7 +28001,7 @@ var XcpngExportVdiResultSchema = z.object({
|
|
|
27792
28001
|
skipped: z.boolean().optional(),
|
|
27793
28002
|
error: z.string().optional()
|
|
27794
28003
|
});
|
|
27795
|
-
async function
|
|
28004
|
+
async function run237(context) {
|
|
27796
28005
|
const { params, error } = context;
|
|
27797
28006
|
const {
|
|
27798
28007
|
vdi_uuid: vdiUuidParam,
|
|
@@ -27872,7 +28081,7 @@ async function run236(context) {
|
|
|
27872
28081
|
appliedCommands
|
|
27873
28082
|
};
|
|
27874
28083
|
}
|
|
27875
|
-
var export_vdi_default = task(
|
|
28084
|
+
var export_vdi_default = task(run237, {
|
|
27876
28085
|
inputSchema: XcpngExportVdiParamsSchema,
|
|
27877
28086
|
outputSchema: XcpngExportVdiResultSchema,
|
|
27878
28087
|
description: "Exports a VDI to the hypervisor filesystem via xe vdi-export."
|
|
@@ -27926,7 +28135,7 @@ var XcpngProvisionVmFromIsoResultSchema = z.object({
|
|
|
27926
28135
|
steps: z.array(z.any()),
|
|
27927
28136
|
error: z.string().optional()
|
|
27928
28137
|
});
|
|
27929
|
-
async function
|
|
28138
|
+
async function run238(context) {
|
|
27930
28139
|
if (!context.host) {
|
|
27931
28140
|
return {
|
|
27932
28141
|
success: false,
|
|
@@ -28253,7 +28462,7 @@ async function run237(context) {
|
|
|
28253
28462
|
steps
|
|
28254
28463
|
};
|
|
28255
28464
|
}
|
|
28256
|
-
var provision_vm_from_iso_default = task(
|
|
28465
|
+
var provision_vm_from_iso_default = task(run238, {
|
|
28257
28466
|
inputSchema: XcpngProvisionVmFromIsoParamsSchema,
|
|
28258
28467
|
outputSchema: XcpngProvisionVmFromIsoResultSchema,
|
|
28259
28468
|
description: "Creates a VM from a template, attaches storage, network, and ISO media, and optionally boots it for installation."
|
|
@@ -29283,7 +29492,7 @@ function resolveMemoryMib(input) {
|
|
|
29283
29492
|
}
|
|
29284
29493
|
return { value: Math.floor(value) };
|
|
29285
29494
|
}
|
|
29286
|
-
async function
|
|
29495
|
+
async function run239(context) {
|
|
29287
29496
|
if (!context.host) {
|
|
29288
29497
|
return runLocal(context);
|
|
29289
29498
|
}
|
|
@@ -29496,7 +29705,7 @@ function buildLocalFailure(step, message) {
|
|
|
29496
29705
|
error: message
|
|
29497
29706
|
};
|
|
29498
29707
|
}
|
|
29499
|
-
var provision_vm_default = task(
|
|
29708
|
+
var provision_vm_default = task(run239, {
|
|
29500
29709
|
inputSchema: XcpngProvisionVmParamsSchema,
|
|
29501
29710
|
outputSchema: XcpngProvisionVmResultSchema,
|
|
29502
29711
|
description: "Provisions a VM from an XCP-ng template by cloning its root disk, configuring cloud-init metadata, and attaching network resources."
|
|
@@ -29562,7 +29771,7 @@ var XcpngSnapshotVmResultSchema = z.object({
|
|
|
29562
29771
|
command: z.string().optional(),
|
|
29563
29772
|
error: z.string().optional()
|
|
29564
29773
|
});
|
|
29565
|
-
async function
|
|
29774
|
+
async function run240(context) {
|
|
29566
29775
|
const { params, error } = context;
|
|
29567
29776
|
const {
|
|
29568
29777
|
vm_uuid: vmUuidParam,
|
|
@@ -29632,7 +29841,7 @@ async function run239(context) {
|
|
|
29632
29841
|
command: snapshotResult.command
|
|
29633
29842
|
};
|
|
29634
29843
|
}
|
|
29635
|
-
var snapshot_vm_default = task(
|
|
29844
|
+
var snapshot_vm_default = task(run240, {
|
|
29636
29845
|
inputSchema: XcpngSnapshotVmParamsSchema,
|
|
29637
29846
|
outputSchema: XcpngSnapshotVmResultSchema,
|
|
29638
29847
|
description: "Creates a snapshot of an XCP-ng VM (optionally with quiesce)."
|
|
@@ -29659,7 +29868,7 @@ var XcpngImportVdiResultSchema = z.object({
|
|
|
29659
29868
|
appliedCommands: z.array(z.string()),
|
|
29660
29869
|
error: z.string().optional()
|
|
29661
29870
|
});
|
|
29662
|
-
async function
|
|
29871
|
+
async function run241(context) {
|
|
29663
29872
|
const { params, error } = context;
|
|
29664
29873
|
const {
|
|
29665
29874
|
sr_uuid: srUuidParam,
|
|
@@ -29781,7 +29990,7 @@ async function run240(context) {
|
|
|
29781
29990
|
appliedCommands
|
|
29782
29991
|
};
|
|
29783
29992
|
}
|
|
29784
|
-
var import_vdi_default = task(
|
|
29993
|
+
var import_vdi_default = task(run241, {
|
|
29785
29994
|
inputSchema: XcpngImportVdiParamsSchema,
|
|
29786
29995
|
outputSchema: XcpngImportVdiResultSchema,
|
|
29787
29996
|
description: "Imports a VDI file into a storage repository via xe vdi-import."
|
|
@@ -29883,7 +30092,7 @@ var XcpngVmMigrateResultSchema = z.object({
|
|
|
29883
30092
|
skipped: z.boolean().optional(),
|
|
29884
30093
|
error: z.string().optional()
|
|
29885
30094
|
});
|
|
29886
|
-
async function
|
|
30095
|
+
async function run242(context) {
|
|
29887
30096
|
const { params, error } = context;
|
|
29888
30097
|
const {
|
|
29889
30098
|
vm_uuid: vmUuidParam,
|
|
@@ -30007,7 +30216,7 @@ async function run241(context) {
|
|
|
30007
30216
|
appliedCommands
|
|
30008
30217
|
};
|
|
30009
30218
|
}
|
|
30010
|
-
var vm_migrate_default = task(
|
|
30219
|
+
var vm_migrate_default = task(run242, {
|
|
30011
30220
|
inputSchema: XcpngVmMigrateParamsSchema,
|
|
30012
30221
|
outputSchema: XcpngVmMigrateResultSchema,
|
|
30013
30222
|
description: "Migrates a VM to another host (and optionally storage repository) via xe vm-migrate."
|
|
@@ -30032,7 +30241,7 @@ var XcpngVmExportResultSchema = z.object({
|
|
|
30032
30241
|
skipped: z.boolean().optional(),
|
|
30033
30242
|
error: z.string().optional()
|
|
30034
30243
|
});
|
|
30035
|
-
async function
|
|
30244
|
+
async function run243(context) {
|
|
30036
30245
|
const { params, error } = context;
|
|
30037
30246
|
const {
|
|
30038
30247
|
vm_uuid: vmUuidParam,
|
|
@@ -30121,7 +30330,7 @@ async function run242(context) {
|
|
|
30121
30330
|
appliedCommands
|
|
30122
30331
|
};
|
|
30123
30332
|
}
|
|
30124
|
-
var vm_export_default = task(
|
|
30333
|
+
var vm_export_default = task(run243, {
|
|
30125
30334
|
inputSchema: XcpngVmExportParamsSchema,
|
|
30126
30335
|
outputSchema: XcpngVmExportResultSchema,
|
|
30127
30336
|
description: "Exports a VM to an XVA file via xe vm-export."
|
|
@@ -30143,7 +30352,7 @@ var XcpngVmImportResultSchema = z.object({
|
|
|
30143
30352
|
appliedCommands: z.array(z.string()),
|
|
30144
30353
|
error: z.string().optional()
|
|
30145
30354
|
});
|
|
30146
|
-
async function
|
|
30355
|
+
async function run244(context) {
|
|
30147
30356
|
const { params, error } = context;
|
|
30148
30357
|
const {
|
|
30149
30358
|
filename,
|
|
@@ -30212,7 +30421,7 @@ async function run243(context) {
|
|
|
30212
30421
|
appliedCommands
|
|
30213
30422
|
};
|
|
30214
30423
|
}
|
|
30215
|
-
var vm_import_default = task(
|
|
30424
|
+
var vm_import_default = task(run244, {
|
|
30216
30425
|
inputSchema: XcpngVmImportParamsSchema,
|
|
30217
30426
|
outputSchema: XcpngVmImportResultSchema,
|
|
30218
30427
|
description: "Imports a VM image from an XVA file via xe vm-import."
|
|
@@ -30239,7 +30448,7 @@ var XcpngVmCopyResultSchema = z.object({
|
|
|
30239
30448
|
skipped: z.boolean().optional(),
|
|
30240
30449
|
error: z.string().optional()
|
|
30241
30450
|
});
|
|
30242
|
-
async function
|
|
30451
|
+
async function run245(context) {
|
|
30243
30452
|
const { params, error } = context;
|
|
30244
30453
|
const {
|
|
30245
30454
|
vm_uuid: vmUuidParam,
|
|
@@ -30366,7 +30575,7 @@ async function run244(context) {
|
|
|
30366
30575
|
appliedCommands
|
|
30367
30576
|
};
|
|
30368
30577
|
}
|
|
30369
|
-
var vm_copy_default = task(
|
|
30578
|
+
var vm_copy_default = task(run245, {
|
|
30370
30579
|
inputSchema: XcpngVmCopyParamsSchema,
|
|
30371
30580
|
outputSchema: XcpngVmCopyResultSchema,
|
|
30372
30581
|
description: "Creates a full copy of a VM, optionally targeting a different SR."
|
|
@@ -30386,7 +30595,7 @@ var XcpngDetachCdMediaResultSchema = z.object({
|
|
|
30386
30595
|
error: z.string().optional(),
|
|
30387
30596
|
skipped: z.boolean().optional()
|
|
30388
30597
|
});
|
|
30389
|
-
async function
|
|
30598
|
+
async function run246(context) {
|
|
30390
30599
|
if (!context.host) {
|
|
30391
30600
|
return {
|
|
30392
30601
|
success: false,
|
|
@@ -30523,7 +30732,7 @@ function filterCdDisks(disks) {
|
|
|
30523
30732
|
}
|
|
30524
30733
|
return results;
|
|
30525
30734
|
}
|
|
30526
|
-
var detach_cd_media_default = task(
|
|
30735
|
+
var detach_cd_media_default = task(run246, {
|
|
30527
30736
|
inputSchema: XcpngDetachCdMediaParamsSchema,
|
|
30528
30737
|
outputSchema: XcpngDetachCdMediaResultSchema,
|
|
30529
30738
|
description: "Detaches CD/DVD virtual media from a VM by unplugging and destroying associated VBDs."
|
|
@@ -30546,7 +30755,7 @@ var XcpngCleanupConfigDriveResultSchema = z.object({
|
|
|
30546
30755
|
error: z.string().optional(),
|
|
30547
30756
|
skipped: z.boolean().optional()
|
|
30548
30757
|
});
|
|
30549
|
-
async function
|
|
30758
|
+
async function run247(context) {
|
|
30550
30759
|
if (!context.host) {
|
|
30551
30760
|
return {
|
|
30552
30761
|
success: false,
|
|
@@ -30746,7 +30955,7 @@ async function run246(context) {
|
|
|
30746
30955
|
steps
|
|
30747
30956
|
};
|
|
30748
30957
|
}
|
|
30749
|
-
var cleanup_config_drive_default = task(
|
|
30958
|
+
var cleanup_config_drive_default = task(run247, {
|
|
30750
30959
|
inputSchema: XcpngCleanupConfigDriveParamsSchema,
|
|
30751
30960
|
outputSchema: XcpngCleanupConfigDriveResultSchema,
|
|
30752
30961
|
description: "Detaches an attached config-drive ISO from a VM and removes the associated VDI once the guest is halted."
|
|
@@ -30885,7 +31094,7 @@ var YumAddRepositoryResultSchema = z.object({
|
|
|
30885
31094
|
error: z.string().optional()
|
|
30886
31095
|
})
|
|
30887
31096
|
);
|
|
30888
|
-
async function
|
|
31097
|
+
async function run248(context) {
|
|
30889
31098
|
const { params, exec, info, error } = context;
|
|
30890
31099
|
const { content, name, sudo = true } = params;
|
|
30891
31100
|
if (!content) {
|
|
@@ -30917,7 +31126,7 @@ EOF`;
|
|
|
30917
31126
|
return { success: false, error: errorMsg };
|
|
30918
31127
|
}
|
|
30919
31128
|
}
|
|
30920
|
-
var add_repository_default2 = task(
|
|
31129
|
+
var add_repository_default2 = task(run248, {
|
|
30921
31130
|
description: "Adds a YUM repository.",
|
|
30922
31131
|
inputSchema: YumAddRepositoryParamsSchema,
|
|
30923
31132
|
outputSchema: YumAddRepositoryResultSchema
|
|
@@ -30943,7 +31152,7 @@ var DownloadOutputSchema = z.object({
|
|
|
30943
31152
|
path: z.string().optional(),
|
|
30944
31153
|
error: z.string().optional()
|
|
30945
31154
|
});
|
|
30946
|
-
async function
|
|
31155
|
+
async function run249(context) {
|
|
30947
31156
|
const { params, info, error, exec } = context;
|
|
30948
31157
|
const { url, dest, mode, sudo = false } = params;
|
|
30949
31158
|
if (!url || !dest) {
|
|
@@ -30988,7 +31197,7 @@ async function run248(context) {
|
|
|
30988
31197
|
return { success: false, error: errorMsg };
|
|
30989
31198
|
}
|
|
30990
31199
|
}
|
|
30991
|
-
var download_default = task(
|
|
31200
|
+
var download_default = task(run249, {
|
|
30992
31201
|
description: "Downloads a file from a URL using curl or wget.",
|
|
30993
31202
|
inputSchema: DownloadInputSchema,
|
|
30994
31203
|
outputSchema: DownloadOutputSchema
|
|
@@ -31019,7 +31228,7 @@ var InterfacesOutputSchema = z.object({
|
|
|
31019
31228
|
error: z.string()
|
|
31020
31229
|
})
|
|
31021
31230
|
);
|
|
31022
|
-
async function
|
|
31231
|
+
async function run250(context) {
|
|
31023
31232
|
const { params, info, error, exec } = context;
|
|
31024
31233
|
const { sudo = false } = params;
|
|
31025
31234
|
try {
|
|
@@ -31111,7 +31320,7 @@ async function run249(context) {
|
|
|
31111
31320
|
return { success: false, error: errorMsg };
|
|
31112
31321
|
}
|
|
31113
31322
|
}
|
|
31114
|
-
var interfaces_default = task(
|
|
31323
|
+
var interfaces_default = task(run250, {
|
|
31115
31324
|
name: "interfaces",
|
|
31116
31325
|
description: "Lists network interfaces with their properties.",
|
|
31117
31326
|
inputSchema: InterfacesInputSchema,
|
|
@@ -31137,7 +31346,7 @@ var NftablesApplyOutputSchema = z.object({
|
|
|
31137
31346
|
error: z.string().optional()
|
|
31138
31347
|
})
|
|
31139
31348
|
);
|
|
31140
|
-
async function
|
|
31349
|
+
async function run251(context) {
|
|
31141
31350
|
const { params, exec, info } = context;
|
|
31142
31351
|
const { config } = params;
|
|
31143
31352
|
if (!config) {
|
|
@@ -31161,7 +31370,7 @@ async function run250(context) {
|
|
|
31161
31370
|
return { success: false, error };
|
|
31162
31371
|
}
|
|
31163
31372
|
}
|
|
31164
|
-
var apply_default = task(
|
|
31373
|
+
var apply_default = task(run251, {
|
|
31165
31374
|
description: "Applies an nftables configuration.",
|
|
31166
31375
|
inputSchema: NftablesApplyInputSchema,
|
|
31167
31376
|
outputSchema: NftablesApplyOutputSchema
|
|
@@ -31184,7 +31393,7 @@ var FirewalldDisableResultSchema = z.object({
|
|
|
31184
31393
|
success: z.boolean(),
|
|
31185
31394
|
error: z.string().optional()
|
|
31186
31395
|
});
|
|
31187
|
-
async function
|
|
31396
|
+
async function run252(context) {
|
|
31188
31397
|
const { run: runTask, debug, error, info } = context;
|
|
31189
31398
|
const statusResult = await runTask(status_default({ service: "firewalld", sudo: true }));
|
|
31190
31399
|
if (!statusResult.success && (statusResult.error?.includes("Could not find") || statusResult.error?.includes("not-found"))) {
|
|
@@ -31208,7 +31417,7 @@ async function run251(context) {
|
|
|
31208
31417
|
info("firewalld service disabled successfully.");
|
|
31209
31418
|
return { success: true };
|
|
31210
31419
|
}
|
|
31211
|
-
var disable_default3 = task(
|
|
31420
|
+
var disable_default3 = task(run252, {
|
|
31212
31421
|
description: "Disables and stops the firewalld service.",
|
|
31213
31422
|
inputSchema: FirewalldDisableInputSchema,
|
|
31214
31423
|
outputSchema: FirewalldDisableResultSchema
|
|
@@ -33632,6 +33841,23 @@ var Cli = class {
|
|
|
33632
33841
|
taskFilter = spec;
|
|
33633
33842
|
spec = ".";
|
|
33634
33843
|
}
|
|
33844
|
+
if (spec === "core") {
|
|
33845
|
+
const coreRoot2 = path13.resolve(path13.dirname(fileURLToPath2(import.meta.url)), "core");
|
|
33846
|
+
const rows2 = registry.tasks().map(([name, taskFn]) => {
|
|
33847
|
+
const task6 = taskFn.task;
|
|
33848
|
+
const moduleRel = task6.taskModuleAbsolutePath ? path13.relative(coreRoot2, task6.taskModuleAbsolutePath) || path13.basename(task6.taskModuleAbsolutePath) : void 0;
|
|
33849
|
+
return {
|
|
33850
|
+
name,
|
|
33851
|
+
description: task6.description ?? "",
|
|
33852
|
+
module: moduleRel,
|
|
33853
|
+
inputSchema: task6.inputSchema,
|
|
33854
|
+
outputSchema: task6.outputSchema,
|
|
33855
|
+
schemaSource: task6.inputSchema || task6.outputSchema ? "present" : "absent"
|
|
33856
|
+
};
|
|
33857
|
+
}).filter((row) => taskFilter ? row.name === taskFilter : true);
|
|
33858
|
+
renderTaskRows(rows2, { target: "core registry", taskFilter, json: opts.json });
|
|
33859
|
+
return;
|
|
33860
|
+
}
|
|
33635
33861
|
const specPath = Path.new(spec);
|
|
33636
33862
|
let packagePath = null;
|
|
33637
33863
|
if (specPath.exists()) {
|
|
@@ -33667,44 +33893,51 @@ var Cli = class {
|
|
|
33667
33893
|
schemaSource: m.schemaSource
|
|
33668
33894
|
};
|
|
33669
33895
|
});
|
|
33670
|
-
|
|
33671
|
-
const sanitized = rows.map((r) => ({
|
|
33672
|
-
name: r.name,
|
|
33673
|
-
description: r.description,
|
|
33674
|
-
module: r.module,
|
|
33675
|
-
inputSchema: Boolean(r.inputSchema),
|
|
33676
|
-
outputSchema: Boolean(r.outputSchema),
|
|
33677
|
-
schemaSource: r.schemaSource
|
|
33678
|
-
}));
|
|
33679
|
-
console.log(JSON.stringify(sanitized, null, 2));
|
|
33680
|
-
return;
|
|
33681
|
-
}
|
|
33682
|
-
if (rows.length === 0) {
|
|
33683
|
-
const target = taskFilter ? `${taskFilter} in ${packagePath}` : packagePath;
|
|
33684
|
-
console.log(`No tasks found in ${target}`);
|
|
33685
|
-
return;
|
|
33686
|
-
}
|
|
33687
|
-
console.log(`Tasks in ${packagePath}${taskFilter ? ` (filtered to ${taskFilter})` : ""}:`);
|
|
33688
|
-
rows.forEach((row) => {
|
|
33689
|
-
console.log(`- ${row.name}${row.module ? ` (${row.module})` : ""}`);
|
|
33690
|
-
console.log(` description: ${row.description || "no description"}`);
|
|
33691
|
-
if (row.inputSchema) {
|
|
33692
|
-
const lines = formatSchemaLines(row.inputSchema);
|
|
33693
|
-
if (lines.length) {
|
|
33694
|
-
console.log(" input:");
|
|
33695
|
-
lines.forEach((line) => console.log(` ${line}`));
|
|
33696
|
-
}
|
|
33697
|
-
}
|
|
33698
|
-
if (row.outputSchema) {
|
|
33699
|
-
const lines = formatSchemaLines(row.outputSchema);
|
|
33700
|
-
if (lines.length) {
|
|
33701
|
-
console.log(" output:");
|
|
33702
|
-
lines.forEach((line) => console.log(` ${line}`));
|
|
33703
|
-
}
|
|
33704
|
-
}
|
|
33705
|
-
});
|
|
33896
|
+
renderTaskRows(rows, { target: packagePath, taskFilter, json: opts.json });
|
|
33706
33897
|
}
|
|
33707
33898
|
};
|
|
33899
|
+
function renderTaskRows(rows, {
|
|
33900
|
+
target,
|
|
33901
|
+
taskFilter,
|
|
33902
|
+
json
|
|
33903
|
+
}) {
|
|
33904
|
+
if (json) {
|
|
33905
|
+
const sanitized = rows.map((r) => ({
|
|
33906
|
+
name: r.name,
|
|
33907
|
+
description: r.description,
|
|
33908
|
+
module: r.module,
|
|
33909
|
+
inputSchema: Boolean(r.inputSchema),
|
|
33910
|
+
outputSchema: Boolean(r.outputSchema),
|
|
33911
|
+
schemaSource: r.schemaSource
|
|
33912
|
+
}));
|
|
33913
|
+
console.log(JSON.stringify(sanitized, null, 2));
|
|
33914
|
+
return;
|
|
33915
|
+
}
|
|
33916
|
+
if (rows.length === 0) {
|
|
33917
|
+
const targetLabel = taskFilter ? `${taskFilter} in ${target}` : target;
|
|
33918
|
+
console.log(`No tasks found in ${targetLabel}`);
|
|
33919
|
+
return;
|
|
33920
|
+
}
|
|
33921
|
+
console.log(`Tasks in ${target}${taskFilter ? ` (filtered to ${taskFilter})` : ""}:`);
|
|
33922
|
+
rows.forEach((row) => {
|
|
33923
|
+
console.log(`- ${row.name}${row.module ? ` (${row.module})` : ""}`);
|
|
33924
|
+
console.log(` description: ${row.description || "no description"}`);
|
|
33925
|
+
if (row.inputSchema) {
|
|
33926
|
+
const lines = formatSchemaLines(row.inputSchema);
|
|
33927
|
+
if (lines.length) {
|
|
33928
|
+
console.log(" input:");
|
|
33929
|
+
lines.forEach((line) => console.log(` ${line}`));
|
|
33930
|
+
}
|
|
33931
|
+
}
|
|
33932
|
+
if (row.outputSchema) {
|
|
33933
|
+
const lines = formatSchemaLines(row.outputSchema);
|
|
33934
|
+
if (lines.length) {
|
|
33935
|
+
console.log(" output:");
|
|
33936
|
+
lines.forEach((line) => console.log(` ${line}`));
|
|
33937
|
+
}
|
|
33938
|
+
}
|
|
33939
|
+
});
|
|
33940
|
+
}
|
|
33708
33941
|
function summarizeType(val) {
|
|
33709
33942
|
const def = val?._def ?? val?.def;
|
|
33710
33943
|
const tn = def?.typeName || def?.type;
|