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/index.js
CHANGED
|
@@ -2705,6 +2705,7 @@ import { Listr } from "listr2";
|
|
|
2705
2705
|
// src/cli.ts
|
|
2706
2706
|
import process3 from "process";
|
|
2707
2707
|
import path12 from "path";
|
|
2708
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2708
2709
|
import * as cmdr from "commander";
|
|
2709
2710
|
import "zod";
|
|
2710
2711
|
|
|
@@ -2718,7 +2719,7 @@ var Verbosity = {
|
|
|
2718
2719
|
};
|
|
2719
2720
|
|
|
2720
2721
|
// src/version.ts
|
|
2721
|
-
var version = "0.1.
|
|
2722
|
+
var version = "0.1.55";
|
|
2722
2723
|
|
|
2723
2724
|
// src/commands/pkg/create.ts
|
|
2724
2725
|
import { promises as fs5 } from "fs";
|
|
@@ -4807,7 +4808,7 @@ var DirCreateOutputSchema = z.object({
|
|
|
4807
4808
|
})
|
|
4808
4809
|
);
|
|
4809
4810
|
async function runFn(context) {
|
|
4810
|
-
const { params, exec, run:
|
|
4811
|
+
const { params, exec, run: run253 } = context;
|
|
4811
4812
|
const sudoDefault = context.host ? !context.host.isLocal() : false;
|
|
4812
4813
|
const { path: path14, mode, owner, sudo = sudoDefault } = params;
|
|
4813
4814
|
if (!path14) {
|
|
@@ -4831,7 +4832,7 @@ async function runFn(context) {
|
|
|
4831
4832
|
}
|
|
4832
4833
|
}
|
|
4833
4834
|
if (mode) {
|
|
4834
|
-
const chmodResult = await
|
|
4835
|
+
const chmodResult = await run253(chmod_default({ path: path14, mode, sudo: true }));
|
|
4835
4836
|
if (!chmodResult?.success) {
|
|
4836
4837
|
return { success: false, error: chmodResult?.error ?? "Failed to set directory mode" };
|
|
4837
4838
|
}
|
|
@@ -5424,7 +5425,7 @@ async function ensureFile(context, file, sudo) {
|
|
|
5424
5425
|
await exec(["touch", file], { sudo });
|
|
5425
5426
|
}
|
|
5426
5427
|
async function runFn2(context) {
|
|
5427
|
-
const { params, exec, info, run:
|
|
5428
|
+
const { params, exec, info, run: run253, error } = context;
|
|
5428
5429
|
const {
|
|
5429
5430
|
file,
|
|
5430
5431
|
state = "present",
|
|
@@ -8152,6 +8153,7 @@ __export(pacman_exports, {
|
|
|
8152
8153
|
install: () => install_default3,
|
|
8153
8154
|
isInstalled: () => is_installed_default3,
|
|
8154
8155
|
list: () => list_default5,
|
|
8156
|
+
repair_keyring: () => repair_keyring_default,
|
|
8155
8157
|
search: () => search_default3,
|
|
8156
8158
|
uninstall: () => uninstall_default3,
|
|
8157
8159
|
update: () => update_default3,
|
|
@@ -8204,13 +8206,23 @@ var PacmanUpdateResultSchema = PacmanBaseResultSchema.extend({
|
|
|
8204
8206
|
});
|
|
8205
8207
|
var PacmanUpgradeParamsSchema = PacmanBaseParamsSchema.extend({
|
|
8206
8208
|
fullUpgrade: z.boolean().optional(),
|
|
8207
|
-
securityOnly: z.boolean().optional()
|
|
8209
|
+
securityOnly: z.boolean().optional(),
|
|
8210
|
+
keyringRepair: z.enum(["basic", "full"]).optional()
|
|
8208
8211
|
});
|
|
8209
8212
|
var PacmanUpgradeResultSchema = PacmanBaseResultSchema.extend({
|
|
8210
8213
|
packagesUpgraded: z.number().optional(),
|
|
8211
8214
|
upgradedPackages: z.array(z.string()).optional(),
|
|
8212
8215
|
rebootRecommended: z.boolean().optional()
|
|
8213
8216
|
});
|
|
8217
|
+
var PacmanKeyringRepairParamsSchema = PacmanBaseParamsSchema.omit({ package: true }).extend({
|
|
8218
|
+
mode: z.enum(["basic", "full"]).optional(),
|
|
8219
|
+
corruptedPackages: z.array(z.string()).optional()
|
|
8220
|
+
});
|
|
8221
|
+
var PacmanKeyringRepairResultSchema = PacmanBaseResultSchema.extend({
|
|
8222
|
+
mode: z.enum(["basic", "full"]).optional(),
|
|
8223
|
+
removedPackages: z.array(z.string()).optional(),
|
|
8224
|
+
skippedPackages: z.array(z.string()).optional()
|
|
8225
|
+
});
|
|
8214
8226
|
var PacmanSearchParamsSchema = PacmanBaseParamsSchema.extend({
|
|
8215
8227
|
query: z.string().min(1),
|
|
8216
8228
|
namesOnly: z.boolean().optional(),
|
|
@@ -8791,9 +8803,140 @@ var update_default3 = task(run51, {
|
|
|
8791
8803
|
outputSchema: PacmanUpdateResultSchema
|
|
8792
8804
|
});
|
|
8793
8805
|
|
|
8794
|
-
// src/core/pkg/pacman/
|
|
8806
|
+
// src/core/pkg/pacman/repair-keyring.ts
|
|
8807
|
+
var KEYRING_PUBRING = "/etc/pacman.d/gnupg/pubring.gpg";
|
|
8808
|
+
var PACMAN_CACHE_PREFIX = "/var/cache/pacman/pkg/";
|
|
8809
|
+
function normalizeOutput(outputs) {
|
|
8810
|
+
const merged = outputs.filter(Boolean).join("\n").trim();
|
|
8811
|
+
return merged.length ? merged : void 0;
|
|
8812
|
+
}
|
|
8795
8813
|
async function run52(context) {
|
|
8796
|
-
const { sudo = true } = context.params;
|
|
8814
|
+
const { sudo = true, mode = "basic", corruptedPackages = [] } = context.params;
|
|
8815
|
+
const backend = await detectPacmanBackend(context, sudo);
|
|
8816
|
+
if (backend !== "pacman") {
|
|
8817
|
+
return {
|
|
8818
|
+
success: false,
|
|
8819
|
+
error: "pacman is not available on this host",
|
|
8820
|
+
packageManager: "pacman",
|
|
8821
|
+
mode
|
|
8822
|
+
};
|
|
8823
|
+
}
|
|
8824
|
+
const lock = await ensurePacmanLockAvailable(context, sudo);
|
|
8825
|
+
if (!lock.ok) {
|
|
8826
|
+
return {
|
|
8827
|
+
success: false,
|
|
8828
|
+
error: lock.error,
|
|
8829
|
+
packageManager: "pacman",
|
|
8830
|
+
mode
|
|
8831
|
+
};
|
|
8832
|
+
}
|
|
8833
|
+
const outputs = [];
|
|
8834
|
+
const warnings = [];
|
|
8835
|
+
const removedPackages = [];
|
|
8836
|
+
const skippedPackages = [];
|
|
8837
|
+
const appendOutput = (result) => {
|
|
8838
|
+
if (result.stdout) outputs.push(result.stdout);
|
|
8839
|
+
if (result.stderr) outputs.push(result.stderr);
|
|
8840
|
+
};
|
|
8841
|
+
const runStep = async (label, command, allowFailure = false) => {
|
|
8842
|
+
const result = await context.exec(command, { sudo });
|
|
8843
|
+
appendOutput(result);
|
|
8844
|
+
if (result.exitCode !== 0 && !allowFailure) {
|
|
8845
|
+
return { ok: false, error: result.stderr || `${label} failed` };
|
|
8846
|
+
}
|
|
8847
|
+
return { ok: true };
|
|
8848
|
+
};
|
|
8849
|
+
const pubringCheck = await context.exec(["test", "-f", KEYRING_PUBRING], { sudo });
|
|
8850
|
+
if (pubringCheck.exitCode !== 0) {
|
|
8851
|
+
const initResult = await runStep("Initialize pacman keyring", ["pacman-key", "--init"]);
|
|
8852
|
+
if (!initResult.ok) {
|
|
8853
|
+
return {
|
|
8854
|
+
success: false,
|
|
8855
|
+
error: initResult.error,
|
|
8856
|
+
packageManager: "pacman",
|
|
8857
|
+
output: normalizeOutput(outputs),
|
|
8858
|
+
mode
|
|
8859
|
+
};
|
|
8860
|
+
}
|
|
8861
|
+
}
|
|
8862
|
+
const populateResult = await runStep("Populate pacman keyring", ["pacman-key", "--populate", "archlinux"]);
|
|
8863
|
+
if (!populateResult.ok) {
|
|
8864
|
+
return {
|
|
8865
|
+
success: false,
|
|
8866
|
+
error: populateResult.error,
|
|
8867
|
+
packageManager: "pacman",
|
|
8868
|
+
output: normalizeOutput(outputs),
|
|
8869
|
+
mode
|
|
8870
|
+
};
|
|
8871
|
+
}
|
|
8872
|
+
if (mode === "full") {
|
|
8873
|
+
const refreshResult = await runStep("Refresh pacman keyring", ["pacman-key", "--refresh-keys"]);
|
|
8874
|
+
if (!refreshResult.ok) {
|
|
8875
|
+
return {
|
|
8876
|
+
success: false,
|
|
8877
|
+
error: refreshResult.error,
|
|
8878
|
+
packageManager: "pacman",
|
|
8879
|
+
output: normalizeOutput(outputs),
|
|
8880
|
+
mode
|
|
8881
|
+
};
|
|
8882
|
+
}
|
|
8883
|
+
}
|
|
8884
|
+
const updateKeyring = async () => context.exec(["pacman", "-Sy", "--noconfirm", "archlinux-keyring"], { sudo });
|
|
8885
|
+
const { result: updateResult, lockFailed } = await retryPacmanWithLock(context, sudo, updateKeyring);
|
|
8886
|
+
appendOutput(updateResult);
|
|
8887
|
+
if (lockFailed) {
|
|
8888
|
+
return {
|
|
8889
|
+
success: false,
|
|
8890
|
+
error: "pacman database lock is in use (another package operation is running). Retry after it finishes.",
|
|
8891
|
+
packageManager: "pacman",
|
|
8892
|
+
output: normalizeOutput(outputs),
|
|
8893
|
+
mode
|
|
8894
|
+
};
|
|
8895
|
+
}
|
|
8896
|
+
if (updateResult.exitCode !== 0) {
|
|
8897
|
+
return {
|
|
8898
|
+
success: false,
|
|
8899
|
+
error: updateResult.stderr || "Failed to update archlinux-keyring",
|
|
8900
|
+
packageManager: "pacman",
|
|
8901
|
+
output: normalizeOutput(outputs),
|
|
8902
|
+
mode
|
|
8903
|
+
};
|
|
8904
|
+
}
|
|
8905
|
+
for (const pkgPath of corruptedPackages) {
|
|
8906
|
+
if (!pkgPath.startsWith(PACMAN_CACHE_PREFIX)) {
|
|
8907
|
+
skippedPackages.push(pkgPath);
|
|
8908
|
+
warnings.push(`Skipped corrupted package path outside ${PACMAN_CACHE_PREFIX}: ${pkgPath}`);
|
|
8909
|
+
continue;
|
|
8910
|
+
}
|
|
8911
|
+
const rmResult = await context.exec(["rm", "-f", pkgPath], { sudo });
|
|
8912
|
+
appendOutput(rmResult);
|
|
8913
|
+
if (rmResult.exitCode === 0) {
|
|
8914
|
+
removedPackages.push(pkgPath);
|
|
8915
|
+
} else {
|
|
8916
|
+
skippedPackages.push(pkgPath);
|
|
8917
|
+
warnings.push(`Failed to remove corrupted package: ${pkgPath}`);
|
|
8918
|
+
}
|
|
8919
|
+
}
|
|
8920
|
+
return {
|
|
8921
|
+
success: true,
|
|
8922
|
+
packageManager: "pacman",
|
|
8923
|
+
output: normalizeOutput(outputs),
|
|
8924
|
+
warning: warnings.length ? warnings.join(" ") : void 0,
|
|
8925
|
+
mode,
|
|
8926
|
+
removedPackages: removedPackages.length ? removedPackages : void 0,
|
|
8927
|
+
skippedPackages: skippedPackages.length ? skippedPackages : void 0
|
|
8928
|
+
};
|
|
8929
|
+
}
|
|
8930
|
+
var repair_keyring_default = task(run52, {
|
|
8931
|
+
name: "repair_keyring",
|
|
8932
|
+
description: "Repairs the pacman keyring and refreshes archlinux-keyring.",
|
|
8933
|
+
inputSchema: PacmanKeyringRepairParamsSchema,
|
|
8934
|
+
outputSchema: PacmanKeyringRepairResultSchema
|
|
8935
|
+
});
|
|
8936
|
+
|
|
8937
|
+
// src/core/pkg/pacman/upgrade.ts
|
|
8938
|
+
async function run53(context) {
|
|
8939
|
+
const { sudo = true, keyringRepair } = context.params;
|
|
8797
8940
|
const backend = await detectPacmanBackend(context, sudo);
|
|
8798
8941
|
if (backend !== "pacman") {
|
|
8799
8942
|
if (backend === "unknown") {
|
|
@@ -8822,9 +8965,30 @@ async function run52(context) {
|
|
|
8822
8965
|
${result.stderr}`.toLowerCase();
|
|
8823
8966
|
return output.includes("too full") || output.includes("not enough free disk space");
|
|
8824
8967
|
};
|
|
8968
|
+
const shouldRepairKeyring = (result) => {
|
|
8969
|
+
if (keyringRepair !== "basic" && keyringRepair !== "full") return false;
|
|
8970
|
+
const output = `${result.stdout}
|
|
8971
|
+
${result.stderr}`.toLowerCase();
|
|
8972
|
+
const indicators = [
|
|
8973
|
+
"unknown trust",
|
|
8974
|
+
"invalid or corrupted package (pgp signature)",
|
|
8975
|
+
"failed to verify signature",
|
|
8976
|
+
"signature from",
|
|
8977
|
+
"keyring is not writable",
|
|
8978
|
+
"public key not found"
|
|
8979
|
+
];
|
|
8980
|
+
return indicators.some((indicator) => output.includes(indicator));
|
|
8981
|
+
};
|
|
8982
|
+
const extractCorruptedPackages = (result) => {
|
|
8983
|
+
const output = `${result.stdout}
|
|
8984
|
+
${result.stderr}`;
|
|
8985
|
+
const matches2 = Array.from(output.matchAll(/(?:^|\n)::? File (\S+) is corrupted/gi)).map((match7) => match7[1]);
|
|
8986
|
+
return Array.from(new Set(matches2));
|
|
8987
|
+
};
|
|
8825
8988
|
try {
|
|
8826
8989
|
const attemptUpgrade = () => retryPacmanWithLock(context, sudo, upgradeOnce);
|
|
8827
8990
|
let { result, lockFailed } = await attemptUpgrade();
|
|
8991
|
+
let keyringRepairApplied = false;
|
|
8828
8992
|
if (lockFailed) {
|
|
8829
8993
|
return {
|
|
8830
8994
|
success: false,
|
|
@@ -8854,11 +9018,42 @@ ${result.stderr}`.toLowerCase();
|
|
|
8854
9018
|
};
|
|
8855
9019
|
}
|
|
8856
9020
|
}
|
|
9021
|
+
if (result.exitCode !== 0 && shouldRepairKeyring(result)) {
|
|
9022
|
+
const repairResult = await context.run(
|
|
9023
|
+
repair_keyring_default({
|
|
9024
|
+
mode: keyringRepair,
|
|
9025
|
+
sudo,
|
|
9026
|
+
corruptedPackages: extractCorruptedPackages(result)
|
|
9027
|
+
})
|
|
9028
|
+
);
|
|
9029
|
+
if (!repairResult?.success) {
|
|
9030
|
+
return {
|
|
9031
|
+
success: false,
|
|
9032
|
+
error: repairResult?.error || "Pacman keyring repair failed",
|
|
9033
|
+
packageManager: "pacman",
|
|
9034
|
+
output: result.stdout,
|
|
9035
|
+
warning: repairResult?.warning
|
|
9036
|
+
};
|
|
9037
|
+
}
|
|
9038
|
+
keyringRepairApplied = true;
|
|
9039
|
+
const retry = await attemptUpgrade();
|
|
9040
|
+
result = retry.result;
|
|
9041
|
+
lockFailed = retry.lockFailed;
|
|
9042
|
+
if (lockFailed) {
|
|
9043
|
+
return {
|
|
9044
|
+
success: false,
|
|
9045
|
+
error: "pacman database lock is in use (another package operation is running). Retry after it finishes.",
|
|
9046
|
+
packageManager: "pacman",
|
|
9047
|
+
output: result.stdout
|
|
9048
|
+
};
|
|
9049
|
+
}
|
|
9050
|
+
}
|
|
8857
9051
|
if (result.exitCode === 0) {
|
|
8858
9052
|
return {
|
|
8859
9053
|
success: true,
|
|
8860
9054
|
packageManager: "pacman",
|
|
8861
|
-
output: result.stdout
|
|
9055
|
+
output: result.stdout,
|
|
9056
|
+
warning: keyringRepairApplied ? "Pacman keyring repair was applied before retrying the upgrade." : void 0
|
|
8862
9057
|
};
|
|
8863
9058
|
} else if (handleDiskFull(result)) {
|
|
8864
9059
|
return {
|
|
@@ -8884,7 +9079,7 @@ ${result.stderr}`.toLowerCase();
|
|
|
8884
9079
|
};
|
|
8885
9080
|
}
|
|
8886
9081
|
}
|
|
8887
|
-
var upgrade_default3 = task(
|
|
9082
|
+
var upgrade_default3 = task(run53, {
|
|
8888
9083
|
name: "upgrade",
|
|
8889
9084
|
description: "Upgrade packages using pacman package manager",
|
|
8890
9085
|
inputSchema: PacmanUpgradeParamsSchema,
|
|
@@ -8895,7 +9090,7 @@ var upgrade_default3 = task(run52, {
|
|
|
8895
9090
|
function stripAnsiCodes3(text) {
|
|
8896
9091
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
8897
9092
|
}
|
|
8898
|
-
async function
|
|
9093
|
+
async function run54(context) {
|
|
8899
9094
|
const { query, sudo = false } = context.params;
|
|
8900
9095
|
if (!query) {
|
|
8901
9096
|
context.error("Query parameter is required");
|
|
@@ -8949,7 +9144,7 @@ async function run53(context) {
|
|
|
8949
9144
|
};
|
|
8950
9145
|
}
|
|
8951
9146
|
}
|
|
8952
|
-
var search_default3 = task(
|
|
9147
|
+
var search_default3 = task(run54, {
|
|
8953
9148
|
name: "search",
|
|
8954
9149
|
description: "Search packages using pacman package manager",
|
|
8955
9150
|
inputSchema: PacmanSearchParamsSchema,
|
|
@@ -8957,7 +9152,7 @@ var search_default3 = task(run53, {
|
|
|
8957
9152
|
});
|
|
8958
9153
|
|
|
8959
9154
|
// src/core/pkg/pacman/list.ts
|
|
8960
|
-
async function
|
|
9155
|
+
async function run55(context) {
|
|
8961
9156
|
const { sudo = false } = context.params;
|
|
8962
9157
|
try {
|
|
8963
9158
|
const backend = await detectPacmanBackend(context, sudo);
|
|
@@ -9002,7 +9197,7 @@ async function run54(context) {
|
|
|
9002
9197
|
};
|
|
9003
9198
|
}
|
|
9004
9199
|
}
|
|
9005
|
-
var list_default5 = task(
|
|
9200
|
+
var list_default5 = task(run55, {
|
|
9006
9201
|
name: "list",
|
|
9007
9202
|
description: "List packages using pacman package manager",
|
|
9008
9203
|
inputSchema: PacmanListParamsSchema,
|
|
@@ -9010,7 +9205,7 @@ var list_default5 = task(run54, {
|
|
|
9010
9205
|
});
|
|
9011
9206
|
|
|
9012
9207
|
// src/core/pkg/pacman/clean.ts
|
|
9013
|
-
async function
|
|
9208
|
+
async function run56(context) {
|
|
9014
9209
|
const { sudo = true } = context.params;
|
|
9015
9210
|
try {
|
|
9016
9211
|
const backend = await detectPacmanBackend(context, sudo);
|
|
@@ -9057,7 +9252,7 @@ async function run55(context) {
|
|
|
9057
9252
|
};
|
|
9058
9253
|
}
|
|
9059
9254
|
}
|
|
9060
|
-
var clean_default3 = task(
|
|
9255
|
+
var clean_default3 = task(run56, {
|
|
9061
9256
|
name: "clean",
|
|
9062
9257
|
description: "Clean packages using pacman package manager",
|
|
9063
9258
|
inputSchema: PacmanCleanParamsSchema,
|
|
@@ -9065,7 +9260,7 @@ var clean_default3 = task(run55, {
|
|
|
9065
9260
|
});
|
|
9066
9261
|
|
|
9067
9262
|
// src/core/pkg/pacman/is_installed.ts
|
|
9068
|
-
async function
|
|
9263
|
+
async function run57(context) {
|
|
9069
9264
|
const { package: packageName, sudo = false } = context.params;
|
|
9070
9265
|
if (!packageName) {
|
|
9071
9266
|
context.error("Package parameter is required");
|
|
@@ -9101,7 +9296,7 @@ async function run56(context) {
|
|
|
9101
9296
|
};
|
|
9102
9297
|
}
|
|
9103
9298
|
}
|
|
9104
|
-
var is_installed_default3 = task(
|
|
9299
|
+
var is_installed_default3 = task(run57, {
|
|
9105
9300
|
name: "is_installed",
|
|
9106
9301
|
description: "Check if package is installed using pacman package manager",
|
|
9107
9302
|
inputSchema: PacmanIsInstalledParamsSchema,
|
|
@@ -9109,7 +9304,7 @@ var is_installed_default3 = task(run56, {
|
|
|
9109
9304
|
});
|
|
9110
9305
|
|
|
9111
9306
|
// src/core/pkg/pacman/info.ts
|
|
9112
|
-
async function
|
|
9307
|
+
async function run58(context) {
|
|
9113
9308
|
const { package: packageName, sudo = false } = context.params;
|
|
9114
9309
|
if (!packageName) {
|
|
9115
9310
|
context.error("Package parameter is required");
|
|
@@ -9171,7 +9366,7 @@ async function run57(context) {
|
|
|
9171
9366
|
};
|
|
9172
9367
|
}
|
|
9173
9368
|
}
|
|
9174
|
-
var info_default4 = task(
|
|
9369
|
+
var info_default4 = task(run58, {
|
|
9175
9370
|
name: "info",
|
|
9176
9371
|
description: "Get package information using pacman package manager",
|
|
9177
9372
|
inputSchema: PacmanInfoParamsSchema,
|
|
@@ -9318,7 +9513,7 @@ var YumListResultSchema = YumBaseResultSchema.extend({
|
|
|
9318
9513
|
});
|
|
9319
9514
|
|
|
9320
9515
|
// src/core/pkg/yum/install.ts
|
|
9321
|
-
async function
|
|
9516
|
+
async function run59(context) {
|
|
9322
9517
|
const { package: packageName, sudo = true, installWeakDeps = false, repo } = context.params;
|
|
9323
9518
|
if (!packageName) {
|
|
9324
9519
|
context.error("Package parameter is required");
|
|
@@ -9381,7 +9576,7 @@ async function run58(context) {
|
|
|
9381
9576
|
};
|
|
9382
9577
|
}
|
|
9383
9578
|
}
|
|
9384
|
-
var install_default4 = task(
|
|
9579
|
+
var install_default4 = task(run59, {
|
|
9385
9580
|
name: "install",
|
|
9386
9581
|
description: "Install packages using yum package manager",
|
|
9387
9582
|
inputSchema: YumInstallParamsSchema,
|
|
@@ -9389,7 +9584,7 @@ var install_default4 = task(run58, {
|
|
|
9389
9584
|
});
|
|
9390
9585
|
|
|
9391
9586
|
// src/core/pkg/yum/uninstall.ts
|
|
9392
|
-
async function
|
|
9587
|
+
async function run60(context) {
|
|
9393
9588
|
const { package: packages, sudo = true, autoremove = true } = context.params;
|
|
9394
9589
|
if (!packages) {
|
|
9395
9590
|
context.error("Package parameter is required");
|
|
@@ -9451,7 +9646,7 @@ async function run59(context) {
|
|
|
9451
9646
|
};
|
|
9452
9647
|
}
|
|
9453
9648
|
}
|
|
9454
|
-
var uninstall_default4 = task(
|
|
9649
|
+
var uninstall_default4 = task(run60, {
|
|
9455
9650
|
name: "uninstall",
|
|
9456
9651
|
description: "Uninstall packages using yum package manager",
|
|
9457
9652
|
inputSchema: YumUninstallParamsSchema,
|
|
@@ -9459,7 +9654,7 @@ var uninstall_default4 = task(run59, {
|
|
|
9459
9654
|
});
|
|
9460
9655
|
|
|
9461
9656
|
// src/core/pkg/yum/update.ts
|
|
9462
|
-
async function
|
|
9657
|
+
async function run61(context) {
|
|
9463
9658
|
const { sudo = true, updateMetadata = true, upgrade = false } = context.params;
|
|
9464
9659
|
try {
|
|
9465
9660
|
if (!updateMetadata && !upgrade) {
|
|
@@ -9523,7 +9718,7 @@ async function run60(context) {
|
|
|
9523
9718
|
};
|
|
9524
9719
|
}
|
|
9525
9720
|
}
|
|
9526
|
-
var update_default4 = task(
|
|
9721
|
+
var update_default4 = task(run61, {
|
|
9527
9722
|
name: "update",
|
|
9528
9723
|
description: "Update packages using yum package manager",
|
|
9529
9724
|
inputSchema: YumUpdateParamsSchema,
|
|
@@ -9531,7 +9726,7 @@ var update_default4 = task(run60, {
|
|
|
9531
9726
|
});
|
|
9532
9727
|
|
|
9533
9728
|
// src/core/pkg/yum/upgrade.ts
|
|
9534
|
-
async function
|
|
9729
|
+
async function run62(context) {
|
|
9535
9730
|
const { sudo = true, fullUpgrade = false, securityOnly = false } = context.params;
|
|
9536
9731
|
try {
|
|
9537
9732
|
let command;
|
|
@@ -9594,7 +9789,7 @@ async function run61(context) {
|
|
|
9594
9789
|
};
|
|
9595
9790
|
}
|
|
9596
9791
|
}
|
|
9597
|
-
var upgrade_default4 = task(
|
|
9792
|
+
var upgrade_default4 = task(run62, {
|
|
9598
9793
|
name: "upgrade",
|
|
9599
9794
|
description: "Upgrade packages using yum package manager",
|
|
9600
9795
|
inputSchema: YumUpgradeParamsSchema,
|
|
@@ -9605,7 +9800,7 @@ var upgrade_default4 = task(run61, {
|
|
|
9605
9800
|
function stripAnsiCodes4(text) {
|
|
9606
9801
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
9607
9802
|
}
|
|
9608
|
-
async function
|
|
9803
|
+
async function run63(context) {
|
|
9609
9804
|
const { query, namesOnly = false, descriptions = true } = context.params;
|
|
9610
9805
|
if (!query) {
|
|
9611
9806
|
context.error("Query parameter is required");
|
|
@@ -9661,7 +9856,7 @@ async function run62(context) {
|
|
|
9661
9856
|
};
|
|
9662
9857
|
}
|
|
9663
9858
|
}
|
|
9664
|
-
var search_default4 = task(
|
|
9859
|
+
var search_default4 = task(run63, {
|
|
9665
9860
|
name: "search",
|
|
9666
9861
|
description: "Search packages using yum package manager",
|
|
9667
9862
|
inputSchema: YumSearchParamsSchema,
|
|
@@ -9672,7 +9867,7 @@ var search_default4 = task(run62, {
|
|
|
9672
9867
|
function stripAnsiCodes5(text) {
|
|
9673
9868
|
return text.replace(/[\u001b\u009b][[()#;?]*.{0,2}(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").replace(/\r/g, "");
|
|
9674
9869
|
}
|
|
9675
|
-
async function
|
|
9870
|
+
async function run64(context) {
|
|
9676
9871
|
const { pattern } = context.params;
|
|
9677
9872
|
try {
|
|
9678
9873
|
const result = await context.exec(["yum", "list", "installed"], { sudo: false });
|
|
@@ -9725,7 +9920,7 @@ async function run63(context) {
|
|
|
9725
9920
|
};
|
|
9726
9921
|
}
|
|
9727
9922
|
}
|
|
9728
|
-
var list_default6 = task(
|
|
9923
|
+
var list_default6 = task(run64, {
|
|
9729
9924
|
name: "list",
|
|
9730
9925
|
description: "List installed packages.",
|
|
9731
9926
|
inputSchema: YumListParamsSchema,
|
|
@@ -9733,7 +9928,7 @@ var list_default6 = task(run63, {
|
|
|
9733
9928
|
});
|
|
9734
9929
|
|
|
9735
9930
|
// src/core/pkg/yum/clean.ts
|
|
9736
|
-
async function
|
|
9931
|
+
async function run65(context) {
|
|
9737
9932
|
const { sudo = true, all = true, packages = false, metadata = false } = context.params;
|
|
9738
9933
|
try {
|
|
9739
9934
|
let packagesRemoved = 0;
|
|
@@ -9794,7 +9989,7 @@ async function run64(context) {
|
|
|
9794
9989
|
};
|
|
9795
9990
|
}
|
|
9796
9991
|
}
|
|
9797
|
-
var clean_default4 = task(
|
|
9992
|
+
var clean_default4 = task(run65, {
|
|
9798
9993
|
name: "clean",
|
|
9799
9994
|
description: "Clean packages using yum package manager",
|
|
9800
9995
|
inputSchema: YumCleanParamsSchema,
|
|
@@ -9802,7 +9997,7 @@ var clean_default4 = task(run64, {
|
|
|
9802
9997
|
});
|
|
9803
9998
|
|
|
9804
9999
|
// src/core/pkg/yum/is_installed.ts
|
|
9805
|
-
async function
|
|
10000
|
+
async function run66(context) {
|
|
9806
10001
|
const { package: packageName } = context.params;
|
|
9807
10002
|
if (!packageName) {
|
|
9808
10003
|
context.error("Package parameter is required");
|
|
@@ -9824,7 +10019,7 @@ async function run65(context) {
|
|
|
9824
10019
|
};
|
|
9825
10020
|
}
|
|
9826
10021
|
}
|
|
9827
|
-
var is_installed_default4 = task(
|
|
10022
|
+
var is_installed_default4 = task(run66, {
|
|
9828
10023
|
name: "is_installed",
|
|
9829
10024
|
description: "Check if package is installed using yum package manager",
|
|
9830
10025
|
inputSchema: YumIsInstalledParamsSchema,
|
|
@@ -9832,7 +10027,7 @@ var is_installed_default4 = task(run65, {
|
|
|
9832
10027
|
});
|
|
9833
10028
|
|
|
9834
10029
|
// src/core/pkg/yum/info.ts
|
|
9835
|
-
async function
|
|
10030
|
+
async function run67(context) {
|
|
9836
10031
|
const { package: packageName } = context.params;
|
|
9837
10032
|
if (!packageName) {
|
|
9838
10033
|
context.error("Package parameter is required");
|
|
@@ -9913,7 +10108,7 @@ async function run66(context) {
|
|
|
9913
10108
|
};
|
|
9914
10109
|
}
|
|
9915
10110
|
}
|
|
9916
|
-
var info_default5 = task(
|
|
10111
|
+
var info_default5 = task(run67, {
|
|
9917
10112
|
name: "info",
|
|
9918
10113
|
description: "Get package information using yum package manager",
|
|
9919
10114
|
inputSchema: YumInfoParamsSchema,
|
|
@@ -9954,7 +10149,14 @@ var PACKAGE_MANAGERS = {
|
|
|
9954
10149
|
},
|
|
9955
10150
|
yum: {
|
|
9956
10151
|
name: "yum",
|
|
9957
|
-
installCommand: [
|
|
10152
|
+
installCommand: [
|
|
10153
|
+
"yum",
|
|
10154
|
+
"install",
|
|
10155
|
+
"-y",
|
|
10156
|
+
"--setopt=install_weak_deps=0",
|
|
10157
|
+
"--setopt=skip_if_unavailable=1",
|
|
10158
|
+
"--quiet"
|
|
10159
|
+
],
|
|
9958
10160
|
uninstallCommand: ["yum", "remove", "-y", "--quiet"],
|
|
9959
10161
|
updateCommand: ["yum", "update", "-y", "--setopt=skip_if_unavailable=1", "--quiet"],
|
|
9960
10162
|
upgradeCommand: [
|
|
@@ -9971,7 +10173,14 @@ var PACKAGE_MANAGERS = {
|
|
|
9971
10173
|
},
|
|
9972
10174
|
dnf: {
|
|
9973
10175
|
name: "dnf",
|
|
9974
|
-
installCommand: [
|
|
10176
|
+
installCommand: [
|
|
10177
|
+
"dnf",
|
|
10178
|
+
"install",
|
|
10179
|
+
"-y",
|
|
10180
|
+
"--setopt=install_weak_deps=0",
|
|
10181
|
+
"--setopt=skip_if_unavailable=1",
|
|
10182
|
+
"--quiet"
|
|
10183
|
+
],
|
|
9975
10184
|
uninstallCommand: ["dnf", "remove", "-y", "--quiet"],
|
|
9976
10185
|
updateCommand: ["dnf", "update", "-y", "--setopt=skip_if_unavailable=1", "--quiet"],
|
|
9977
10186
|
upgradeCommand: [
|
|
@@ -11004,10 +11213,10 @@ var AbstractPkgUpdateParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
11004
11213
|
extraArgs: true
|
|
11005
11214
|
});
|
|
11006
11215
|
var AbstractPkgUpdateResultSchema = AbstractPkgResultSchema;
|
|
11007
|
-
async function
|
|
11216
|
+
async function run68(context) {
|
|
11008
11217
|
return await abstractUpdate(context);
|
|
11009
11218
|
}
|
|
11010
|
-
var update_default5 = task(
|
|
11219
|
+
var update_default5 = task(run68, {
|
|
11011
11220
|
description: "Update package sources using auto-detected or specified package manager",
|
|
11012
11221
|
inputSchema: AbstractPkgUpdateParamsSchema,
|
|
11013
11222
|
outputSchema: AbstractPkgUpdateResultSchema
|
|
@@ -11020,10 +11229,10 @@ var AbstractPkgUpgradeParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
11020
11229
|
extraArgs: true
|
|
11021
11230
|
});
|
|
11022
11231
|
var AbstractPkgUpgradeResultSchema = AbstractPkgResultSchema;
|
|
11023
|
-
async function
|
|
11232
|
+
async function run69(context) {
|
|
11024
11233
|
return await abstractUpgrade(context);
|
|
11025
11234
|
}
|
|
11026
|
-
var upgrade_default5 = task(
|
|
11235
|
+
var upgrade_default5 = task(run69, {
|
|
11027
11236
|
description: "Upgrade packages using auto-detected or specified package manager",
|
|
11028
11237
|
inputSchema: AbstractPkgUpgradeParamsSchema,
|
|
11029
11238
|
outputSchema: AbstractPkgUpgradeResultSchema
|
|
@@ -11036,7 +11245,7 @@ var UserExistsInputSchema = z.object({
|
|
|
11036
11245
|
var UserExistsOutputSchema = z.object({
|
|
11037
11246
|
exists: z.boolean()
|
|
11038
11247
|
});
|
|
11039
|
-
async function
|
|
11248
|
+
async function run70(context) {
|
|
11040
11249
|
const { params, exec } = context;
|
|
11041
11250
|
const { user } = params;
|
|
11042
11251
|
const command = ["id", user].join(" ");
|
|
@@ -11045,7 +11254,7 @@ async function run69(context) {
|
|
|
11045
11254
|
exists: exists3
|
|
11046
11255
|
};
|
|
11047
11256
|
}
|
|
11048
|
-
var exists_default4 = task(
|
|
11257
|
+
var exists_default4 = task(run70, {
|
|
11049
11258
|
name: "exists",
|
|
11050
11259
|
description: "User exists.",
|
|
11051
11260
|
inputSchema: UserExistsInputSchema,
|
|
@@ -11069,7 +11278,7 @@ var UserHomeDirOutputSchema = z.object({
|
|
|
11069
11278
|
error: z.string().optional()
|
|
11070
11279
|
})
|
|
11071
11280
|
);
|
|
11072
|
-
async function
|
|
11281
|
+
async function run71(context) {
|
|
11073
11282
|
const { params, exec } = context;
|
|
11074
11283
|
const { user, sudo = false } = params;
|
|
11075
11284
|
const getentCommand = ["getent", "passwd", user].filter(Boolean).join(" ");
|
|
@@ -11099,7 +11308,7 @@ async function run70(context) {
|
|
|
11099
11308
|
success: true
|
|
11100
11309
|
};
|
|
11101
11310
|
}
|
|
11102
|
-
var home_dir_default = task(
|
|
11311
|
+
var home_dir_default = task(run71, {
|
|
11103
11312
|
name: "home_dir",
|
|
11104
11313
|
description: "User home dir.",
|
|
11105
11314
|
inputSchema: UserHomeDirInputSchema,
|
|
@@ -11122,7 +11331,7 @@ var CreateUserOutputSchema = z.object({
|
|
|
11122
11331
|
error: z.string().optional()
|
|
11123
11332
|
})
|
|
11124
11333
|
);
|
|
11125
|
-
async function
|
|
11334
|
+
async function run72(context) {
|
|
11126
11335
|
const { params, exec, run: runTask, error } = context;
|
|
11127
11336
|
const { user, create_home = true, create_group = true, system = false, sudo = true } = params;
|
|
11128
11337
|
if (!user) {
|
|
@@ -11169,7 +11378,7 @@ async function run71(context) {
|
|
|
11169
11378
|
};
|
|
11170
11379
|
}
|
|
11171
11380
|
}
|
|
11172
|
-
var create_default3 = task(
|
|
11381
|
+
var create_default3 = task(run72, {
|
|
11173
11382
|
name: "create",
|
|
11174
11383
|
description: "User create.",
|
|
11175
11384
|
inputSchema: CreateUserInputSchema,
|
|
@@ -11190,7 +11399,7 @@ var SetUserPasswordOutputSchema = z.object({
|
|
|
11190
11399
|
error: z.string().optional()
|
|
11191
11400
|
})
|
|
11192
11401
|
);
|
|
11193
|
-
async function
|
|
11402
|
+
async function run73(context) {
|
|
11194
11403
|
const { params, exec, error } = context;
|
|
11195
11404
|
const { user, password, sudo = true } = params;
|
|
11196
11405
|
if (!user || !password) {
|
|
@@ -11207,7 +11416,7 @@ async function run72(context) {
|
|
|
11207
11416
|
}
|
|
11208
11417
|
return { success: true };
|
|
11209
11418
|
}
|
|
11210
|
-
var set_password_default = task(
|
|
11419
|
+
var set_password_default = task(run73, {
|
|
11211
11420
|
name: "set_password",
|
|
11212
11421
|
description: "Sets a user password.",
|
|
11213
11422
|
inputSchema: SetUserPasswordInputSchema,
|
|
@@ -11346,7 +11555,7 @@ var GetUsernameOutputSchema = z.object({
|
|
|
11346
11555
|
username: z.string()
|
|
11347
11556
|
})
|
|
11348
11557
|
);
|
|
11349
|
-
async function
|
|
11558
|
+
async function run74(context) {
|
|
11350
11559
|
const { exec } = context;
|
|
11351
11560
|
const command = ["id", "-un"].filter(Boolean).join(" ");
|
|
11352
11561
|
const { success, stdout: username } = await exec(command);
|
|
@@ -11355,7 +11564,7 @@ async function run73(context) {
|
|
|
11355
11564
|
username: username.trim()
|
|
11356
11565
|
};
|
|
11357
11566
|
}
|
|
11358
|
-
var get_username_default = task(
|
|
11567
|
+
var get_username_default = task(run74, {
|
|
11359
11568
|
name: "get_username",
|
|
11360
11569
|
description: "User get username.",
|
|
11361
11570
|
inputSchema: GetUsernameInputSchema,
|
|
@@ -11378,7 +11587,7 @@ var CopyIdOutputSchema = z.object({
|
|
|
11378
11587
|
error: z.string().optional()
|
|
11379
11588
|
})
|
|
11380
11589
|
);
|
|
11381
|
-
async function
|
|
11590
|
+
async function run75(context) {
|
|
11382
11591
|
const { params, run: runTask, exec, log, info, error } = context;
|
|
11383
11592
|
let { public_key, user, sudo } = params;
|
|
11384
11593
|
const publicKeyTrimmed = public_key.trim();
|
|
@@ -11458,7 +11667,7 @@ async function run74(context) {
|
|
|
11458
11667
|
changed: true
|
|
11459
11668
|
};
|
|
11460
11669
|
}
|
|
11461
|
-
var copy_id_default = task(
|
|
11670
|
+
var copy_id_default = task(run75, {
|
|
11462
11671
|
name: "copy_id",
|
|
11463
11672
|
description: "ssh copy id.",
|
|
11464
11673
|
inputSchema: CopyIdInputSchema,
|
|
@@ -11485,7 +11694,7 @@ var SudoersCheckOutputSchema = z.object({
|
|
|
11485
11694
|
error: z.string().optional()
|
|
11486
11695
|
})
|
|
11487
11696
|
);
|
|
11488
|
-
async function
|
|
11697
|
+
async function run76(context) {
|
|
11489
11698
|
const { params, exec, error } = context;
|
|
11490
11699
|
const effectiveFile = params.file || "/etc/sudoers";
|
|
11491
11700
|
try {
|
|
@@ -11506,7 +11715,7 @@ async function run75(context) {
|
|
|
11506
11715
|
};
|
|
11507
11716
|
}
|
|
11508
11717
|
}
|
|
11509
|
-
var check_default = task(
|
|
11718
|
+
var check_default = task(run76, {
|
|
11510
11719
|
name: "check",
|
|
11511
11720
|
description: "Sudoers check.",
|
|
11512
11721
|
inputSchema: SudoersCheckInputSchema,
|
|
@@ -12009,10 +12218,10 @@ var AbstractPkgInstallInputSchema = AbstractPkgParamsSchema.extend({
|
|
|
12009
12218
|
package: PackageNameSchema
|
|
12010
12219
|
});
|
|
12011
12220
|
var AbstractPkgInstallOutputSchema = AbstractPkgResultSchema;
|
|
12012
|
-
async function
|
|
12221
|
+
async function run77(context) {
|
|
12013
12222
|
return await abstractInstall(context);
|
|
12014
12223
|
}
|
|
12015
|
-
var install_default5 = task(
|
|
12224
|
+
var install_default5 = task(run77, {
|
|
12016
12225
|
name: "install",
|
|
12017
12226
|
description: "Install packages using auto-detected or specified package manager",
|
|
12018
12227
|
inputSchema: AbstractPkgInstallInputSchema,
|
|
@@ -12024,10 +12233,10 @@ var AbstractPkgUninstallParamsSchema = AbstractPkgParamsSchema.extend({
|
|
|
12024
12233
|
package: PackageNameSchema
|
|
12025
12234
|
});
|
|
12026
12235
|
var AbstractPkgUninstallResultSchema = AbstractPkgResultSchema;
|
|
12027
|
-
async function
|
|
12236
|
+
async function run78(context) {
|
|
12028
12237
|
return await abstractUninstall(context);
|
|
12029
12238
|
}
|
|
12030
|
-
var uninstall_default5 = task(
|
|
12239
|
+
var uninstall_default5 = task(run78, {
|
|
12031
12240
|
description: "Uninstall packages using auto-detected or specified package manager",
|
|
12032
12241
|
inputSchema: AbstractPkgUninstallParamsSchema,
|
|
12033
12242
|
outputSchema: AbstractPkgUninstallResultSchema
|
|
@@ -12048,7 +12257,7 @@ var PkgInfoOutputSchema = z.object({
|
|
|
12048
12257
|
error: z.string().optional()
|
|
12049
12258
|
})
|
|
12050
12259
|
);
|
|
12051
|
-
async function
|
|
12260
|
+
async function run79(context) {
|
|
12052
12261
|
const { params: taskParams, run: runTask, exec, error } = context;
|
|
12053
12262
|
const osDetails = await runTask(os_default({}));
|
|
12054
12263
|
if (!osDetails.success) {
|
|
@@ -12096,7 +12305,7 @@ stderr: ${stderr}`
|
|
|
12096
12305
|
return { installed: false, success: false, error: e.message };
|
|
12097
12306
|
}
|
|
12098
12307
|
}
|
|
12099
|
-
var info_default6 = task(
|
|
12308
|
+
var info_default6 = task(run79, {
|
|
12100
12309
|
name: "info",
|
|
12101
12310
|
description: "Pkg info.",
|
|
12102
12311
|
inputSchema: PkgInfoInputSchema,
|
|
@@ -12160,7 +12369,7 @@ var PkgIsInstalledResultSchema = z.object({
|
|
|
12160
12369
|
);
|
|
12161
12370
|
|
|
12162
12371
|
// src/core/pkg/is_installed.ts
|
|
12163
|
-
async function
|
|
12372
|
+
async function run80(context) {
|
|
12164
12373
|
const { params, run: runTask } = context;
|
|
12165
12374
|
const info = await runTask(info_default6({ package: params.package }));
|
|
12166
12375
|
if (!info || typeof info !== "object") {
|
|
@@ -12175,7 +12384,7 @@ async function run79(context) {
|
|
|
12175
12384
|
}
|
|
12176
12385
|
return { success: true, installed: !!info.installed };
|
|
12177
12386
|
}
|
|
12178
|
-
var is_installed_default5 = task(
|
|
12387
|
+
var is_installed_default5 = task(run80, {
|
|
12179
12388
|
name: "is_installed",
|
|
12180
12389
|
description: "Checks if a package is installed on the system.",
|
|
12181
12390
|
inputSchema: PkgIsInstalledParamsSchema,
|
|
@@ -12183,7 +12392,7 @@ var is_installed_default5 = task(run79, {
|
|
|
12183
12392
|
});
|
|
12184
12393
|
|
|
12185
12394
|
// src/core/pkg/install-orig-dir/arch.ts
|
|
12186
|
-
async function
|
|
12395
|
+
async function run81(context) {
|
|
12187
12396
|
const { params: taskParams, exec } = context;
|
|
12188
12397
|
const { package: pkg, sudo = true } = taskParams;
|
|
12189
12398
|
const packages = Array.isArray(pkg) ? pkg : [pkg];
|
|
@@ -12195,7 +12404,7 @@ ${stderr}` };
|
|
|
12195
12404
|
}
|
|
12196
12405
|
return { success };
|
|
12197
12406
|
}
|
|
12198
|
-
var install = task(
|
|
12407
|
+
var install = task(run81, {
|
|
12199
12408
|
name: "arch",
|
|
12200
12409
|
description: "Installs a package using pacman on Arch-based systems (legacy dispatcher).",
|
|
12201
12410
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12214,7 +12423,7 @@ var RebootNeededOutputSchema = z.object({
|
|
|
12214
12423
|
error: z.string().optional()
|
|
12215
12424
|
})
|
|
12216
12425
|
);
|
|
12217
|
-
async function
|
|
12426
|
+
async function run82(context) {
|
|
12218
12427
|
const { run: runTask, exec, error, info, warn } = context;
|
|
12219
12428
|
const osDetails = await runTask(os_default());
|
|
12220
12429
|
if (!osDetails.success) {
|
|
@@ -12271,7 +12480,7 @@ async function run81(context) {
|
|
|
12271
12480
|
warn(`Unsupported OS (${baseOs}) for reboot_needed check.`);
|
|
12272
12481
|
return { reboot_needed: false, success: true };
|
|
12273
12482
|
}
|
|
12274
|
-
var reboot_needed_default = task(
|
|
12483
|
+
var reboot_needed_default = task(run82, {
|
|
12275
12484
|
name: "reboot_needed",
|
|
12276
12485
|
description: "Reboot needed.",
|
|
12277
12486
|
inputSchema: RebootNeededInputSchema,
|
|
@@ -12279,7 +12488,7 @@ var reboot_needed_default = task(run81, {
|
|
|
12279
12488
|
});
|
|
12280
12489
|
|
|
12281
12490
|
// src/core/pkg/install-orig-dir/debian.ts
|
|
12282
|
-
async function
|
|
12491
|
+
async function run83(context) {
|
|
12283
12492
|
const { params: taskParams, exec, run: runTask, debug } = context;
|
|
12284
12493
|
const { package: pkg, sudo = true } = taskParams;
|
|
12285
12494
|
const packages = Array.isArray(pkg) ? pkg.join(" ") : pkg;
|
|
@@ -12307,7 +12516,7 @@ ${needrestartResult.stderr}`
|
|
|
12307
12516
|
}
|
|
12308
12517
|
return { success: true };
|
|
12309
12518
|
}
|
|
12310
|
-
var install2 = task(
|
|
12519
|
+
var install2 = task(run83, {
|
|
12311
12520
|
name: "debian",
|
|
12312
12521
|
description: "Installs a package using apt on Debian-based systems (legacy dispatcher).",
|
|
12313
12522
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12315,7 +12524,7 @@ var install2 = task(run82, {
|
|
|
12315
12524
|
});
|
|
12316
12525
|
|
|
12317
12526
|
// src/core/pkg/install-orig-dir/fedora.ts
|
|
12318
|
-
async function
|
|
12527
|
+
async function run84(context) {
|
|
12319
12528
|
const { params: taskParams, exec } = context;
|
|
12320
12529
|
const { package: pkg, sudo = true } = taskParams;
|
|
12321
12530
|
const packages = Array.isArray(pkg) ? pkg : [pkg];
|
|
@@ -12327,7 +12536,7 @@ ${stderr}` };
|
|
|
12327
12536
|
}
|
|
12328
12537
|
return { success };
|
|
12329
12538
|
}
|
|
12330
|
-
var install3 = task(
|
|
12539
|
+
var install3 = task(run84, {
|
|
12331
12540
|
name: "fedora",
|
|
12332
12541
|
description: "Installs a package using dnf on Fedora-based systems (legacy dispatcher).",
|
|
12333
12542
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12335,7 +12544,7 @@ var install3 = task(run83, {
|
|
|
12335
12544
|
});
|
|
12336
12545
|
|
|
12337
12546
|
// src/core/pkg/install-orig.ts
|
|
12338
|
-
async function
|
|
12547
|
+
async function run85(context) {
|
|
12339
12548
|
const { params: taskParams, run: runTask, error } = context;
|
|
12340
12549
|
const osDetails = await runTask(os_default());
|
|
12341
12550
|
if (!osDetails?.success) {
|
|
@@ -12368,7 +12577,7 @@ async function run84(context) {
|
|
|
12368
12577
|
}
|
|
12369
12578
|
return installResult;
|
|
12370
12579
|
}
|
|
12371
|
-
var install4 = task(
|
|
12580
|
+
var install4 = task(run85, {
|
|
12372
12581
|
name: "install-orig",
|
|
12373
12582
|
description: "Installs a package using the appropriate OS package manager (original implementation).",
|
|
12374
12583
|
inputSchema: PkgInstallParamsSchema,
|
|
@@ -12380,7 +12589,7 @@ var install_orig_default = install4;
|
|
|
12380
12589
|
var install_cp_default = install_orig_default;
|
|
12381
12590
|
|
|
12382
12591
|
// src/core/pkg/remove/arch.ts
|
|
12383
|
-
async function
|
|
12592
|
+
async function run86(context) {
|
|
12384
12593
|
const {
|
|
12385
12594
|
params: { package: pkg, sudo = true },
|
|
12386
12595
|
exec
|
|
@@ -12413,7 +12622,7 @@ async function run85(context) {
|
|
|
12413
12622
|
error: result.stderr
|
|
12414
12623
|
};
|
|
12415
12624
|
}
|
|
12416
|
-
var remove = task(
|
|
12625
|
+
var remove = task(run86, {
|
|
12417
12626
|
name: "arch",
|
|
12418
12627
|
description: "Remove package(s) on Arch Linux.",
|
|
12419
12628
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12421,7 +12630,7 @@ var remove = task(run85, {
|
|
|
12421
12630
|
});
|
|
12422
12631
|
|
|
12423
12632
|
// src/core/pkg/remove/debian.ts
|
|
12424
|
-
async function
|
|
12633
|
+
async function run87(context) {
|
|
12425
12634
|
const {
|
|
12426
12635
|
params: { package: pkg, sudo = true },
|
|
12427
12636
|
exec,
|
|
@@ -12445,7 +12654,7 @@ async function run86(context) {
|
|
|
12445
12654
|
await runTask(reboot_needed_default());
|
|
12446
12655
|
return { success: true };
|
|
12447
12656
|
}
|
|
12448
|
-
var remove2 = task(
|
|
12657
|
+
var remove2 = task(run87, {
|
|
12449
12658
|
name: "debian",
|
|
12450
12659
|
description: "Remove package(s) on Debian/Ubuntu.",
|
|
12451
12660
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12453,7 +12662,7 @@ var remove2 = task(run86, {
|
|
|
12453
12662
|
});
|
|
12454
12663
|
|
|
12455
12664
|
// src/core/pkg/remove/fedora.ts
|
|
12456
|
-
async function
|
|
12665
|
+
async function run88(context) {
|
|
12457
12666
|
const {
|
|
12458
12667
|
params: { package: pkg, sudo = true },
|
|
12459
12668
|
exec
|
|
@@ -12463,7 +12672,7 @@ async function run87(context) {
|
|
|
12463
12672
|
const { success } = await exec(commandArray.join(" "), { sudo });
|
|
12464
12673
|
return { success };
|
|
12465
12674
|
}
|
|
12466
|
-
var remove3 = task(
|
|
12675
|
+
var remove3 = task(run88, {
|
|
12467
12676
|
name: "fedora",
|
|
12468
12677
|
description: "Remove package(s) on Fedora.",
|
|
12469
12678
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12471,7 +12680,7 @@ var remove3 = task(run87, {
|
|
|
12471
12680
|
});
|
|
12472
12681
|
|
|
12473
12682
|
// src/core/pkg/remove/index.ts
|
|
12474
|
-
async function
|
|
12683
|
+
async function run89(context) {
|
|
12475
12684
|
const { params: taskParams, run: runTask, error } = context;
|
|
12476
12685
|
const osDetails = await runTask(os_default());
|
|
12477
12686
|
if (osDetails instanceof Error) {
|
|
@@ -12500,7 +12709,7 @@ async function run88(context) {
|
|
|
12500
12709
|
}
|
|
12501
12710
|
return removeResult;
|
|
12502
12711
|
}
|
|
12503
|
-
var remove_default = task(
|
|
12712
|
+
var remove_default = task(run89, {
|
|
12504
12713
|
name: "remove",
|
|
12505
12714
|
description: "Removes a package using the appropriate OS package manager.",
|
|
12506
12715
|
inputSchema: PkgRemoveParamsSchema,
|
|
@@ -12511,7 +12720,7 @@ var remove_default = task(run88, {
|
|
|
12511
12720
|
var remove_cp_default = remove_default;
|
|
12512
12721
|
|
|
12513
12722
|
// src/core/pkg/update/arch.ts
|
|
12514
|
-
async function
|
|
12723
|
+
async function run90(context) {
|
|
12515
12724
|
const {
|
|
12516
12725
|
params: { package: pkg, sudo = true },
|
|
12517
12726
|
exec
|
|
@@ -12523,10 +12732,10 @@ async function run89(context) {
|
|
|
12523
12732
|
const { success } = await exec(commandParts.filter(Boolean).join(" "), { sudo });
|
|
12524
12733
|
return { success };
|
|
12525
12734
|
}
|
|
12526
|
-
var update = task(
|
|
12735
|
+
var update = task(run90);
|
|
12527
12736
|
|
|
12528
12737
|
// src/core/pkg/update/debian.ts
|
|
12529
|
-
async function
|
|
12738
|
+
async function run91(context) {
|
|
12530
12739
|
const {
|
|
12531
12740
|
params: { package: pkg, sudo = true, fullUpgrade = false },
|
|
12532
12741
|
exec
|
|
@@ -12543,10 +12752,10 @@ async function run90(context) {
|
|
|
12543
12752
|
const { success } = await exec(`${prefix}apt-get install -y --only-upgrade ${packages.join(" ")}`, { sudo });
|
|
12544
12753
|
return { success };
|
|
12545
12754
|
}
|
|
12546
|
-
var update2 = task(
|
|
12755
|
+
var update2 = task(run91);
|
|
12547
12756
|
|
|
12548
12757
|
// src/core/pkg/update/fedora.ts
|
|
12549
|
-
async function
|
|
12758
|
+
async function run92(context) {
|
|
12550
12759
|
const {
|
|
12551
12760
|
params: { package: pkg, sudo = true },
|
|
12552
12761
|
exec
|
|
@@ -12560,10 +12769,10 @@ async function run91(context) {
|
|
|
12560
12769
|
const { success } = await exec(`${prefix}dnf upgrade -y ${packages.join(" ")}`, { sudo });
|
|
12561
12770
|
return { success };
|
|
12562
12771
|
}
|
|
12563
|
-
var update3 = task(
|
|
12772
|
+
var update3 = task(run92);
|
|
12564
12773
|
|
|
12565
12774
|
// src/core/pkg/update/index.ts
|
|
12566
|
-
async function
|
|
12775
|
+
async function run93(context) {
|
|
12567
12776
|
const { params: taskParams, run: runTask, error } = context;
|
|
12568
12777
|
const osDetails = await runTask(os_default());
|
|
12569
12778
|
if (osDetails instanceof Error) {
|
|
@@ -12588,7 +12797,7 @@ async function run92(context) {
|
|
|
12588
12797
|
}
|
|
12589
12798
|
return result;
|
|
12590
12799
|
}
|
|
12591
|
-
var update_default6 = task(
|
|
12800
|
+
var update_default6 = task(run93, {
|
|
12592
12801
|
name: "update",
|
|
12593
12802
|
description: "Updates packages using the appropriate OS package manager.",
|
|
12594
12803
|
inputSchema: PkgUpdateParamsSchema,
|
|
@@ -12606,13 +12815,13 @@ var AbstractPkgSearchParamsSchema = z.object({
|
|
|
12606
12815
|
packageManager: z.string().optional()
|
|
12607
12816
|
});
|
|
12608
12817
|
var AbstractPkgSearchResultSchema = AbstractPkgResultSchema;
|
|
12609
|
-
async function
|
|
12818
|
+
async function run94(context) {
|
|
12610
12819
|
const result = await abstractSearch(context);
|
|
12611
12820
|
return {
|
|
12612
12821
|
...result
|
|
12613
12822
|
};
|
|
12614
12823
|
}
|
|
12615
|
-
var search_default5 = task(
|
|
12824
|
+
var search_default5 = task(run94, {
|
|
12616
12825
|
description: "Search for packages using auto-detected or specified package manager",
|
|
12617
12826
|
inputSchema: AbstractPkgSearchParamsSchema,
|
|
12618
12827
|
outputSchema: AbstractPkgSearchResultSchema
|
|
@@ -12624,10 +12833,10 @@ var AbstractPkgListParamsSchema = z.object({
|
|
|
12624
12833
|
packageManager: z.string().optional()
|
|
12625
12834
|
});
|
|
12626
12835
|
var AbstractPkgListResultSchema = AbstractPkgResultSchema;
|
|
12627
|
-
async function
|
|
12836
|
+
async function run95(context) {
|
|
12628
12837
|
return await abstractList(context);
|
|
12629
12838
|
}
|
|
12630
|
-
var list_default7 = task(
|
|
12839
|
+
var list_default7 = task(run95, {
|
|
12631
12840
|
description: "List installed packages using auto-detected or specified package manager",
|
|
12632
12841
|
inputSchema: AbstractPkgListParamsSchema,
|
|
12633
12842
|
outputSchema: AbstractPkgListResultSchema
|
|
@@ -12639,10 +12848,10 @@ var AbstractPkgCleanParamsSchema = AbstractPkgParamsSchema.pick({
|
|
|
12639
12848
|
sudo: true
|
|
12640
12849
|
});
|
|
12641
12850
|
var AbstractPkgCleanResultSchema = AbstractPkgResultSchema;
|
|
12642
|
-
async function
|
|
12851
|
+
async function run96(context) {
|
|
12643
12852
|
return await abstractClean(context);
|
|
12644
12853
|
}
|
|
12645
|
-
var clean_default5 = task(
|
|
12854
|
+
var clean_default5 = task(run96, {
|
|
12646
12855
|
description: "Clean package cache using auto-detected or specified package manager",
|
|
12647
12856
|
inputSchema: AbstractPkgCleanParamsSchema,
|
|
12648
12857
|
outputSchema: AbstractPkgCleanResultSchema
|
|
@@ -12696,7 +12905,7 @@ var K3supInstallOutputSchema = z.object({
|
|
|
12696
12905
|
/** The command that would be run if --print-command was used */
|
|
12697
12906
|
executedCommand: z.string().optional()
|
|
12698
12907
|
});
|
|
12699
|
-
async function
|
|
12908
|
+
async function run97(context) {
|
|
12700
12909
|
const { params, exec, log, error, debug } = context;
|
|
12701
12910
|
const k3supCmd = ["k3sup", "install"];
|
|
12702
12911
|
const addFlag = (flag, condition) => {
|
|
@@ -12754,7 +12963,7 @@ async function run96(context) {
|
|
|
12754
12963
|
throw e;
|
|
12755
12964
|
}
|
|
12756
12965
|
}
|
|
12757
|
-
var k3sup_install_default = task(
|
|
12966
|
+
var k3sup_install_default = task(run97, {
|
|
12758
12967
|
name: "k3sup-install",
|
|
12759
12968
|
description: "K3s k3sup-install.",
|
|
12760
12969
|
inputSchema: K3supInstallInputSchema,
|
|
@@ -13518,7 +13727,7 @@ var AddUsersOutputSchema = z.object({
|
|
|
13518
13727
|
error: z.string().optional()
|
|
13519
13728
|
})
|
|
13520
13729
|
);
|
|
13521
|
-
async function
|
|
13730
|
+
async function run98(context) {
|
|
13522
13731
|
const { params, info, warn, error, run: runTask } = context;
|
|
13523
13732
|
const { users } = params;
|
|
13524
13733
|
if (!users || users.length === 0) {
|
|
@@ -13551,7 +13760,7 @@ async function run97(context) {
|
|
|
13551
13760
|
return { success: false, error: message };
|
|
13552
13761
|
}
|
|
13553
13762
|
}
|
|
13554
|
-
var add_users_default = task(
|
|
13763
|
+
var add_users_default = task(run98, {
|
|
13555
13764
|
description: "Adds one or more users to the docker group.",
|
|
13556
13765
|
inputSchema: AddUsersInputSchema,
|
|
13557
13766
|
outputSchema: AddUsersOutputSchema
|
|
@@ -13571,7 +13780,7 @@ var InstallComposeOutputSchema = z.object({
|
|
|
13571
13780
|
error: z.string().optional()
|
|
13572
13781
|
})
|
|
13573
13782
|
);
|
|
13574
|
-
async function
|
|
13783
|
+
async function run99(context) {
|
|
13575
13784
|
const { params, info, error, run: runTask } = context;
|
|
13576
13785
|
const version2 = params.version ?? "v2.24.5";
|
|
13577
13786
|
const composePath = params.path ?? "/usr/local/bin/docker-compose";
|
|
@@ -13609,7 +13818,7 @@ async function run98(context) {
|
|
|
13609
13818
|
return { success: false, error: message };
|
|
13610
13819
|
}
|
|
13611
13820
|
}
|
|
13612
|
-
var install_compose_default = task(
|
|
13821
|
+
var install_compose_default = task(run99, {
|
|
13613
13822
|
description: "Installs the Docker Compose standalone binary.",
|
|
13614
13823
|
inputSchema: InstallComposeInputSchema,
|
|
13615
13824
|
outputSchema: InstallComposeOutputSchema
|
|
@@ -13632,7 +13841,7 @@ var DockerInstallOutputSchema = z.object({
|
|
|
13632
13841
|
error: z.string().optional()
|
|
13633
13842
|
})
|
|
13634
13843
|
);
|
|
13635
|
-
async function
|
|
13844
|
+
async function run100(context) {
|
|
13636
13845
|
const { info, run: runTask, params, error: logError2 } = context;
|
|
13637
13846
|
const installComposePlugin = params.install_compose_plugin !== false;
|
|
13638
13847
|
const installComposeStandalone = params.install_compose_standalone === true;
|
|
@@ -13871,7 +14080,7 @@ function sanitizeSystemctlState(value) {
|
|
|
13871
14080
|
}
|
|
13872
14081
|
return value.replace(/\u001b\][^\u001b]*\u001b\\/g, "").replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, "").trim().toLowerCase();
|
|
13873
14082
|
}
|
|
13874
|
-
var install_default6 = task(
|
|
14083
|
+
var install_default6 = task(run100, {
|
|
13875
14084
|
name: "install",
|
|
13876
14085
|
description: "Installs and configures Docker, Docker Compose, and group membership.",
|
|
13877
14086
|
inputSchema: DockerInstallInputSchema,
|
|
@@ -14020,7 +14229,7 @@ var DockerRunContainerOutputSchema = z.object({
|
|
|
14020
14229
|
containerName: z.string().optional(),
|
|
14021
14230
|
error: z.string().optional()
|
|
14022
14231
|
});
|
|
14023
|
-
async function
|
|
14232
|
+
async function run101(context) {
|
|
14024
14233
|
const { params, exec, info, error: logError2 } = context;
|
|
14025
14234
|
if (!params.image) {
|
|
14026
14235
|
const message = "Docker image is required.";
|
|
@@ -14061,7 +14270,7 @@ async function run100(context) {
|
|
|
14061
14270
|
containerName: params.name
|
|
14062
14271
|
};
|
|
14063
14272
|
}
|
|
14064
|
-
var run_container_default = task(
|
|
14273
|
+
var run_container_default = task(run101, {
|
|
14065
14274
|
description: "Runs a Docker container and returns its output (attached).",
|
|
14066
14275
|
inputSchema: DockerRunContainerInputSchema,
|
|
14067
14276
|
outputSchema: DockerRunContainerOutputSchema
|
|
@@ -14078,7 +14287,7 @@ var DockerRunDetachedOutputSchema = z.object({
|
|
|
14078
14287
|
containerName: z.string().optional(),
|
|
14079
14288
|
error: z.string().optional()
|
|
14080
14289
|
});
|
|
14081
|
-
async function
|
|
14290
|
+
async function run102(context) {
|
|
14082
14291
|
const { params, exec, info, error: logError2 } = context;
|
|
14083
14292
|
if (!params.image) {
|
|
14084
14293
|
const message = "Docker image is required.";
|
|
@@ -14118,7 +14327,7 @@ async function run101(context) {
|
|
|
14118
14327
|
containerName: params.name
|
|
14119
14328
|
};
|
|
14120
14329
|
}
|
|
14121
|
-
var run_container_detached_default = task(
|
|
14330
|
+
var run_container_detached_default = task(run102, {
|
|
14122
14331
|
description: "Runs a Docker container in detached mode and returns its metadata.",
|
|
14123
14332
|
inputSchema: DockerRunDetachedInputSchema,
|
|
14124
14333
|
outputSchema: DockerRunDetachedOutputSchema
|
|
@@ -14177,7 +14386,7 @@ var ProcessListOutputSchema = z.object({
|
|
|
14177
14386
|
error: z.string().optional()
|
|
14178
14387
|
})
|
|
14179
14388
|
);
|
|
14180
|
-
async function
|
|
14389
|
+
async function run103(context) {
|
|
14181
14390
|
const { params, exec, debug, error } = context;
|
|
14182
14391
|
const { user, command, limit, sort, reverse } = params;
|
|
14183
14392
|
try {
|
|
@@ -14263,7 +14472,7 @@ async function run102(context) {
|
|
|
14263
14472
|
return { success: false, error: errorMsg };
|
|
14264
14473
|
}
|
|
14265
14474
|
}
|
|
14266
|
-
var list_default8 = task(
|
|
14475
|
+
var list_default8 = task(run103, {
|
|
14267
14476
|
name: "list",
|
|
14268
14477
|
description: "Lists processes on the system.",
|
|
14269
14478
|
inputSchema: ProcessListInputSchema,
|
|
@@ -14309,7 +14518,7 @@ var ProcessSearchOutputSchema = z.object({
|
|
|
14309
14518
|
error: z.string().optional()
|
|
14310
14519
|
})
|
|
14311
14520
|
);
|
|
14312
|
-
async function
|
|
14521
|
+
async function run104(context) {
|
|
14313
14522
|
const { params, exec, debug, error } = context;
|
|
14314
14523
|
const { name, user, pid, ppid, args, state, regex = false, ignoreCase = false, limit } = params;
|
|
14315
14524
|
debug(`Searching processes with params: ${JSON.stringify(params)}`);
|
|
@@ -14423,7 +14632,7 @@ function filterProcesses(processes, filters) {
|
|
|
14423
14632
|
return true;
|
|
14424
14633
|
});
|
|
14425
14634
|
}
|
|
14426
|
-
var search_default6 = task(
|
|
14635
|
+
var search_default6 = task(run104, {
|
|
14427
14636
|
name: "search",
|
|
14428
14637
|
description: "Search for processes matching specified criteria.",
|
|
14429
14638
|
inputSchema: ProcessSearchInputSchema,
|
|
@@ -14451,7 +14660,7 @@ var ProcessKillOutputSchema = z.object({
|
|
|
14451
14660
|
error: z.string().optional()
|
|
14452
14661
|
})
|
|
14453
14662
|
);
|
|
14454
|
-
async function
|
|
14663
|
+
async function run105(context) {
|
|
14455
14664
|
const { params, exec, debug, error } = context;
|
|
14456
14665
|
const { pid, user, command, signal = "TERM", force = false, sudo = false } = params;
|
|
14457
14666
|
try {
|
|
@@ -14539,7 +14748,7 @@ async function run104(context) {
|
|
|
14539
14748
|
return { success: false, error: errorMsg };
|
|
14540
14749
|
}
|
|
14541
14750
|
}
|
|
14542
|
-
var kill_default = task(
|
|
14751
|
+
var kill_default = task(run105, {
|
|
14543
14752
|
name: "kill",
|
|
14544
14753
|
description: "Kills processes matching specified criteria. Requires at least one filtering parameter (pid, user, or command) to prevent accidental killing of all processes.",
|
|
14545
14754
|
inputSchema: ProcessKillInputSchema,
|
|
@@ -14560,7 +14769,7 @@ var ProcessSignalOutputSchema = z.object({
|
|
|
14560
14769
|
error: z.string().optional()
|
|
14561
14770
|
})
|
|
14562
14771
|
);
|
|
14563
|
-
async function
|
|
14772
|
+
async function run106(context) {
|
|
14564
14773
|
const { params, exec, debug, error } = context;
|
|
14565
14774
|
const { pid, signal = "TERM", sudo = false } = params;
|
|
14566
14775
|
if (!pid || pid <= 0) {
|
|
@@ -14583,7 +14792,7 @@ async function run105(context) {
|
|
|
14583
14792
|
return { success: false, error: errorMsg };
|
|
14584
14793
|
}
|
|
14585
14794
|
}
|
|
14586
|
-
var signal_default = task(
|
|
14795
|
+
var signal_default = task(run106, {
|
|
14587
14796
|
name: "signal",
|
|
14588
14797
|
description: "Sends a signal to a process.",
|
|
14589
14798
|
inputSchema: ProcessSignalInputSchema,
|
|
@@ -14619,7 +14828,7 @@ var ProcessInfoOutputSchema = z.object({
|
|
|
14619
14828
|
error: z.string().optional()
|
|
14620
14829
|
})
|
|
14621
14830
|
);
|
|
14622
|
-
async function
|
|
14831
|
+
async function run107(context) {
|
|
14623
14832
|
const { params, exec, debug, error } = context;
|
|
14624
14833
|
const { pid } = params;
|
|
14625
14834
|
if (!pid || pid <= 0) {
|
|
@@ -14695,7 +14904,7 @@ async function run106(context) {
|
|
|
14695
14904
|
return { success: false, error: errorMsg };
|
|
14696
14905
|
}
|
|
14697
14906
|
}
|
|
14698
|
-
var info_default7 = task(
|
|
14907
|
+
var info_default7 = task(run107, {
|
|
14699
14908
|
name: "info",
|
|
14700
14909
|
description: "Gets detailed information about a specific process.",
|
|
14701
14910
|
inputSchema: ProcessInfoInputSchema,
|
|
@@ -14759,7 +14968,7 @@ var ProcessTopOutputSchema = z.object({
|
|
|
14759
14968
|
timestamp: z.string()
|
|
14760
14969
|
})
|
|
14761
14970
|
);
|
|
14762
|
-
async function
|
|
14971
|
+
async function run108(context) {
|
|
14763
14972
|
const { params, exec, debug, error } = context;
|
|
14764
14973
|
const {
|
|
14765
14974
|
limit = 10,
|
|
@@ -14921,7 +15130,7 @@ function sortProcesses(processes, sort) {
|
|
|
14921
15130
|
}
|
|
14922
15131
|
});
|
|
14923
15132
|
}
|
|
14924
|
-
var top_default = task(
|
|
15133
|
+
var top_default = task(run108, {
|
|
14925
15134
|
name: "top",
|
|
14926
15135
|
description: "Get top processes with system information.",
|
|
14927
15136
|
inputSchema: ProcessTopInputSchema,
|
|
@@ -14985,7 +15194,7 @@ var ProcessStatsOutputSchema = z.object({
|
|
|
14985
15194
|
timestamp: z.string()
|
|
14986
15195
|
})
|
|
14987
15196
|
);
|
|
14988
|
-
async function
|
|
15197
|
+
async function run109(context) {
|
|
14989
15198
|
const { params, exec, debug, error } = context;
|
|
14990
15199
|
const { includeUsers = true, includeStates = true, includeCommands = false, commandLimit = 10 } = params;
|
|
14991
15200
|
debug(`Getting process statistics with params: ${JSON.stringify(params)}`);
|
|
@@ -15163,7 +15372,7 @@ function calculateCommandStats(processes, limit) {
|
|
|
15163
15372
|
}
|
|
15164
15373
|
return Array.from(commandMap.values()).sort((a, b) => b.cpu - a.cpu).slice(0, limit);
|
|
15165
15374
|
}
|
|
15166
|
-
var stats_default = task(
|
|
15375
|
+
var stats_default = task(run109, {
|
|
15167
15376
|
name: "stats",
|
|
15168
15377
|
description: "Get system-wide process statistics.",
|
|
15169
15378
|
inputSchema: ProcessStatsInputSchema,
|
|
@@ -15198,7 +15407,7 @@ var ProcessChildrenOutputSchema = z.object({
|
|
|
15198
15407
|
error: z.string().optional()
|
|
15199
15408
|
})
|
|
15200
15409
|
);
|
|
15201
|
-
async function
|
|
15410
|
+
async function run110(context) {
|
|
15202
15411
|
const { params, exec, debug, error } = context;
|
|
15203
15412
|
const { pid, recursive = false, maxDepth } = params;
|
|
15204
15413
|
debug(`Getting children for process ${pid} with params: ${JSON.stringify(params)}`);
|
|
@@ -15283,7 +15492,7 @@ async function getDescendants(exec, parentPid, currentDepth, maxDepth) {
|
|
|
15283
15492
|
}
|
|
15284
15493
|
return allDescendants;
|
|
15285
15494
|
}
|
|
15286
|
-
var children_default = task(
|
|
15495
|
+
var children_default = task(run110, {
|
|
15287
15496
|
name: "children",
|
|
15288
15497
|
description: "Get child processes of a given PID.",
|
|
15289
15498
|
inputSchema: ProcessChildrenInputSchema,
|
|
@@ -15316,7 +15525,7 @@ var RebootOutputSchema = z.object({
|
|
|
15316
15525
|
error: z.string().optional(),
|
|
15317
15526
|
status: z.string()
|
|
15318
15527
|
});
|
|
15319
|
-
async function
|
|
15528
|
+
async function run111(context) {
|
|
15320
15529
|
const { params, info, warn, exec } = context;
|
|
15321
15530
|
const time = params.time || "now";
|
|
15322
15531
|
const sudo = params.sudo ?? true;
|
|
@@ -15349,7 +15558,7 @@ stderr: ${stderr}`
|
|
|
15349
15558
|
};
|
|
15350
15559
|
}
|
|
15351
15560
|
}
|
|
15352
|
-
var reboot_default = task(
|
|
15561
|
+
var reboot_default = task(run111, {
|
|
15353
15562
|
description: "Reboots a system",
|
|
15354
15563
|
inputSchema: RebootInputSchema,
|
|
15355
15564
|
outputSchema: RebootOutputSchema
|
|
@@ -15369,7 +15578,7 @@ var ShutdownOutputSchema = z.object({
|
|
|
15369
15578
|
error: z.string().optional(),
|
|
15370
15579
|
status: z.string()
|
|
15371
15580
|
});
|
|
15372
|
-
async function
|
|
15581
|
+
async function run112(context) {
|
|
15373
15582
|
const { params, info, warn, exec } = context;
|
|
15374
15583
|
const time = params.time || "now";
|
|
15375
15584
|
const sudo = params.sudo ?? true;
|
|
@@ -15401,7 +15610,7 @@ stderr: ${stderr}`
|
|
|
15401
15610
|
};
|
|
15402
15611
|
}
|
|
15403
15612
|
}
|
|
15404
|
-
var shutdown_default = task(
|
|
15613
|
+
var shutdown_default = task(run112, {
|
|
15405
15614
|
description: "Shuts down a system",
|
|
15406
15615
|
inputSchema: ShutdownInputSchema,
|
|
15407
15616
|
outputSchema: ShutdownOutputSchema
|
|
@@ -15422,7 +15631,7 @@ var RebootIfNeededOutputSchema = z.object({
|
|
|
15422
15631
|
error: z.string().optional()
|
|
15423
15632
|
})
|
|
15424
15633
|
);
|
|
15425
|
-
async function
|
|
15634
|
+
async function run113(context) {
|
|
15426
15635
|
const { params, run: runTask, exec, error, info, warn } = context;
|
|
15427
15636
|
const delayInSeconds = Math.max(1, params.delay ?? 1);
|
|
15428
15637
|
const message = params.message ?? "Reboot is required. Initiating reboot sequence.";
|
|
@@ -15452,7 +15661,7 @@ ${stderr}`;
|
|
|
15452
15661
|
}
|
|
15453
15662
|
return { rebooting: true, success: true };
|
|
15454
15663
|
}
|
|
15455
|
-
var reboot_if_needed_default = task(
|
|
15664
|
+
var reboot_if_needed_default = task(run113, {
|
|
15456
15665
|
name: "reboot_if_needed",
|
|
15457
15666
|
description: "Reboot if needed.",
|
|
15458
15667
|
inputSchema: RebootIfNeededInputSchema,
|
|
@@ -15469,7 +15678,7 @@ var SystemUptimeOutputSchema = z.object({
|
|
|
15469
15678
|
days: z.number().optional(),
|
|
15470
15679
|
error: z.string().optional()
|
|
15471
15680
|
});
|
|
15472
|
-
async function
|
|
15681
|
+
async function run114(context) {
|
|
15473
15682
|
const { params, exec, error } = context;
|
|
15474
15683
|
const sudo = params.sudo ?? false;
|
|
15475
15684
|
const { success, stdout, stderr } = await exec(["cat", "/proc/uptime"], { sudo });
|
|
@@ -15488,7 +15697,7 @@ async function run113(context) {
|
|
|
15488
15697
|
days: Math.floor(uptimeSeconds / 86400)
|
|
15489
15698
|
};
|
|
15490
15699
|
}
|
|
15491
|
-
var uptime_default = task(
|
|
15700
|
+
var uptime_default = task(run114, {
|
|
15492
15701
|
name: "uptime",
|
|
15493
15702
|
description: "Report system uptime.",
|
|
15494
15703
|
inputSchema: SystemUptimeInputSchema,
|
|
@@ -15513,7 +15722,7 @@ var SystemDatetimeOutputSchema = z.object({
|
|
|
15513
15722
|
error: z.string().optional()
|
|
15514
15723
|
})
|
|
15515
15724
|
);
|
|
15516
|
-
async function
|
|
15725
|
+
async function run115(context) {
|
|
15517
15726
|
const { params, exec } = context;
|
|
15518
15727
|
const sudo = params.sudo ?? false;
|
|
15519
15728
|
const isoResult = await exec(["date", "--iso-8601=seconds"], { sudo }).catch((error) => error);
|
|
@@ -15534,7 +15743,7 @@ async function run114(context) {
|
|
|
15534
15743
|
timezone
|
|
15535
15744
|
};
|
|
15536
15745
|
}
|
|
15537
|
-
var datetime_default = task(
|
|
15746
|
+
var datetime_default = task(run115, {
|
|
15538
15747
|
name: "datetime",
|
|
15539
15748
|
description: "Report system time and timezone.",
|
|
15540
15749
|
inputSchema: SystemDatetimeInputSchema,
|
|
@@ -15561,7 +15770,7 @@ var SystemHardwareOutputSchema = z.object({
|
|
|
15561
15770
|
error: z.string().optional()
|
|
15562
15771
|
})
|
|
15563
15772
|
);
|
|
15564
|
-
async function
|
|
15773
|
+
async function run116(context) {
|
|
15565
15774
|
const { params, exec } = context;
|
|
15566
15775
|
const sudo = params.sudo ?? false;
|
|
15567
15776
|
const archResult = await exec(["uname", "-m"], { sudo }).catch((error) => error);
|
|
@@ -15588,7 +15797,7 @@ async function run115(context) {
|
|
|
15588
15797
|
memTotalKb: Number.isFinite(memTotalKb ?? NaN) ? memTotalKb : void 0
|
|
15589
15798
|
};
|
|
15590
15799
|
}
|
|
15591
|
-
var hardware_default = task(
|
|
15800
|
+
var hardware_default = task(run116, {
|
|
15592
15801
|
name: "hardware",
|
|
15593
15802
|
description: "Report CPU and memory details.",
|
|
15594
15803
|
inputSchema: SystemHardwareInputSchema,
|
|
@@ -15620,7 +15829,7 @@ var SystemdDisableOutputSchema = z.object({
|
|
|
15620
15829
|
error: z.string().optional()
|
|
15621
15830
|
})
|
|
15622
15831
|
);
|
|
15623
|
-
async function
|
|
15832
|
+
async function run117(context) {
|
|
15624
15833
|
const { params, exec, error } = context;
|
|
15625
15834
|
const { service, sudo = false } = params;
|
|
15626
15835
|
if (!service) {
|
|
@@ -15643,7 +15852,7 @@ async function run116(context) {
|
|
|
15643
15852
|
};
|
|
15644
15853
|
}
|
|
15645
15854
|
}
|
|
15646
|
-
var disable_default = task(
|
|
15855
|
+
var disable_default = task(run117, {
|
|
15647
15856
|
name: "disable",
|
|
15648
15857
|
description: "Systemd disable.",
|
|
15649
15858
|
inputSchema: SystemdDisableInputSchema,
|
|
@@ -15663,7 +15872,7 @@ var SystemdEnableOutputSchema = z.object({
|
|
|
15663
15872
|
error: z.string().optional()
|
|
15664
15873
|
})
|
|
15665
15874
|
);
|
|
15666
|
-
async function
|
|
15875
|
+
async function run118(context) {
|
|
15667
15876
|
const { params, exec, error } = context;
|
|
15668
15877
|
const { service, sudo = false } = params;
|
|
15669
15878
|
if (!service) {
|
|
@@ -15686,7 +15895,7 @@ async function run117(context) {
|
|
|
15686
15895
|
};
|
|
15687
15896
|
}
|
|
15688
15897
|
}
|
|
15689
|
-
var enable_default = task(
|
|
15898
|
+
var enable_default = task(run118, {
|
|
15690
15899
|
name: "enable",
|
|
15691
15900
|
description: "Systemd enable.",
|
|
15692
15901
|
inputSchema: SystemdEnableInputSchema,
|
|
@@ -15706,7 +15915,7 @@ var SystemdRestartOutputSchema = z.object({
|
|
|
15706
15915
|
error: z.string().optional()
|
|
15707
15916
|
})
|
|
15708
15917
|
);
|
|
15709
|
-
async function
|
|
15918
|
+
async function run119(context) {
|
|
15710
15919
|
const { params, exec, error } = context;
|
|
15711
15920
|
const { service, sudo = false } = params;
|
|
15712
15921
|
if (!service) {
|
|
@@ -15733,7 +15942,7 @@ async function run118(context) {
|
|
|
15733
15942
|
};
|
|
15734
15943
|
}
|
|
15735
15944
|
}
|
|
15736
|
-
var restart_default = task(
|
|
15945
|
+
var restart_default = task(run119, {
|
|
15737
15946
|
name: "restart",
|
|
15738
15947
|
description: "Systemd restart.",
|
|
15739
15948
|
inputSchema: SystemdRestartInputSchema,
|
|
@@ -15753,7 +15962,7 @@ var SystemdStartOutputSchema = z.object({
|
|
|
15753
15962
|
error: z.string().optional()
|
|
15754
15963
|
})
|
|
15755
15964
|
);
|
|
15756
|
-
async function
|
|
15965
|
+
async function run120(context) {
|
|
15757
15966
|
const { params, exec, error } = context;
|
|
15758
15967
|
const { service, sudo = false } = params;
|
|
15759
15968
|
if (!service) {
|
|
@@ -15776,7 +15985,7 @@ async function run119(context) {
|
|
|
15776
15985
|
};
|
|
15777
15986
|
}
|
|
15778
15987
|
}
|
|
15779
|
-
var start_default = task(
|
|
15988
|
+
var start_default = task(run120, {
|
|
15780
15989
|
name: "start",
|
|
15781
15990
|
description: "Systemd start.",
|
|
15782
15991
|
inputSchema: SystemdStartInputSchema,
|
|
@@ -15796,7 +16005,7 @@ var SystemdStopOutputSchema = z.object({
|
|
|
15796
16005
|
error: z.string().optional()
|
|
15797
16006
|
})
|
|
15798
16007
|
);
|
|
15799
|
-
async function
|
|
16008
|
+
async function run121(context) {
|
|
15800
16009
|
const { params, exec, error } = context;
|
|
15801
16010
|
const { service, sudo = false } = params;
|
|
15802
16011
|
if (!service) {
|
|
@@ -15823,7 +16032,7 @@ async function run120(context) {
|
|
|
15823
16032
|
};
|
|
15824
16033
|
}
|
|
15825
16034
|
}
|
|
15826
|
-
var stop_default = task(
|
|
16035
|
+
var stop_default = task(run121, {
|
|
15827
16036
|
name: "stop",
|
|
15828
16037
|
description: "Systemd stop.",
|
|
15829
16038
|
inputSchema: SystemdStopInputSchema,
|
|
@@ -15843,7 +16052,7 @@ var SystemdReloadOutputSchema = z.object({
|
|
|
15843
16052
|
error: z.string().optional()
|
|
15844
16053
|
})
|
|
15845
16054
|
);
|
|
15846
|
-
async function
|
|
16055
|
+
async function run122(context) {
|
|
15847
16056
|
const { params, exec, error } = context;
|
|
15848
16057
|
const { service, sudo = false } = params;
|
|
15849
16058
|
if (!service) {
|
|
@@ -15864,7 +16073,7 @@ async function run121(context) {
|
|
|
15864
16073
|
};
|
|
15865
16074
|
}
|
|
15866
16075
|
}
|
|
15867
|
-
var reload_default = task(
|
|
16076
|
+
var reload_default = task(run122, {
|
|
15868
16077
|
name: "reload",
|
|
15869
16078
|
description: "Reloads a systemd service (e.g., re-reads configuration without full restart).",
|
|
15870
16079
|
inputSchema: SystemdReloadInputSchema,
|
|
@@ -15886,7 +16095,7 @@ var SystemdStatusOutputSchema = z.object({
|
|
|
15886
16095
|
error: z.string().optional()
|
|
15887
16096
|
})
|
|
15888
16097
|
);
|
|
15889
|
-
async function
|
|
16098
|
+
async function run123(context) {
|
|
15890
16099
|
const { params, exec, error } = context;
|
|
15891
16100
|
const { service, sudo = false } = params;
|
|
15892
16101
|
if (!service) {
|
|
@@ -15909,7 +16118,7 @@ async function run122(context) {
|
|
|
15909
16118
|
};
|
|
15910
16119
|
}
|
|
15911
16120
|
}
|
|
15912
|
-
var status_default = task(
|
|
16121
|
+
var status_default = task(run123, {
|
|
15913
16122
|
name: "status",
|
|
15914
16123
|
description: "Checks systemd service status.",
|
|
15915
16124
|
inputSchema: SystemdStatusInputSchema,
|
|
@@ -15939,7 +16148,7 @@ var TemplateWriteOutputSchema = z.object({
|
|
|
15939
16148
|
path: z.string()
|
|
15940
16149
|
});
|
|
15941
16150
|
async function runFn3(context) {
|
|
15942
|
-
const { params, warn, error, debug, run:
|
|
16151
|
+
const { params, warn, error, debug, run: run253, file, exec } = context;
|
|
15943
16152
|
const { template, template_file, variables, to, mode, owner, group, sudo } = params;
|
|
15944
16153
|
let templateContent = template;
|
|
15945
16154
|
if (template && template_file) {
|
|
@@ -15994,7 +16203,7 @@ EOF`;
|
|
|
15994
16203
|
debug(`Setting mode ${mode} for ${outputPath}`);
|
|
15995
16204
|
try {
|
|
15996
16205
|
const chmodParams = { path: outputPath, mode, sudo };
|
|
15997
|
-
const chmodResult = await
|
|
16206
|
+
const chmodResult = await run253(chmod_default(chmodParams));
|
|
15998
16207
|
if (chmodResult instanceof Error) {
|
|
15999
16208
|
error(`Error setting mode for ${outputPath}: ${chmodResult.message}`);
|
|
16000
16209
|
overallSuccess = false;
|
|
@@ -16020,7 +16229,7 @@ EOF`;
|
|
|
16020
16229
|
if (group) {
|
|
16021
16230
|
chownTaskParams.group = group;
|
|
16022
16231
|
}
|
|
16023
|
-
const chownResult = await
|
|
16232
|
+
const chownResult = await run253(chown_default(chownTaskParams));
|
|
16024
16233
|
if (chownResult instanceof Error) {
|
|
16025
16234
|
error(`Error setting owner/group for ${outputPath}: ${chownResult.message}`);
|
|
16026
16235
|
overallSuccess = false;
|
|
@@ -16080,7 +16289,7 @@ var UfwAllowOutputSchema = z.object({
|
|
|
16080
16289
|
error: z.string().optional()
|
|
16081
16290
|
})
|
|
16082
16291
|
);
|
|
16083
|
-
async function
|
|
16292
|
+
async function run124(context) {
|
|
16084
16293
|
const { params, exec, info } = context;
|
|
16085
16294
|
const { port, proto = "tcp", from } = params;
|
|
16086
16295
|
if (!port) {
|
|
@@ -16111,7 +16320,7 @@ async function run123(context) {
|
|
|
16111
16320
|
return { success: false, error };
|
|
16112
16321
|
}
|
|
16113
16322
|
}
|
|
16114
|
-
var allow_default = task(
|
|
16323
|
+
var allow_default = task(run124, {
|
|
16115
16324
|
description: "Allows a port through UFW firewall.",
|
|
16116
16325
|
inputSchema: UfwAllowInputSchema,
|
|
16117
16326
|
outputSchema: UfwAllowOutputSchema
|
|
@@ -16132,7 +16341,7 @@ var UfwDenyOutputSchema = z.object({
|
|
|
16132
16341
|
error: z.string().optional()
|
|
16133
16342
|
})
|
|
16134
16343
|
);
|
|
16135
|
-
async function
|
|
16344
|
+
async function run125(context) {
|
|
16136
16345
|
const { params, exec, error, info } = context;
|
|
16137
16346
|
const { port, proto = "tcp", from } = params;
|
|
16138
16347
|
if (!port) {
|
|
@@ -16163,7 +16372,7 @@ async function run124(context) {
|
|
|
16163
16372
|
};
|
|
16164
16373
|
}
|
|
16165
16374
|
}
|
|
16166
|
-
var deny_default = task(
|
|
16375
|
+
var deny_default = task(run125, {
|
|
16167
16376
|
name: "deny",
|
|
16168
16377
|
description: "Ufw deny.",
|
|
16169
16378
|
inputSchema: UfwDenyInputSchema,
|
|
@@ -16182,7 +16391,7 @@ var UfwDeleteOutputSchema = z.object({
|
|
|
16182
16391
|
error: z.string().optional()
|
|
16183
16392
|
})
|
|
16184
16393
|
);
|
|
16185
|
-
async function
|
|
16394
|
+
async function run126(context) {
|
|
16186
16395
|
const { params, exec, error } = context;
|
|
16187
16396
|
const { rule_number } = params;
|
|
16188
16397
|
if (!rule_number || rule_number <= 0) {
|
|
@@ -16204,7 +16413,7 @@ async function run125(context) {
|
|
|
16204
16413
|
};
|
|
16205
16414
|
}
|
|
16206
16415
|
}
|
|
16207
|
-
var delete_default4 = task(
|
|
16416
|
+
var delete_default4 = task(run126, {
|
|
16208
16417
|
name: "delete",
|
|
16209
16418
|
description: "Ufw delete.",
|
|
16210
16419
|
inputSchema: UfwDeleteInputSchema,
|
|
@@ -16217,7 +16426,7 @@ var UfwDisableOutputSchema = z.object({
|
|
|
16217
16426
|
success: z.boolean(),
|
|
16218
16427
|
error: z.string().optional()
|
|
16219
16428
|
});
|
|
16220
|
-
async function
|
|
16429
|
+
async function run127(context) {
|
|
16221
16430
|
const { exec, error } = context;
|
|
16222
16431
|
try {
|
|
16223
16432
|
const result = await exec(["ufw", "disable"], { sudo: true });
|
|
@@ -16233,7 +16442,7 @@ async function run126(context) {
|
|
|
16233
16442
|
return { success: false, error: errorMsg };
|
|
16234
16443
|
}
|
|
16235
16444
|
}
|
|
16236
|
-
var disable_default2 = task(
|
|
16445
|
+
var disable_default2 = task(run127, {
|
|
16237
16446
|
description: "Disables UFW firewall.",
|
|
16238
16447
|
inputSchema: UfwDisableInputSchema,
|
|
16239
16448
|
outputSchema: UfwDisableOutputSchema
|
|
@@ -16245,7 +16454,7 @@ var UfwEnableOutputSchema = z.object({
|
|
|
16245
16454
|
success: z.boolean(),
|
|
16246
16455
|
error: z.string().optional()
|
|
16247
16456
|
});
|
|
16248
|
-
async function
|
|
16457
|
+
async function run128(context) {
|
|
16249
16458
|
const { exec, error } = context;
|
|
16250
16459
|
try {
|
|
16251
16460
|
const result = await exec(["ufw", "--force", "enable"], { sudo: true });
|
|
@@ -16261,7 +16470,7 @@ async function run127(context) {
|
|
|
16261
16470
|
return { success: false, error: errorMsg };
|
|
16262
16471
|
}
|
|
16263
16472
|
}
|
|
16264
|
-
var enable_default2 = task(
|
|
16473
|
+
var enable_default2 = task(run128, {
|
|
16265
16474
|
description: "Enables UFW firewall.",
|
|
16266
16475
|
inputSchema: UfwEnableInputSchema,
|
|
16267
16476
|
outputSchema: UfwEnableOutputSchema
|
|
@@ -16277,7 +16486,7 @@ var UfwInstallOutputSchema = z.object({
|
|
|
16277
16486
|
error: z.string().optional()
|
|
16278
16487
|
})
|
|
16279
16488
|
);
|
|
16280
|
-
async function
|
|
16489
|
+
async function run129(context) {
|
|
16281
16490
|
const { run: runTask, error } = context;
|
|
16282
16491
|
try {
|
|
16283
16492
|
const installResult = await runTask(install_default5({ package: "ufw", sudo: true }));
|
|
@@ -16296,7 +16505,7 @@ async function run128(context) {
|
|
|
16296
16505
|
};
|
|
16297
16506
|
}
|
|
16298
16507
|
}
|
|
16299
|
-
var install_default7 = task(
|
|
16508
|
+
var install_default7 = task(run129, {
|
|
16300
16509
|
name: "install",
|
|
16301
16510
|
description: "Ufw install.",
|
|
16302
16511
|
inputSchema: UfwInstallInputSchema,
|
|
@@ -16316,7 +16525,7 @@ var UfwLoggingOutputSchema = z.object({
|
|
|
16316
16525
|
error: z.string().optional()
|
|
16317
16526
|
})
|
|
16318
16527
|
);
|
|
16319
|
-
async function
|
|
16528
|
+
async function run130(context) {
|
|
16320
16529
|
const { params, exec, log } = context;
|
|
16321
16530
|
const level = params.level || "on";
|
|
16322
16531
|
try {
|
|
@@ -16333,7 +16542,7 @@ async function run129(context) {
|
|
|
16333
16542
|
return { success: false, error };
|
|
16334
16543
|
}
|
|
16335
16544
|
}
|
|
16336
|
-
var logging_default = task(
|
|
16545
|
+
var logging_default = task(run130, {
|
|
16337
16546
|
description: "Configures UFW logging",
|
|
16338
16547
|
inputSchema: UfwLoggingInputSchema,
|
|
16339
16548
|
outputSchema: UfwLoggingOutputSchema
|
|
@@ -16349,7 +16558,7 @@ var UfwReloadOutputSchema = z.object({
|
|
|
16349
16558
|
error: z.string().optional()
|
|
16350
16559
|
})
|
|
16351
16560
|
);
|
|
16352
|
-
async function
|
|
16561
|
+
async function run131(context) {
|
|
16353
16562
|
const { exec, error } = context;
|
|
16354
16563
|
try {
|
|
16355
16564
|
const { success } = await exec(["sudo", "ufw", "reload"], { sudo: true });
|
|
@@ -16361,7 +16570,7 @@ async function run130(context) {
|
|
|
16361
16570
|
};
|
|
16362
16571
|
}
|
|
16363
16572
|
}
|
|
16364
|
-
var reload_default2 = task(
|
|
16573
|
+
var reload_default2 = task(run131, {
|
|
16365
16574
|
name: "reload",
|
|
16366
16575
|
description: "Ufw reload.",
|
|
16367
16576
|
inputSchema: UfwReloadInputSchema,
|
|
@@ -16379,7 +16588,7 @@ var UfwResetOutputSchema = z.object({
|
|
|
16379
16588
|
error: z.string().optional()
|
|
16380
16589
|
})
|
|
16381
16590
|
);
|
|
16382
|
-
async function
|
|
16591
|
+
async function run132(context) {
|
|
16383
16592
|
const { exec, error, info } = context;
|
|
16384
16593
|
try {
|
|
16385
16594
|
const command = ["ufw", "--force", "reset"];
|
|
@@ -16400,7 +16609,7 @@ async function run131(context) {
|
|
|
16400
16609
|
return { success: false, error: errorMsg };
|
|
16401
16610
|
}
|
|
16402
16611
|
}
|
|
16403
|
-
var reset_default = task(
|
|
16612
|
+
var reset_default = task(run132, {
|
|
16404
16613
|
name: "reset",
|
|
16405
16614
|
description: "Resets UFW firewall to default state.",
|
|
16406
16615
|
inputSchema: UfwResetInputSchema,
|
|
@@ -16423,7 +16632,7 @@ var UfwStatusOutputSchema = z.object({
|
|
|
16423
16632
|
rules: z.array(UfwRuleSchema).optional(),
|
|
16424
16633
|
error: z.string().optional()
|
|
16425
16634
|
});
|
|
16426
|
-
async function
|
|
16635
|
+
async function run133(context) {
|
|
16427
16636
|
const { exec, error } = context;
|
|
16428
16637
|
try {
|
|
16429
16638
|
const result = await exec(["ufw", "status", "numbered"], { sudo: true });
|
|
@@ -16478,7 +16687,7 @@ async function run132(context) {
|
|
|
16478
16687
|
return { success: false, error: errorMsg };
|
|
16479
16688
|
}
|
|
16480
16689
|
}
|
|
16481
|
-
var status_default2 = task(
|
|
16690
|
+
var status_default2 = task(run133, {
|
|
16482
16691
|
description: "Gets UFW firewall status with numbered rules.",
|
|
16483
16692
|
inputSchema: UfwStatusInputSchema,
|
|
16484
16693
|
outputSchema: UfwStatusOutputSchema
|
|
@@ -16517,7 +16726,7 @@ var AddGroupsOutputSchema = z.object({
|
|
|
16517
16726
|
error: z.string().optional()
|
|
16518
16727
|
})
|
|
16519
16728
|
);
|
|
16520
|
-
async function
|
|
16729
|
+
async function run134(context) {
|
|
16521
16730
|
const { params, exec } = context;
|
|
16522
16731
|
const { user, groups, sudo = true } = params;
|
|
16523
16732
|
const normalizedGroups = Array.isArray(groups) ? groups : typeof groups === "string" ? groups.split(",").map((group) => group.trim()).filter(Boolean) : [];
|
|
@@ -16532,7 +16741,7 @@ async function run133(context) {
|
|
|
16532
16741
|
error: success ? void 0 : stderr || stdout
|
|
16533
16742
|
};
|
|
16534
16743
|
}
|
|
16535
|
-
var add_groups_default = task(
|
|
16744
|
+
var add_groups_default = task(run134, {
|
|
16536
16745
|
name: "add_groups",
|
|
16537
16746
|
description: "User add groups.",
|
|
16538
16747
|
inputSchema: AddGroupsInputSchema,
|
|
@@ -16552,7 +16761,7 @@ var GetGidOutputSchema = z.object({
|
|
|
16552
16761
|
gid: z.string().optional()
|
|
16553
16762
|
})
|
|
16554
16763
|
);
|
|
16555
|
-
async function
|
|
16764
|
+
async function run135(context) {
|
|
16556
16765
|
const { params, exec } = context;
|
|
16557
16766
|
const { user } = params;
|
|
16558
16767
|
const command = ["id", "-g", user].filter(Boolean).join(" ");
|
|
@@ -16562,7 +16771,7 @@ async function run134(context) {
|
|
|
16562
16771
|
gid: gid.trim()
|
|
16563
16772
|
};
|
|
16564
16773
|
}
|
|
16565
|
-
var get_gid_default = task(
|
|
16774
|
+
var get_gid_default = task(run135, {
|
|
16566
16775
|
name: "get_gid",
|
|
16567
16776
|
description: "User get gid.",
|
|
16568
16777
|
inputSchema: GetGidInputSchema,
|
|
@@ -16582,7 +16791,7 @@ var GetGroupsOutputSchema = z.object({
|
|
|
16582
16791
|
groups: z.array(z.string()).optional()
|
|
16583
16792
|
})
|
|
16584
16793
|
);
|
|
16585
|
-
async function
|
|
16794
|
+
async function run136(context) {
|
|
16586
16795
|
const { params, exec } = context;
|
|
16587
16796
|
const { user } = params;
|
|
16588
16797
|
const command = ["groups", user].filter(Boolean).join(" ");
|
|
@@ -16599,7 +16808,7 @@ async function run135(context) {
|
|
|
16599
16808
|
groups
|
|
16600
16809
|
};
|
|
16601
16810
|
}
|
|
16602
|
-
var get_groups_default = task(
|
|
16811
|
+
var get_groups_default = task(run136, {
|
|
16603
16812
|
name: "get_groups",
|
|
16604
16813
|
description: "User get groups.",
|
|
16605
16814
|
inputSchema: GetGroupsInputSchema,
|
|
@@ -16619,7 +16828,7 @@ var GetUidOutputSchema = z.object({
|
|
|
16619
16828
|
uid: z.string().optional()
|
|
16620
16829
|
})
|
|
16621
16830
|
);
|
|
16622
|
-
async function
|
|
16831
|
+
async function run137(context) {
|
|
16623
16832
|
const { params, exec } = context;
|
|
16624
16833
|
const { user } = params;
|
|
16625
16834
|
const command = ["id", "-u", user].filter(Boolean).join(" ");
|
|
@@ -16629,7 +16838,7 @@ async function run136(context) {
|
|
|
16629
16838
|
uid: uid.trim()
|
|
16630
16839
|
};
|
|
16631
16840
|
}
|
|
16632
|
-
var get_uid_default = task(
|
|
16841
|
+
var get_uid_default = task(run137, {
|
|
16633
16842
|
name: "get_uid",
|
|
16634
16843
|
description: "User get uid.",
|
|
16635
16844
|
inputSchema: GetUidInputSchema,
|
|
@@ -16650,7 +16859,7 @@ var SetUserGroupsOutputSchema = z.object({
|
|
|
16650
16859
|
error: z.string().optional()
|
|
16651
16860
|
})
|
|
16652
16861
|
);
|
|
16653
|
-
async function
|
|
16862
|
+
async function run138(context) {
|
|
16654
16863
|
const { params, exec } = context;
|
|
16655
16864
|
const { user, groups, sudo = true } = params;
|
|
16656
16865
|
const normalizedGroups = Array.isArray(groups) ? groups : typeof groups === "string" ? groups.split(",").map((group) => group.trim()).filter(Boolean) : [];
|
|
@@ -16665,7 +16874,7 @@ async function run137(context) {
|
|
|
16665
16874
|
error: success ? void 0 : stderr || stdout
|
|
16666
16875
|
};
|
|
16667
16876
|
}
|
|
16668
|
-
var set_groups_default = task(
|
|
16877
|
+
var set_groups_default = task(run138, {
|
|
16669
16878
|
name: "set_groups",
|
|
16670
16879
|
description: "User set groups.",
|
|
16671
16880
|
inputSchema: SetUserGroupsInputSchema,
|
|
@@ -16686,7 +16895,7 @@ var SetUserShellOutputSchema = z.object({
|
|
|
16686
16895
|
error: z.string().optional()
|
|
16687
16896
|
})
|
|
16688
16897
|
);
|
|
16689
|
-
async function
|
|
16898
|
+
async function run139(context) {
|
|
16690
16899
|
const { params, exec } = context;
|
|
16691
16900
|
const { user, shell, sudo = true } = params;
|
|
16692
16901
|
const command = [sudo ? "sudo" : "", "usermod", "-s", shell, user].filter(Boolean).join(" ");
|
|
@@ -16696,7 +16905,7 @@ async function run138(context) {
|
|
|
16696
16905
|
error: success ? void 0 : stderr || stdout
|
|
16697
16906
|
};
|
|
16698
16907
|
}
|
|
16699
|
-
var set_shell_default = task(
|
|
16908
|
+
var set_shell_default = task(run139, {
|
|
16700
16909
|
name: "set_shell",
|
|
16701
16910
|
description: "User set shell.",
|
|
16702
16911
|
inputSchema: SetUserShellInputSchema,
|
|
@@ -16715,8 +16924,8 @@ var UserDeleteOutputSchema = z.object({
|
|
|
16715
16924
|
success: z.boolean(),
|
|
16716
16925
|
error: z.string().optional()
|
|
16717
16926
|
});
|
|
16718
|
-
async function
|
|
16719
|
-
const { params, debug, exec, run:
|
|
16927
|
+
async function run140(context) {
|
|
16928
|
+
const { params, debug, exec, run: run253, error } = context;
|
|
16720
16929
|
const { user, remove: remove4 = false, sudo = true } = params;
|
|
16721
16930
|
if (!user) {
|
|
16722
16931
|
error('Required parameter "user" is missing');
|
|
@@ -16726,7 +16935,7 @@ async function run139(context) {
|
|
|
16726
16935
|
};
|
|
16727
16936
|
}
|
|
16728
16937
|
try {
|
|
16729
|
-
const { exists: userExists } = await
|
|
16938
|
+
const { exists: userExists } = await run253(exists_default4({ user }));
|
|
16730
16939
|
if (!userExists) {
|
|
16731
16940
|
debug(`User '${user}' does not exist, considering task successful (idempotent).`);
|
|
16732
16941
|
return { success: true };
|
|
@@ -16754,7 +16963,7 @@ async function run139(context) {
|
|
|
16754
16963
|
};
|
|
16755
16964
|
}
|
|
16756
16965
|
}
|
|
16757
|
-
var delete_default5 = task(
|
|
16966
|
+
var delete_default5 = task(run140, {
|
|
16758
16967
|
description: "Deletes a user from the system idempotently",
|
|
16759
16968
|
inputSchema: UserDeleteInputSchema,
|
|
16760
16969
|
outputSchema: UserDeleteOutputSchema
|
|
@@ -16784,7 +16993,7 @@ var ModifyUserOutputSchema = z.object({
|
|
|
16784
16993
|
error: z.string().optional()
|
|
16785
16994
|
})
|
|
16786
16995
|
);
|
|
16787
|
-
async function
|
|
16996
|
+
async function run141(context) {
|
|
16788
16997
|
const { params, exec, run: runTask, error } = context;
|
|
16789
16998
|
const {
|
|
16790
16999
|
user,
|
|
@@ -16843,7 +17052,7 @@ async function run140(context) {
|
|
|
16843
17052
|
};
|
|
16844
17053
|
}
|
|
16845
17054
|
}
|
|
16846
|
-
var modify_default2 = task(
|
|
17055
|
+
var modify_default2 = task(run141, {
|
|
16847
17056
|
name: "modify",
|
|
16848
17057
|
description: "Modify an existing user account.",
|
|
16849
17058
|
inputSchema: ModifyUserInputSchema,
|
|
@@ -17128,7 +17337,7 @@ var XcpngAttachVdiResultSchema = z.object({
|
|
|
17128
17337
|
plugged: z.boolean().optional(),
|
|
17129
17338
|
error: z.string().optional()
|
|
17130
17339
|
});
|
|
17131
|
-
async function
|
|
17340
|
+
async function run142(context) {
|
|
17132
17341
|
const { params, error, debug } = context;
|
|
17133
17342
|
const { vm_uuid, vdi_uuid, device = "0", mode = "RW", bootable: rawBootable = false } = params;
|
|
17134
17343
|
if (!vm_uuid) {
|
|
@@ -17187,7 +17396,7 @@ async function run141(context) {
|
|
|
17187
17396
|
plugged: true
|
|
17188
17397
|
};
|
|
17189
17398
|
}
|
|
17190
|
-
var attach_vdi_default = task(
|
|
17399
|
+
var attach_vdi_default = task(run142, {
|
|
17191
17400
|
inputSchema: XcpngAttachVdiParamsSchema,
|
|
17192
17401
|
outputSchema: XcpngAttachVdiResultSchema,
|
|
17193
17402
|
description: "Attaches an existing virtual disk image to a VM and plugs it into the guest."
|
|
@@ -17251,7 +17460,7 @@ var XcpngCreateVdiResultSchema = z.object({
|
|
|
17251
17460
|
command: z.string().optional(),
|
|
17252
17461
|
error: z.string().optional()
|
|
17253
17462
|
});
|
|
17254
|
-
async function
|
|
17463
|
+
async function run143(context) {
|
|
17255
17464
|
const { params, error } = context;
|
|
17256
17465
|
const { name_label, sr_uuid, size_bytes, size_mb, size_gb, description, type = "user", shareable = false } = params;
|
|
17257
17466
|
if (!name_label) {
|
|
@@ -17304,7 +17513,7 @@ async function run142(context) {
|
|
|
17304
17513
|
command: result.command
|
|
17305
17514
|
};
|
|
17306
17515
|
}
|
|
17307
|
-
var create_vdi_default = task(
|
|
17516
|
+
var create_vdi_default = task(run143, {
|
|
17308
17517
|
inputSchema: XcpngCreateVdiParamsSchema,
|
|
17309
17518
|
outputSchema: XcpngCreateVdiResultSchema,
|
|
17310
17519
|
description: "Creates a new virtual disk image on the specified XCP-ng storage repository."
|
|
@@ -17319,7 +17528,7 @@ var XcpngListSrParamsResultSchema = z.object({
|
|
|
17319
17528
|
items: z.any().optional(),
|
|
17320
17529
|
error: z.string().optional()
|
|
17321
17530
|
});
|
|
17322
|
-
async function
|
|
17531
|
+
async function run144(context) {
|
|
17323
17532
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
17324
17533
|
const result = await runXeCommand(context, "sr-param-list", filters);
|
|
17325
17534
|
if (!result.success) {
|
|
@@ -17333,7 +17542,7 @@ async function run143(context) {
|
|
|
17333
17542
|
items: parseKeyValueOutput(result.stdout)
|
|
17334
17543
|
};
|
|
17335
17544
|
}
|
|
17336
|
-
var list_sr_params_default = task(
|
|
17545
|
+
var list_sr_params_default = task(run144, {
|
|
17337
17546
|
inputSchema: XcpngListSrParamsParamsSchema,
|
|
17338
17547
|
outputSchema: XcpngListSrParamsResultSchema,
|
|
17339
17548
|
description: "Lists parameters for storage repositories (SRs) on an XCP-ng host."
|
|
@@ -17348,7 +17557,7 @@ var XcpngListStorageRepositoriesResultSchema = z.object({
|
|
|
17348
17557
|
items: z.array(z.any()).optional(),
|
|
17349
17558
|
error: z.string().optional()
|
|
17350
17559
|
});
|
|
17351
|
-
async function
|
|
17560
|
+
async function run145(context) {
|
|
17352
17561
|
const { params } = context;
|
|
17353
17562
|
const filters = normalizeFilterArgs(params?.filters);
|
|
17354
17563
|
const result = await runXeCommand(context, "sr-list", filters);
|
|
@@ -17397,7 +17606,7 @@ async function run144(context) {
|
|
|
17397
17606
|
items: enrichedItems
|
|
17398
17607
|
};
|
|
17399
17608
|
}
|
|
17400
|
-
var list_storage_repositories_default = task(
|
|
17609
|
+
var list_storage_repositories_default = task(run145, {
|
|
17401
17610
|
inputSchema: XcpngListStorageRepositoriesParamsSchema,
|
|
17402
17611
|
outputSchema: XcpngListStorageRepositoriesResultSchema,
|
|
17403
17612
|
description: "Lists storage repositories on an XCP-ng host."
|
|
@@ -17420,7 +17629,7 @@ var XcpngFindStorageRepositoryResultSchema = z.object({
|
|
|
17420
17629
|
multiple: z.boolean().optional(),
|
|
17421
17630
|
error: z.string().optional()
|
|
17422
17631
|
});
|
|
17423
|
-
async function
|
|
17632
|
+
async function run146(context) {
|
|
17424
17633
|
const params = context.params ?? {};
|
|
17425
17634
|
const {
|
|
17426
17635
|
name_label: nameLabel,
|
|
@@ -17540,7 +17749,7 @@ async function runListStorageRepositories(context, params) {
|
|
|
17540
17749
|
})
|
|
17541
17750
|
);
|
|
17542
17751
|
}
|
|
17543
|
-
var find_storage_repository_default = task(
|
|
17752
|
+
var find_storage_repository_default = task(run146, {
|
|
17544
17753
|
inputSchema: XcpngFindStorageRepositoryParamsSchema,
|
|
17545
17754
|
outputSchema: XcpngFindStorageRepositoryResultSchema,
|
|
17546
17755
|
description: "Finds a single storage repository on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -17573,7 +17782,7 @@ var XcpngAddDiskResultSchema = z.object({
|
|
|
17573
17782
|
plugged: z.boolean().optional(),
|
|
17574
17783
|
error: z.string().optional()
|
|
17575
17784
|
});
|
|
17576
|
-
async function
|
|
17785
|
+
async function run147(context) {
|
|
17577
17786
|
const { params, error } = context;
|
|
17578
17787
|
const {
|
|
17579
17788
|
vm_uuid: vmUuid,
|
|
@@ -17706,7 +17915,7 @@ async function destroyVdi(context, vdiUuid, appliedCommands) {
|
|
|
17706
17915
|
context.warn(`Failed to clean up VDI ${vdiUuid}: ${xeErrorMessage(result, "unknown error")}`);
|
|
17707
17916
|
}
|
|
17708
17917
|
}
|
|
17709
|
-
var add_disk_default = task(
|
|
17918
|
+
var add_disk_default = task(run147, {
|
|
17710
17919
|
inputSchema: XcpngAddDiskParamsSchema,
|
|
17711
17920
|
outputSchema: XcpngAddDiskResultSchema,
|
|
17712
17921
|
description: "Creates a VDI and attaches it to a VM on XCP-ng."
|
|
@@ -17725,7 +17934,7 @@ var XcpngAttachIsoResultSchema = z.object({
|
|
|
17725
17934
|
plugged: z.boolean().optional(),
|
|
17726
17935
|
error: z.string().optional()
|
|
17727
17936
|
});
|
|
17728
|
-
async function
|
|
17937
|
+
async function run148(context) {
|
|
17729
17938
|
const { params, error, debug } = context;
|
|
17730
17939
|
const { vm_uuid, iso_vdi_uuid, device, eject_before_insert = true } = params;
|
|
17731
17940
|
if (!vm_uuid) {
|
|
@@ -17818,7 +18027,7 @@ async function run147(context) {
|
|
|
17818
18027
|
plugged
|
|
17819
18028
|
};
|
|
17820
18029
|
}
|
|
17821
|
-
var attach_iso_default = task(
|
|
18030
|
+
var attach_iso_default = task(run148, {
|
|
17822
18031
|
inputSchema: XcpngAttachIsoParamsSchema,
|
|
17823
18032
|
outputSchema: XcpngAttachIsoResultSchema,
|
|
17824
18033
|
description: "Attaches an ISO image to a VM by invoking xe vm-cd-insert, ejecting existing media if requested."
|
|
@@ -17839,7 +18048,7 @@ var XcpngAttachNetworkInterfaceResultSchema = z.object({
|
|
|
17839
18048
|
plugged: z.boolean().optional(),
|
|
17840
18049
|
error: z.string().optional()
|
|
17841
18050
|
});
|
|
17842
|
-
async function
|
|
18051
|
+
async function run149(context) {
|
|
17843
18052
|
const { params, error, debug } = context;
|
|
17844
18053
|
const { vm_uuid, network_uuid, device = "0", mac_address, mtu } = params;
|
|
17845
18054
|
if (!vm_uuid) {
|
|
@@ -17904,7 +18113,7 @@ async function run148(context) {
|
|
|
17904
18113
|
plugged: true
|
|
17905
18114
|
};
|
|
17906
18115
|
}
|
|
17907
|
-
var attach_network_interface_default = task(
|
|
18116
|
+
var attach_network_interface_default = task(run149, {
|
|
17908
18117
|
inputSchema: XcpngAttachNetworkInterfaceParamsSchema,
|
|
17909
18118
|
outputSchema: XcpngAttachNetworkInterfaceResultSchema,
|
|
17910
18119
|
description: "Creates and plugs a virtual network interface for a VM on XCP-ng."
|
|
@@ -17919,7 +18128,7 @@ var XcpngListTemplateParamsResultSchema = z.object({
|
|
|
17919
18128
|
items: z.any().optional(),
|
|
17920
18129
|
error: z.string().optional()
|
|
17921
18130
|
});
|
|
17922
|
-
async function
|
|
18131
|
+
async function run150(context) {
|
|
17923
18132
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
17924
18133
|
const result = await runXeCommand(context, "template-param-list", filters);
|
|
17925
18134
|
if (!result.success) {
|
|
@@ -17933,7 +18142,7 @@ async function run149(context) {
|
|
|
17933
18142
|
items: parseKeyValueOutput(result.stdout)
|
|
17934
18143
|
};
|
|
17935
18144
|
}
|
|
17936
|
-
var list_template_params_default = task(
|
|
18145
|
+
var list_template_params_default = task(run150, {
|
|
17937
18146
|
inputSchema: XcpngListTemplateParamsParamsSchema,
|
|
17938
18147
|
outputSchema: XcpngListTemplateParamsResultSchema,
|
|
17939
18148
|
description: "Lists parameters for templates on an XCP-ng host."
|
|
@@ -17948,7 +18157,7 @@ var XcpngListTemplatesResultSchema = z.object({
|
|
|
17948
18157
|
items: z.array(z.any()).optional(),
|
|
17949
18158
|
error: z.string().optional()
|
|
17950
18159
|
});
|
|
17951
|
-
async function
|
|
18160
|
+
async function run151(context) {
|
|
17952
18161
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
17953
18162
|
const result = await runXeCommand(context, "template-list", filters);
|
|
17954
18163
|
if (!result.success) {
|
|
@@ -17998,7 +18207,7 @@ async function run150(context) {
|
|
|
17998
18207
|
items: enriched
|
|
17999
18208
|
};
|
|
18000
18209
|
}
|
|
18001
|
-
var list_templates_default = task(
|
|
18210
|
+
var list_templates_default = task(run151, {
|
|
18002
18211
|
inputSchema: XcpngListTemplatesParamsSchema,
|
|
18003
18212
|
outputSchema: XcpngListTemplatesResultSchema,
|
|
18004
18213
|
description: "Lists VM templates available on the XCP-ng host."
|
|
@@ -18019,7 +18228,7 @@ var XcpngFindTemplateResultSchema = z.object({
|
|
|
18019
18228
|
multiple: z.boolean().optional(),
|
|
18020
18229
|
error: z.string().optional()
|
|
18021
18230
|
});
|
|
18022
|
-
async function
|
|
18231
|
+
async function run152(context) {
|
|
18023
18232
|
const params = context.params ?? {};
|
|
18024
18233
|
const {
|
|
18025
18234
|
name_label: nameLabel,
|
|
@@ -18117,7 +18326,7 @@ async function runListTemplates(context, params) {
|
|
|
18117
18326
|
})
|
|
18118
18327
|
);
|
|
18119
18328
|
}
|
|
18120
|
-
var find_template_default = task(
|
|
18329
|
+
var find_template_default = task(run152, {
|
|
18121
18330
|
inputSchema: XcpngFindTemplateParamsSchema,
|
|
18122
18331
|
outputSchema: XcpngFindTemplateResultSchema,
|
|
18123
18332
|
description: "Finds a single template on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -18142,7 +18351,7 @@ var XcpngCloneTemplateResultSchema = z.object({
|
|
|
18142
18351
|
alreadyExists: z.boolean().optional(),
|
|
18143
18352
|
error: z.string().optional()
|
|
18144
18353
|
});
|
|
18145
|
-
async function
|
|
18354
|
+
async function run153(context) {
|
|
18146
18355
|
const { params, error } = context;
|
|
18147
18356
|
const {
|
|
18148
18357
|
source_template_uuid: sourceTemplateUuidParam,
|
|
@@ -18262,7 +18471,7 @@ async function run152(context) {
|
|
|
18262
18471
|
appliedCommands
|
|
18263
18472
|
};
|
|
18264
18473
|
}
|
|
18265
|
-
var clone_template_default = task(
|
|
18474
|
+
var clone_template_default = task(run153, {
|
|
18266
18475
|
inputSchema: XcpngCloneTemplateParamsSchema,
|
|
18267
18476
|
outputSchema: XcpngCloneTemplateResultSchema,
|
|
18268
18477
|
description: "Clones an existing XCP-ng template to a new template name."
|
|
@@ -18277,7 +18486,7 @@ var XcpngListHostsResultSchema = z.object({
|
|
|
18277
18486
|
items: z.any().optional(),
|
|
18278
18487
|
error: z.string().optional()
|
|
18279
18488
|
});
|
|
18280
|
-
async function
|
|
18489
|
+
async function run154(context) {
|
|
18281
18490
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18282
18491
|
const result = await runXeCommand(context, "host-list", filters);
|
|
18283
18492
|
if (!result.success) {
|
|
@@ -18291,7 +18500,7 @@ async function run153(context) {
|
|
|
18291
18500
|
items: parseKeyValueOutput(result.stdout)
|
|
18292
18501
|
};
|
|
18293
18502
|
}
|
|
18294
|
-
var list_hosts_default = task(
|
|
18503
|
+
var list_hosts_default = task(run154, {
|
|
18295
18504
|
inputSchema: XcpngListHostsParamsSchema,
|
|
18296
18505
|
outputSchema: XcpngListHostsResultSchema,
|
|
18297
18506
|
description: "Lists hosts in an XCP-ng pool, returning parsed xe host-list output."
|
|
@@ -18312,7 +18521,7 @@ var XcpngFindHostResultSchema = z.object({
|
|
|
18312
18521
|
multiple: z.boolean().optional(),
|
|
18313
18522
|
error: z.string().optional()
|
|
18314
18523
|
});
|
|
18315
|
-
async function
|
|
18524
|
+
async function run155(context) {
|
|
18316
18525
|
const params = context.params ?? {};
|
|
18317
18526
|
const {
|
|
18318
18527
|
name_label: nameLabel,
|
|
@@ -18412,7 +18621,7 @@ async function runListHosts(context, params) {
|
|
|
18412
18621
|
})
|
|
18413
18622
|
);
|
|
18414
18623
|
}
|
|
18415
|
-
var find_host_default = task(
|
|
18624
|
+
var find_host_default = task(run155, {
|
|
18416
18625
|
inputSchema: XcpngFindHostParamsSchema,
|
|
18417
18626
|
outputSchema: XcpngFindHostResultSchema,
|
|
18418
18627
|
description: "Finds a single host on an XCP-ng pool, optionally allowing multiple matches."
|
|
@@ -18427,7 +18636,7 @@ var XcpngListNetworkParamsResultSchema = z.object({
|
|
|
18427
18636
|
items: z.any().optional(),
|
|
18428
18637
|
error: z.string().optional()
|
|
18429
18638
|
});
|
|
18430
|
-
async function
|
|
18639
|
+
async function run156(context) {
|
|
18431
18640
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18432
18641
|
const result = await runXeCommand(context, "network-param-list", filters);
|
|
18433
18642
|
if (!result.success) {
|
|
@@ -18441,7 +18650,7 @@ async function run155(context) {
|
|
|
18441
18650
|
items: parseKeyValueOutput(result.stdout)
|
|
18442
18651
|
};
|
|
18443
18652
|
}
|
|
18444
|
-
var list_network_params_default = task(
|
|
18653
|
+
var list_network_params_default = task(run156, {
|
|
18445
18654
|
inputSchema: XcpngListNetworkParamsParamsSchema,
|
|
18446
18655
|
outputSchema: XcpngListNetworkParamsResultSchema,
|
|
18447
18656
|
description: "Lists parameters for networks on an XCP-ng host."
|
|
@@ -18456,7 +18665,7 @@ var XcpngListNetworksResultSchema = z.object({
|
|
|
18456
18665
|
items: z.array(z.any()).optional(),
|
|
18457
18666
|
error: z.string().optional()
|
|
18458
18667
|
});
|
|
18459
|
-
async function
|
|
18668
|
+
async function run157(context) {
|
|
18460
18669
|
const { params } = context;
|
|
18461
18670
|
const filters = normalizeFilterArgs(params?.filters);
|
|
18462
18671
|
const result = await runXeCommand(context, "network-list", filters);
|
|
@@ -18505,7 +18714,7 @@ async function run156(context) {
|
|
|
18505
18714
|
items: enrichedItems
|
|
18506
18715
|
};
|
|
18507
18716
|
}
|
|
18508
|
-
var list_networks_default = task(
|
|
18717
|
+
var list_networks_default = task(run157, {
|
|
18509
18718
|
inputSchema: XcpngListNetworksParamsSchema,
|
|
18510
18719
|
outputSchema: XcpngListNetworksResultSchema,
|
|
18511
18720
|
description: "Lists networks on an XCP-ng host."
|
|
@@ -18526,7 +18735,7 @@ var XcpngFindNetworkResultSchema = z.object({
|
|
|
18526
18735
|
multiple: z.boolean().optional(),
|
|
18527
18736
|
error: z.string().optional()
|
|
18528
18737
|
});
|
|
18529
|
-
async function
|
|
18738
|
+
async function run158(context) {
|
|
18530
18739
|
const params = context.params ?? {};
|
|
18531
18740
|
const {
|
|
18532
18741
|
name_label: nameLabel,
|
|
@@ -18617,7 +18826,7 @@ function buildMultipleMessage4(nameLabel, uuid, count) {
|
|
|
18617
18826
|
const detail = identifiers.length > 0 ? identifiers.join(", ") : "specified criteria";
|
|
18618
18827
|
return `Multiple networks (${count}) matched ${detail}; refine filters or set allow_multiple:true.`;
|
|
18619
18828
|
}
|
|
18620
|
-
var find_network_default = task(
|
|
18829
|
+
var find_network_default = task(run158, {
|
|
18621
18830
|
inputSchema: XcpngFindNetworkParamsSchema,
|
|
18622
18831
|
outputSchema: XcpngFindNetworkResultSchema,
|
|
18623
18832
|
description: "Finds a single network on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -18644,7 +18853,7 @@ var XcpngCreateBondResultSchema = z.object({
|
|
|
18644
18853
|
appliedCommands: z.array(z.string()),
|
|
18645
18854
|
error: z.string().optional()
|
|
18646
18855
|
});
|
|
18647
|
-
async function
|
|
18856
|
+
async function run159(context) {
|
|
18648
18857
|
const { params, error } = context;
|
|
18649
18858
|
const {
|
|
18650
18859
|
host_uuid: hostUuidParam,
|
|
@@ -18766,7 +18975,7 @@ async function run158(context) {
|
|
|
18766
18975
|
appliedCommands
|
|
18767
18976
|
};
|
|
18768
18977
|
}
|
|
18769
|
-
var create_bond_default = task(
|
|
18978
|
+
var create_bond_default = task(run159, {
|
|
18770
18979
|
inputSchema: XcpngCreateBondParamsSchema,
|
|
18771
18980
|
outputSchema: XcpngCreateBondResultSchema,
|
|
18772
18981
|
description: "Creates a bonded interface on a host, wrapping xe bond-create."
|
|
@@ -18781,7 +18990,7 @@ var XcpngListPbdParamsResultSchema = z.object({
|
|
|
18781
18990
|
items: z.any().optional(),
|
|
18782
18991
|
error: z.string().optional()
|
|
18783
18992
|
});
|
|
18784
|
-
async function
|
|
18993
|
+
async function run160(context) {
|
|
18785
18994
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18786
18995
|
const result = await runXeCommand(context, "pbd-param-list", filters);
|
|
18787
18996
|
if (!result.success) {
|
|
@@ -18795,7 +19004,7 @@ async function run159(context) {
|
|
|
18795
19004
|
items: parseKeyValueOutput(result.stdout)
|
|
18796
19005
|
};
|
|
18797
19006
|
}
|
|
18798
|
-
var list_pbd_params_default = task(
|
|
19007
|
+
var list_pbd_params_default = task(run160, {
|
|
18799
19008
|
inputSchema: XcpngListPbdParamsParamsSchema,
|
|
18800
19009
|
outputSchema: XcpngListPbdParamsResultSchema,
|
|
18801
19010
|
description: "Lists parameters for PBDs on an XCP-ng host."
|
|
@@ -18810,7 +19019,7 @@ var XcpngListPbdsResultSchema = z.object({
|
|
|
18810
19019
|
items: z.array(z.any()).optional(),
|
|
18811
19020
|
error: z.string().optional()
|
|
18812
19021
|
});
|
|
18813
|
-
async function
|
|
19022
|
+
async function run161(context) {
|
|
18814
19023
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
18815
19024
|
const result = await runXeCommand(context, "pbd-list", filters);
|
|
18816
19025
|
if (!result.success) {
|
|
@@ -18858,7 +19067,7 @@ async function run160(context) {
|
|
|
18858
19067
|
items: enrichedItems
|
|
18859
19068
|
};
|
|
18860
19069
|
}
|
|
18861
|
-
var list_pbds_default = task(
|
|
19070
|
+
var list_pbds_default = task(run161, {
|
|
18862
19071
|
inputSchema: XcpngListPbdsParamsSchema,
|
|
18863
19072
|
outputSchema: XcpngListPbdsResultSchema,
|
|
18864
19073
|
description: "Lists storage bindings (PBDs) between hosts and storage repositories."
|
|
@@ -18880,7 +19089,7 @@ var XcpngFindPbdResultSchema = z.object({
|
|
|
18880
19089
|
multiple: z.boolean().optional(),
|
|
18881
19090
|
error: z.string().optional()
|
|
18882
19091
|
});
|
|
18883
|
-
async function
|
|
19092
|
+
async function run162(context) {
|
|
18884
19093
|
const params = context.params ?? {};
|
|
18885
19094
|
const {
|
|
18886
19095
|
uuid,
|
|
@@ -18993,7 +19202,7 @@ async function runListPbds(context, params) {
|
|
|
18993
19202
|
})
|
|
18994
19203
|
);
|
|
18995
19204
|
}
|
|
18996
|
-
var find_pbd_default = task(
|
|
19205
|
+
var find_pbd_default = task(run162, {
|
|
18997
19206
|
inputSchema: XcpngFindPbdParamsSchema,
|
|
18998
19207
|
outputSchema: XcpngFindPbdResultSchema,
|
|
18999
19208
|
description: "Finds a single PBD (host \u2194 SR binding), optionally allowing multiple matches."
|
|
@@ -19018,7 +19227,7 @@ var XcpngCreatePbdResultSchema = z.object({
|
|
|
19018
19227
|
skipped: z.boolean().optional(),
|
|
19019
19228
|
error: z.string().optional()
|
|
19020
19229
|
});
|
|
19021
|
-
async function
|
|
19230
|
+
async function run163(context) {
|
|
19022
19231
|
const { params, error } = context;
|
|
19023
19232
|
const {
|
|
19024
19233
|
host_uuid: hostUuidParam,
|
|
@@ -19135,7 +19344,7 @@ async function run162(context) {
|
|
|
19135
19344
|
appliedCommands
|
|
19136
19345
|
};
|
|
19137
19346
|
}
|
|
19138
|
-
var create_pbd_default = task(
|
|
19347
|
+
var create_pbd_default = task(run163, {
|
|
19139
19348
|
inputSchema: XcpngCreatePbdParamsSchema,
|
|
19140
19349
|
outputSchema: XcpngCreatePbdResultSchema,
|
|
19141
19350
|
description: "Creates a host \u2194 storage repository binding (PBD)."
|
|
@@ -19150,7 +19359,7 @@ var XcpngListVmParamsResultSchema = z.object({
|
|
|
19150
19359
|
items: z.any().optional(),
|
|
19151
19360
|
error: z.string().optional()
|
|
19152
19361
|
});
|
|
19153
|
-
async function
|
|
19362
|
+
async function run164(context) {
|
|
19154
19363
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
19155
19364
|
const result = await runXeCommand(context, "vm-param-list", filters);
|
|
19156
19365
|
if (!result.success) {
|
|
@@ -19164,7 +19373,7 @@ async function run163(context) {
|
|
|
19164
19373
|
items: parseKeyValueOutput(result.stdout)
|
|
19165
19374
|
};
|
|
19166
19375
|
}
|
|
19167
|
-
var list_vm_params_default = task(
|
|
19376
|
+
var list_vm_params_default = task(run164, {
|
|
19168
19377
|
inputSchema: XcpngListVmParamsParamsSchema,
|
|
19169
19378
|
outputSchema: XcpngListVmParamsResultSchema,
|
|
19170
19379
|
description: "Lists virtual machines (VMs) on an XCP-ng host."
|
|
@@ -19180,7 +19389,7 @@ var XcpngListVmsResultSchema = z.object({
|
|
|
19180
19389
|
items: z.array(z.any()).optional(),
|
|
19181
19390
|
error: z.string().optional()
|
|
19182
19391
|
});
|
|
19183
|
-
async function
|
|
19392
|
+
async function run165(context) {
|
|
19184
19393
|
const { params } = context;
|
|
19185
19394
|
const filters = normalizeFilterArgs(params?.filters);
|
|
19186
19395
|
const paramsArg = buildParamsArg(params?.params);
|
|
@@ -19233,7 +19442,7 @@ async function run164(context) {
|
|
|
19233
19442
|
items: enrichedItems
|
|
19234
19443
|
};
|
|
19235
19444
|
}
|
|
19236
|
-
var list_vms_default = task(
|
|
19445
|
+
var list_vms_default = task(run165, {
|
|
19237
19446
|
inputSchema: XcpngListVmsParamsSchema,
|
|
19238
19447
|
outputSchema: XcpngListVmsResultSchema,
|
|
19239
19448
|
description: "Lists VMs on an XCP-ng host and returns structured metadata."
|
|
@@ -19284,7 +19493,7 @@ var XcpngFindVmResultSchema = z.object({
|
|
|
19284
19493
|
multiple: z.boolean().optional(),
|
|
19285
19494
|
error: z.string().optional()
|
|
19286
19495
|
});
|
|
19287
|
-
async function
|
|
19496
|
+
async function run166(context) {
|
|
19288
19497
|
const params = context.params ?? {};
|
|
19289
19498
|
const {
|
|
19290
19499
|
name_label: nameLabel,
|
|
@@ -19412,7 +19621,7 @@ async function runListVms(context, params) {
|
|
|
19412
19621
|
})
|
|
19413
19622
|
);
|
|
19414
19623
|
}
|
|
19415
|
-
var find_vm_default = task(
|
|
19624
|
+
var find_vm_default = task(run166, {
|
|
19416
19625
|
inputSchema: XcpngFindVmParamsSchema,
|
|
19417
19626
|
outputSchema: XcpngFindVmResultSchema,
|
|
19418
19627
|
description: "Finds a single VM on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -19517,7 +19726,7 @@ var XcpngCreateTemplateResultSchema = z.object({
|
|
|
19517
19726
|
powerState: z.string().optional(),
|
|
19518
19727
|
waitAttempts: z.number().optional()
|
|
19519
19728
|
});
|
|
19520
|
-
async function
|
|
19729
|
+
async function run167(context) {
|
|
19521
19730
|
const { params, error } = context;
|
|
19522
19731
|
const {
|
|
19523
19732
|
source_vm_uuid: sourceVmUuidParam,
|
|
@@ -19625,7 +19834,7 @@ async function run166(context) {
|
|
|
19625
19834
|
waitAttempts: ensureHalted.attempts
|
|
19626
19835
|
};
|
|
19627
19836
|
}
|
|
19628
|
-
var create_template_default = task(
|
|
19837
|
+
var create_template_default = task(run167, {
|
|
19629
19838
|
inputSchema: XcpngCreateTemplateParamsSchema,
|
|
19630
19839
|
outputSchema: XcpngCreateTemplateResultSchema,
|
|
19631
19840
|
description: "Clones a VM and converts it into an XCP-ng template."
|
|
@@ -19652,7 +19861,7 @@ var XcpngCreateVmResultSchema = z.object({
|
|
|
19652
19861
|
appliedCommands: z.array(z.string()),
|
|
19653
19862
|
error: z.string().optional()
|
|
19654
19863
|
});
|
|
19655
|
-
async function
|
|
19864
|
+
async function run168(context) {
|
|
19656
19865
|
const { params, error } = context;
|
|
19657
19866
|
const {
|
|
19658
19867
|
name_label,
|
|
@@ -19778,7 +19987,7 @@ async function run167(context) {
|
|
|
19778
19987
|
appliedCommands
|
|
19779
19988
|
};
|
|
19780
19989
|
}
|
|
19781
|
-
var create_vm_default = task(
|
|
19990
|
+
var create_vm_default = task(run168, {
|
|
19782
19991
|
inputSchema: XcpngCreateVmParamsSchema,
|
|
19783
19992
|
outputSchema: XcpngCreateVmResultSchema,
|
|
19784
19993
|
description: "Creates a new VM on XCP-ng and optionally applies memory and CPU sizing."
|
|
@@ -19793,7 +20002,7 @@ var XcpngListVdiParamsResultSchema = z.object({
|
|
|
19793
20002
|
items: z.any().optional(),
|
|
19794
20003
|
error: z.string().optional()
|
|
19795
20004
|
});
|
|
19796
|
-
async function
|
|
20005
|
+
async function run169(context) {
|
|
19797
20006
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
19798
20007
|
const result = await runXeCommand(context, "vdi-param-list", filters);
|
|
19799
20008
|
if (!result.success) {
|
|
@@ -19807,7 +20016,7 @@ async function run168(context) {
|
|
|
19807
20016
|
items: parseKeyValueOutput(result.stdout)
|
|
19808
20017
|
};
|
|
19809
20018
|
}
|
|
19810
|
-
var list_vdi_params_default = task(
|
|
20019
|
+
var list_vdi_params_default = task(run169, {
|
|
19811
20020
|
inputSchema: XcpngListVdiParamsParamsSchema,
|
|
19812
20021
|
outputSchema: XcpngListVdiParamsResultSchema,
|
|
19813
20022
|
description: "Lists virtual disk image parameters (VDI params) on an XCP-ng host."
|
|
@@ -19822,7 +20031,7 @@ var XcpngListVdisResultSchema = z.object({
|
|
|
19822
20031
|
items: z.array(z.any()).optional(),
|
|
19823
20032
|
error: z.string().optional()
|
|
19824
20033
|
});
|
|
19825
|
-
async function
|
|
20034
|
+
async function run170(context) {
|
|
19826
20035
|
const { params } = context;
|
|
19827
20036
|
const filters = normalizeFilterArgs(params?.filters);
|
|
19828
20037
|
const result = await runXeCommand(context, "vdi-list", filters);
|
|
@@ -19873,7 +20082,7 @@ async function run169(context) {
|
|
|
19873
20082
|
items: enrichedItems
|
|
19874
20083
|
};
|
|
19875
20084
|
}
|
|
19876
|
-
var list_vdis_default = task(
|
|
20085
|
+
var list_vdis_default = task(run170, {
|
|
19877
20086
|
inputSchema: XcpngListVdisParamsSchema,
|
|
19878
20087
|
outputSchema: XcpngListVdisResultSchema,
|
|
19879
20088
|
description: "Lists VDIs on an XCP-ng host with optional filtering."
|
|
@@ -19895,7 +20104,7 @@ var XcpngFindVdiResultSchema = z.object({
|
|
|
19895
20104
|
multiple: z.boolean().optional(),
|
|
19896
20105
|
error: z.string().optional()
|
|
19897
20106
|
});
|
|
19898
|
-
async function
|
|
20107
|
+
async function run171(context) {
|
|
19899
20108
|
const params = context.params ?? {};
|
|
19900
20109
|
const {
|
|
19901
20110
|
name_label: nameLabel,
|
|
@@ -20001,7 +20210,7 @@ function buildMultipleMessage7(nameLabel, uuid, srUuid, count) {
|
|
|
20001
20210
|
const detail = identifiers.length > 0 ? identifiers.join(", ") : "specified criteria";
|
|
20002
20211
|
return `Multiple VDIs (${count}) matched ${detail}; refine filters or set allow_multiple:true.`;
|
|
20003
20212
|
}
|
|
20004
|
-
var find_vdi_default = task(
|
|
20213
|
+
var find_vdi_default = task(run171, {
|
|
20005
20214
|
inputSchema: XcpngFindVdiParamsSchema,
|
|
20006
20215
|
outputSchema: XcpngFindVdiResultSchema,
|
|
20007
20216
|
description: "Finds a single VDI on an XCP-ng host, optionally allowing multiple matches."
|
|
@@ -20016,7 +20225,7 @@ var XcpngListVbdParamsResultSchema = z.object({
|
|
|
20016
20225
|
items: z.any().optional(),
|
|
20017
20226
|
error: z.string().optional()
|
|
20018
20227
|
});
|
|
20019
|
-
async function
|
|
20228
|
+
async function run172(context) {
|
|
20020
20229
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
20021
20230
|
const result = await runXeCommand(context, "vbd-param-list", filters);
|
|
20022
20231
|
if (!result.success) {
|
|
@@ -20030,7 +20239,7 @@ async function run171(context) {
|
|
|
20030
20239
|
items: parseKeyValueOutput(result.stdout)
|
|
20031
20240
|
};
|
|
20032
20241
|
}
|
|
20033
|
-
var list_vbd_params_default = task(
|
|
20242
|
+
var list_vbd_params_default = task(run172, {
|
|
20034
20243
|
inputSchema: XcpngListVbdParamsParamsSchema,
|
|
20035
20244
|
outputSchema: XcpngListVbdParamsResultSchema,
|
|
20036
20245
|
description: "Lists virtual block devices (VBDs) on an XCP-ng host."
|
|
@@ -20045,7 +20254,7 @@ var XcpngListVbdsResultSchema = z.object({
|
|
|
20045
20254
|
items: z.array(z.any()).optional(),
|
|
20046
20255
|
error: z.string().optional()
|
|
20047
20256
|
});
|
|
20048
|
-
async function
|
|
20257
|
+
async function run173(context) {
|
|
20049
20258
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
20050
20259
|
const result = await runXeCommand(context, "vbd-list", filters);
|
|
20051
20260
|
if (!result.success) {
|
|
@@ -20095,7 +20304,7 @@ async function run172(context) {
|
|
|
20095
20304
|
items: enrichedItems
|
|
20096
20305
|
};
|
|
20097
20306
|
}
|
|
20098
|
-
var list_vbds_default = task(
|
|
20307
|
+
var list_vbds_default = task(run173, {
|
|
20099
20308
|
inputSchema: XcpngListVbdsParamsSchema,
|
|
20100
20309
|
outputSchema: XcpngListVbdsResultSchema,
|
|
20101
20310
|
description: "Lists virtual block devices (VBDs) on an XCP-ng host."
|
|
@@ -20112,7 +20321,7 @@ var XcpngListAttachedDisksResultSchema = z.object({
|
|
|
20112
20321
|
disks: z.array(z.any()).optional(),
|
|
20113
20322
|
error: z.string().optional()
|
|
20114
20323
|
});
|
|
20115
|
-
async function
|
|
20324
|
+
async function run174(context) {
|
|
20116
20325
|
const { params, error } = context;
|
|
20117
20326
|
const { vm_uuid: vmUuid, include_readonly: rawIncludeReadonly } = params ?? {};
|
|
20118
20327
|
if (!vmUuid) {
|
|
@@ -20206,7 +20415,7 @@ async function run173(context) {
|
|
|
20206
20415
|
disks
|
|
20207
20416
|
};
|
|
20208
20417
|
}
|
|
20209
|
-
var list_attached_disks_default = task(
|
|
20418
|
+
var list_attached_disks_default = task(run174, {
|
|
20210
20419
|
inputSchema: XcpngListAttachedDisksParamsSchema,
|
|
20211
20420
|
outputSchema: XcpngListAttachedDisksResultSchema,
|
|
20212
20421
|
description: "Lists VBDs attached to a VM and enriches them with VDI metadata so disks vs CD drives can be distinguished."
|
|
@@ -20233,7 +20442,7 @@ var XcpngRemoveDiskResultSchema = z.object({
|
|
|
20233
20442
|
appliedCommands: z.array(z.string()),
|
|
20234
20443
|
error: z.string().optional()
|
|
20235
20444
|
});
|
|
20236
|
-
async function
|
|
20445
|
+
async function run175(context) {
|
|
20237
20446
|
const { params, error } = context;
|
|
20238
20447
|
const {
|
|
20239
20448
|
vbd_uuid: vbdUuidParam,
|
|
@@ -20421,7 +20630,7 @@ async function waitForVdiRemoval(context, vdiUuid, timeoutMs) {
|
|
|
20421
20630
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
20422
20631
|
}
|
|
20423
20632
|
}
|
|
20424
|
-
var remove_disk_default = task(
|
|
20633
|
+
var remove_disk_default = task(run175, {
|
|
20425
20634
|
inputSchema: XcpngRemoveDiskParamsSchema,
|
|
20426
20635
|
outputSchema: XcpngRemoveDiskResultSchema,
|
|
20427
20636
|
description: "Detaches a VDI from a VM and optionally destroys the backing disk on XCP-ng."
|
|
@@ -20438,7 +20647,7 @@ var XcpngSetBootOrderResultSchema = z.object({
|
|
|
20438
20647
|
appliedCommands: z.array(z.string()),
|
|
20439
20648
|
error: z.string().optional()
|
|
20440
20649
|
});
|
|
20441
|
-
async function
|
|
20650
|
+
async function run176(context) {
|
|
20442
20651
|
const { params, error } = context;
|
|
20443
20652
|
const { vm_uuid, boot_order, firmware } = params;
|
|
20444
20653
|
if (!vm_uuid) {
|
|
@@ -20502,7 +20711,7 @@ async function run175(context) {
|
|
|
20502
20711
|
appliedCommands
|
|
20503
20712
|
};
|
|
20504
20713
|
}
|
|
20505
|
-
var set_boot_order_default = task(
|
|
20714
|
+
var set_boot_order_default = task(run176, {
|
|
20506
20715
|
inputSchema: XcpngSetBootOrderParamsSchema,
|
|
20507
20716
|
outputSchema: XcpngSetBootOrderResultSchema,
|
|
20508
20717
|
description: "Configures VM boot order and optional firmware mode via xe vm-param-set."
|
|
@@ -20555,7 +20764,7 @@ var OTHER_CONFIG_KEYS_TO_REMOVE = [
|
|
|
20555
20764
|
"cloud-init-hostname",
|
|
20556
20765
|
"cloud-init-instance-id"
|
|
20557
20766
|
];
|
|
20558
|
-
async function
|
|
20767
|
+
async function run177(context) {
|
|
20559
20768
|
if (!context.host) {
|
|
20560
20769
|
const message = "core.xcpng.create-template-from-vdi must run against a remote XCP-ng host.";
|
|
20561
20770
|
return {
|
|
@@ -21088,7 +21297,7 @@ async function run176(context) {
|
|
|
21088
21297
|
steps
|
|
21089
21298
|
};
|
|
21090
21299
|
}
|
|
21091
|
-
var create_template_from_vdi_default = task(
|
|
21300
|
+
var create_template_from_vdi_default = task(run177, {
|
|
21092
21301
|
inputSchema: XcpngCreateTemplateFromVdiParamsSchema,
|
|
21093
21302
|
outputSchema: XcpngCreateTemplateFromVdiResultSchema,
|
|
21094
21303
|
description: "Creates an XCP-ng template from an existing VDI by staging a VM and converting it."
|
|
@@ -21205,7 +21414,7 @@ var XcpngCreateNetworkResultSchema = z.object({
|
|
|
21205
21414
|
skipped: z.boolean().optional(),
|
|
21206
21415
|
error: z.string().optional()
|
|
21207
21416
|
});
|
|
21208
|
-
async function
|
|
21417
|
+
async function run178(context) {
|
|
21209
21418
|
const { params, error } = context;
|
|
21210
21419
|
const { name_label: nameLabel, description, bridge, mtu, tags, allow_existing: rawAllowExisting } = params ?? {};
|
|
21211
21420
|
if (!nameLabel) {
|
|
@@ -21270,7 +21479,7 @@ async function run177(context) {
|
|
|
21270
21479
|
appliedCommands
|
|
21271
21480
|
};
|
|
21272
21481
|
}
|
|
21273
|
-
var create_network_default = task(
|
|
21482
|
+
var create_network_default = task(run178, {
|
|
21274
21483
|
inputSchema: XcpngCreateNetworkParamsSchema,
|
|
21275
21484
|
outputSchema: XcpngCreateNetworkResultSchema,
|
|
21276
21485
|
description: "Creates a new network on an XCP-ng host (bridge, MTU, and tags optional)."
|
|
@@ -21302,7 +21511,7 @@ var XcpngFindOrCreateIsoSrResultSchema = z.object({
|
|
|
21302
21511
|
commands: z.array(z.string()),
|
|
21303
21512
|
error: z.string().optional()
|
|
21304
21513
|
});
|
|
21305
|
-
async function
|
|
21514
|
+
async function run179(context) {
|
|
21306
21515
|
const { params, debug, error: logError2 } = context;
|
|
21307
21516
|
const {
|
|
21308
21517
|
name_label: nameLabel,
|
|
@@ -21454,7 +21663,7 @@ async function runDirCreate(context, params) {
|
|
|
21454
21663
|
})
|
|
21455
21664
|
);
|
|
21456
21665
|
}
|
|
21457
|
-
var find_or_create_iso_sr_default = task(
|
|
21666
|
+
var find_or_create_iso_sr_default = task(run179, {
|
|
21458
21667
|
inputSchema: XcpngFindOrCreateIsoSrParamsSchema,
|
|
21459
21668
|
outputSchema: XcpngFindOrCreateIsoSrResultSchema,
|
|
21460
21669
|
description: "Finds an ISO storage repository by name, creating it if missing using xe sr-create."
|
|
@@ -21497,7 +21706,7 @@ var XcpngCreateConfigDriveResultSchema = z.object({
|
|
|
21497
21706
|
steps: z.array(z.any()),
|
|
21498
21707
|
error: z.string().optional()
|
|
21499
21708
|
});
|
|
21500
|
-
async function
|
|
21709
|
+
async function run180(context) {
|
|
21501
21710
|
if (!context.host) {
|
|
21502
21711
|
return {
|
|
21503
21712
|
success: false,
|
|
@@ -22016,7 +22225,7 @@ function decodeBase64Field(field, value) {
|
|
|
22016
22225
|
};
|
|
22017
22226
|
}
|
|
22018
22227
|
}
|
|
22019
|
-
var create_config_drive_default = task(
|
|
22228
|
+
var create_config_drive_default = task(run180, {
|
|
22020
22229
|
inputSchema: XcpngCreateConfigDriveParamsSchema,
|
|
22021
22230
|
outputSchema: XcpngCreateConfigDriveResultSchema,
|
|
22022
22231
|
description: "Generates a NoCloud config-drive ISO, stores it in an ISO SR, and returns the associated VDI."
|
|
@@ -22040,7 +22249,7 @@ var XcpngConvertTemplateToVmResultSchema = z.object({
|
|
|
22040
22249
|
alreadyVm: z.boolean().optional(),
|
|
22041
22250
|
error: z.string().optional()
|
|
22042
22251
|
});
|
|
22043
|
-
async function
|
|
22252
|
+
async function run181(context) {
|
|
22044
22253
|
const { params, error } = context;
|
|
22045
22254
|
const {
|
|
22046
22255
|
template_uuid: templateUuidParam,
|
|
@@ -22139,7 +22348,7 @@ async function run180(context) {
|
|
|
22139
22348
|
alreadyVm
|
|
22140
22349
|
};
|
|
22141
22350
|
}
|
|
22142
|
-
var convert_template_to_vm_default = task(
|
|
22351
|
+
var convert_template_to_vm_default = task(run181, {
|
|
22143
22352
|
inputSchema: XcpngConvertTemplateToVmParamsSchema,
|
|
22144
22353
|
outputSchema: XcpngConvertTemplateToVmResultSchema,
|
|
22145
22354
|
description: "Converts an XCP-ng template into a VM by clearing the template flag and optionally renaming it."
|
|
@@ -22160,7 +22369,7 @@ var XcpngDestroyIsoSrResultSchema = z.object({
|
|
|
22160
22369
|
skipped: z.boolean().optional(),
|
|
22161
22370
|
error: z.string().optional()
|
|
22162
22371
|
});
|
|
22163
|
-
async function
|
|
22372
|
+
async function run182(context) {
|
|
22164
22373
|
const { params, error } = context;
|
|
22165
22374
|
const { sr_uuid: srUuidParam, sr_name_label: srName, location, allow_missing: rawAllowMissing } = params ?? {};
|
|
22166
22375
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -22326,7 +22535,7 @@ async function detachSrPbds(context, srUuid, allowMissing) {
|
|
|
22326
22535
|
}
|
|
22327
22536
|
return { commands };
|
|
22328
22537
|
}
|
|
22329
|
-
var destroy_iso_sr_default = task(
|
|
22538
|
+
var destroy_iso_sr_default = task(run182, {
|
|
22330
22539
|
inputSchema: XcpngDestroyIsoSrParamsSchema,
|
|
22331
22540
|
outputSchema: XcpngDestroyIsoSrResultSchema,
|
|
22332
22541
|
description: "Destroys an ISO storage repository and optionally removes its backing directory."
|
|
@@ -22345,7 +22554,7 @@ var XcpngDestroyBondResultSchema = z.object({
|
|
|
22345
22554
|
skipped: z.boolean().optional(),
|
|
22346
22555
|
error: z.string().optional()
|
|
22347
22556
|
});
|
|
22348
|
-
async function
|
|
22557
|
+
async function run183(context) {
|
|
22349
22558
|
const { params, error } = context;
|
|
22350
22559
|
const { bond_uuid: bondUuidParam, pif_uuid: pifUuidParam, allow_missing: rawAllowMissing } = params ?? {};
|
|
22351
22560
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -22382,7 +22591,7 @@ async function run182(context) {
|
|
|
22382
22591
|
appliedCommands
|
|
22383
22592
|
};
|
|
22384
22593
|
}
|
|
22385
|
-
var destroy_bond_default = task(
|
|
22594
|
+
var destroy_bond_default = task(run183, {
|
|
22386
22595
|
inputSchema: XcpngDestroyBondParamsSchema,
|
|
22387
22596
|
outputSchema: XcpngDestroyBondResultSchema,
|
|
22388
22597
|
description: "Destroys a bonded interface, wrapping xe bond-destroy."
|
|
@@ -22404,7 +22613,7 @@ var XcpngCreateSrResultSchema = z.object({
|
|
|
22404
22613
|
skipped: z.boolean().optional(),
|
|
22405
22614
|
error: z.string().optional()
|
|
22406
22615
|
});
|
|
22407
|
-
async function
|
|
22616
|
+
async function run184(context) {
|
|
22408
22617
|
const { params, error } = context;
|
|
22409
22618
|
const {
|
|
22410
22619
|
name_label: nameLabel,
|
|
@@ -22479,7 +22688,7 @@ async function run183(context) {
|
|
|
22479
22688
|
appliedCommands
|
|
22480
22689
|
};
|
|
22481
22690
|
}
|
|
22482
|
-
var create_sr_default = task(
|
|
22691
|
+
var create_sr_default = task(run184, {
|
|
22483
22692
|
inputSchema: XcpngCreateSrParamsSchema,
|
|
22484
22693
|
outputSchema: XcpngCreateSrResultSchema,
|
|
22485
22694
|
description: "Creates a new storage repository (SR) with the specified device configuration."
|
|
@@ -22499,7 +22708,7 @@ var XcpngDestroySrResultSchema = z.object({
|
|
|
22499
22708
|
skipped: z.boolean().optional(),
|
|
22500
22709
|
error: z.string().optional()
|
|
22501
22710
|
});
|
|
22502
|
-
async function
|
|
22711
|
+
async function run185(context) {
|
|
22503
22712
|
const { params, error } = context;
|
|
22504
22713
|
const {
|
|
22505
22714
|
sr_uuid: srUuidParam,
|
|
@@ -22573,7 +22782,7 @@ async function run184(context) {
|
|
|
22573
22782
|
appliedCommands
|
|
22574
22783
|
};
|
|
22575
22784
|
}
|
|
22576
|
-
var destroy_sr_default = task(
|
|
22785
|
+
var destroy_sr_default = task(run185, {
|
|
22577
22786
|
inputSchema: XcpngDestroySrParamsSchema,
|
|
22578
22787
|
outputSchema: XcpngDestroySrResultSchema,
|
|
22579
22788
|
description: "Destroys a storage repository by UUID or name-label (optionally forcing)."
|
|
@@ -22592,7 +22801,7 @@ var XcpngDestroyNetworkResultSchema = z.object({
|
|
|
22592
22801
|
skipped: z.boolean().optional(),
|
|
22593
22802
|
error: z.string().optional()
|
|
22594
22803
|
});
|
|
22595
|
-
async function
|
|
22804
|
+
async function run186(context) {
|
|
22596
22805
|
const { params, error } = context;
|
|
22597
22806
|
const {
|
|
22598
22807
|
network_uuid: networkUuidParam,
|
|
@@ -22659,7 +22868,7 @@ async function run185(context) {
|
|
|
22659
22868
|
appliedCommands
|
|
22660
22869
|
};
|
|
22661
22870
|
}
|
|
22662
|
-
var destroy_network_default = task(
|
|
22871
|
+
var destroy_network_default = task(run186, {
|
|
22663
22872
|
inputSchema: XcpngDestroyNetworkParamsSchema,
|
|
22664
22873
|
outputSchema: XcpngDestroyNetworkResultSchema,
|
|
22665
22874
|
description: "Destroys an XCP-ng network by UUID or name-label."
|
|
@@ -22681,7 +22890,7 @@ var XcpngDestroyPbdResultSchema = z.object({
|
|
|
22681
22890
|
skipped: z.boolean().optional(),
|
|
22682
22891
|
error: z.string().optional()
|
|
22683
22892
|
});
|
|
22684
|
-
async function
|
|
22893
|
+
async function run187(context) {
|
|
22685
22894
|
const { params, error } = context;
|
|
22686
22895
|
const {
|
|
22687
22896
|
pbd_uuid: pbdUuidParam,
|
|
@@ -22790,7 +22999,7 @@ async function run186(context) {
|
|
|
22790
22999
|
appliedCommands
|
|
22791
23000
|
};
|
|
22792
23001
|
}
|
|
22793
|
-
var destroy_pbd_default = task(
|
|
23002
|
+
var destroy_pbd_default = task(run187, {
|
|
22794
23003
|
inputSchema: XcpngDestroyPbdParamsSchema,
|
|
22795
23004
|
outputSchema: XcpngDestroyPbdResultSchema,
|
|
22796
23005
|
description: "Destroys a host \u2194 storage repository binding (PBD)."
|
|
@@ -22806,7 +23015,7 @@ var XcpngDestroySnapshotResultSchema = z.object({
|
|
|
22806
23015
|
command: z.string().optional(),
|
|
22807
23016
|
error: z.string().optional()
|
|
22808
23017
|
});
|
|
22809
|
-
async function
|
|
23018
|
+
async function run188(context) {
|
|
22810
23019
|
const { params, error } = context;
|
|
22811
23020
|
const { snapshot_uuid: snapshotUuid } = params ?? {};
|
|
22812
23021
|
if (!snapshotUuid) {
|
|
@@ -22829,7 +23038,7 @@ async function run187(context) {
|
|
|
22829
23038
|
command: result.command
|
|
22830
23039
|
};
|
|
22831
23040
|
}
|
|
22832
|
-
var destroy_snapshot_default = task(
|
|
23041
|
+
var destroy_snapshot_default = task(run188, {
|
|
22833
23042
|
inputSchema: XcpngDestroySnapshotParamsSchema,
|
|
22834
23043
|
outputSchema: XcpngDestroySnapshotResultSchema,
|
|
22835
23044
|
description: "Destroys an XCP-ng VM snapshot."
|
|
@@ -22849,7 +23058,7 @@ var XcpngIntroduceSrResultSchema = z.object({
|
|
|
22849
23058
|
appliedCommands: z.array(z.string()),
|
|
22850
23059
|
error: z.string().optional()
|
|
22851
23060
|
});
|
|
22852
|
-
async function
|
|
23061
|
+
async function run189(context) {
|
|
22853
23062
|
const { params, error } = context;
|
|
22854
23063
|
const { sr_uuid: srUuid, name_label: nameLabel, type, content_type: contentType, shared } = params ?? {};
|
|
22855
23064
|
if (!srUuid) {
|
|
@@ -22890,7 +23099,7 @@ async function run188(context) {
|
|
|
22890
23099
|
appliedCommands
|
|
22891
23100
|
};
|
|
22892
23101
|
}
|
|
22893
|
-
var introduce_sr_default = task(
|
|
23102
|
+
var introduce_sr_default = task(run189, {
|
|
22894
23103
|
inputSchema: XcpngIntroduceSrParamsSchema,
|
|
22895
23104
|
outputSchema: XcpngIntroduceSrResultSchema,
|
|
22896
23105
|
description: "Introduces an existing storage repository into the pool."
|
|
@@ -22909,7 +23118,7 @@ var XcpngForgetSrResultSchema = z.object({
|
|
|
22909
23118
|
skipped: z.boolean().optional(),
|
|
22910
23119
|
error: z.string().optional()
|
|
22911
23120
|
});
|
|
22912
|
-
async function
|
|
23121
|
+
async function run190(context) {
|
|
22913
23122
|
const { params, error } = context;
|
|
22914
23123
|
const { sr_uuid: srUuidParam, sr_name_label: srNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
22915
23124
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -22972,7 +23181,7 @@ async function run189(context) {
|
|
|
22972
23181
|
appliedCommands
|
|
22973
23182
|
};
|
|
22974
23183
|
}
|
|
22975
|
-
var forget_sr_default = task(
|
|
23184
|
+
var forget_sr_default = task(run190, {
|
|
22976
23185
|
inputSchema: XcpngForgetSrParamsSchema,
|
|
22977
23186
|
outputSchema: XcpngForgetSrResultSchema,
|
|
22978
23187
|
description: "Forgets an SR from the pool metadata without destroying the underlying storage."
|
|
@@ -22987,7 +23196,7 @@ var XcpngListSnapshotsResultSchema = z.object({
|
|
|
22987
23196
|
items: z.any().optional(),
|
|
22988
23197
|
error: z.string().optional()
|
|
22989
23198
|
});
|
|
22990
|
-
async function
|
|
23199
|
+
async function run191(context) {
|
|
22991
23200
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
22992
23201
|
const result = await runXeCommand(context, "snapshot-list", filters);
|
|
22993
23202
|
if (!result.success) {
|
|
@@ -23001,7 +23210,7 @@ async function run190(context) {
|
|
|
23001
23210
|
items: parseKeyValueOutput(result.stdout)
|
|
23002
23211
|
};
|
|
23003
23212
|
}
|
|
23004
|
-
var list_snapshots_default = task(
|
|
23213
|
+
var list_snapshots_default = task(run191, {
|
|
23005
23214
|
inputSchema: XcpngListSnapshotsParamsSchema,
|
|
23006
23215
|
outputSchema: XcpngListSnapshotsResultSchema,
|
|
23007
23216
|
description: "Lists VM snapshots available on the host."
|
|
@@ -23016,7 +23225,7 @@ var XcpngListMessagesResultSchema = z.object({
|
|
|
23016
23225
|
items: z.any().optional(),
|
|
23017
23226
|
error: z.string().optional()
|
|
23018
23227
|
});
|
|
23019
|
-
async function
|
|
23228
|
+
async function run192(context) {
|
|
23020
23229
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
23021
23230
|
const result = await runXeCommand(context, "message-list", filters);
|
|
23022
23231
|
if (!result.success) {
|
|
@@ -23030,7 +23239,7 @@ async function run191(context) {
|
|
|
23030
23239
|
items: parseKeyValueOutput(result.stdout)
|
|
23031
23240
|
};
|
|
23032
23241
|
}
|
|
23033
|
-
var list_messages_default = task(
|
|
23242
|
+
var list_messages_default = task(run192, {
|
|
23034
23243
|
inputSchema: XcpngListMessagesParamsSchema,
|
|
23035
23244
|
outputSchema: XcpngListMessagesResultSchema,
|
|
23036
23245
|
description: "Lists messages emitted by the XCP-ng pool."
|
|
@@ -23049,7 +23258,7 @@ var XcpngClearMessagesResultSchema = z.object({
|
|
|
23049
23258
|
commands: z.any().optional(),
|
|
23050
23259
|
error: z.string().optional()
|
|
23051
23260
|
});
|
|
23052
|
-
async function
|
|
23261
|
+
async function run193(context) {
|
|
23053
23262
|
const { params, error } = context;
|
|
23054
23263
|
const { uuid, uuid_prefix: uuidPrefix, all: rawAll, filters } = params ?? {};
|
|
23055
23264
|
const all = coerceBoolean(rawAll, false);
|
|
@@ -23107,7 +23316,7 @@ async function run192(context) {
|
|
|
23107
23316
|
commands
|
|
23108
23317
|
};
|
|
23109
23318
|
}
|
|
23110
|
-
var clear_messages_default = task(
|
|
23319
|
+
var clear_messages_default = task(run193, {
|
|
23111
23320
|
inputSchema: XcpngClearMessagesParamsSchema,
|
|
23112
23321
|
outputSchema: XcpngClearMessagesResultSchema,
|
|
23113
23322
|
description: "Clears messages (all, by UUID, or UUID prefix)."
|
|
@@ -23128,7 +23337,7 @@ var XcpngDestroyTemplateResultSchema = z.object({
|
|
|
23128
23337
|
skipped: z.boolean().optional(),
|
|
23129
23338
|
error: z.string().optional()
|
|
23130
23339
|
});
|
|
23131
|
-
async function
|
|
23340
|
+
async function run194(context) {
|
|
23132
23341
|
const { params, error } = context;
|
|
23133
23342
|
const {
|
|
23134
23343
|
template_uuid: templateUuidParam,
|
|
@@ -23203,7 +23412,7 @@ async function run193(context) {
|
|
|
23203
23412
|
command: commandResult.command
|
|
23204
23413
|
};
|
|
23205
23414
|
}
|
|
23206
|
-
var destroy_template_default = task(
|
|
23415
|
+
var destroy_template_default = task(run194, {
|
|
23207
23416
|
inputSchema: XcpngDestroyTemplateParamsSchema,
|
|
23208
23417
|
outputSchema: XcpngDestroyTemplateResultSchema,
|
|
23209
23418
|
description: "Destroys an XCP-ng template by UUID or name-label."
|
|
@@ -23223,7 +23432,7 @@ var XcpngDestroyVdiResultSchema = z.object({
|
|
|
23223
23432
|
skipped: z.boolean().optional(),
|
|
23224
23433
|
error: z.string().optional()
|
|
23225
23434
|
});
|
|
23226
|
-
async function
|
|
23435
|
+
async function run195(context) {
|
|
23227
23436
|
const { params, error } = context;
|
|
23228
23437
|
const {
|
|
23229
23438
|
vdi_uuid: vdiUuidParam,
|
|
@@ -23288,7 +23497,7 @@ async function run194(context) {
|
|
|
23288
23497
|
command: result.command
|
|
23289
23498
|
};
|
|
23290
23499
|
}
|
|
23291
|
-
var destroy_vdi_default = task(
|
|
23500
|
+
var destroy_vdi_default = task(run195, {
|
|
23292
23501
|
inputSchema: XcpngDestroyVdiParamsSchema,
|
|
23293
23502
|
outputSchema: XcpngDestroyVdiResultSchema,
|
|
23294
23503
|
description: "Destroys an XCP-ng VDI by UUID (optionally resolving by name-label)."
|
|
@@ -23313,7 +23522,7 @@ var XcpngDestroyVmResultSchema = z.object({
|
|
|
23313
23522
|
skipped: z.boolean().optional(),
|
|
23314
23523
|
error: z.string().optional()
|
|
23315
23524
|
});
|
|
23316
|
-
async function
|
|
23525
|
+
async function run196(context) {
|
|
23317
23526
|
const { params, error } = context;
|
|
23318
23527
|
const {
|
|
23319
23528
|
vm_uuid: vmUuidParam,
|
|
@@ -23476,7 +23685,7 @@ async function run195(context) {
|
|
|
23476
23685
|
destroyedVdiUuids
|
|
23477
23686
|
};
|
|
23478
23687
|
}
|
|
23479
|
-
var destroy_vm_default = task(
|
|
23688
|
+
var destroy_vm_default = task(run196, {
|
|
23480
23689
|
inputSchema: XcpngDestroyVmParamsSchema,
|
|
23481
23690
|
outputSchema: XcpngDestroyVmResultSchema,
|
|
23482
23691
|
description: "Destroys an XCP-ng VM, optionally forcing and pruning snapshots."
|
|
@@ -23505,7 +23714,7 @@ var XcpngCopyVdiResultSchema = z.object({
|
|
|
23505
23714
|
skipped: z.boolean().optional(),
|
|
23506
23715
|
error: z.string().optional()
|
|
23507
23716
|
});
|
|
23508
|
-
async function
|
|
23717
|
+
async function run197(context) {
|
|
23509
23718
|
const { params, error } = context;
|
|
23510
23719
|
const {
|
|
23511
23720
|
source_vdi_uuid: sourceVdiUuidParam,
|
|
@@ -23650,7 +23859,7 @@ async function run196(context) {
|
|
|
23650
23859
|
appliedCommands
|
|
23651
23860
|
};
|
|
23652
23861
|
}
|
|
23653
|
-
var copy_vdi_default = task(
|
|
23862
|
+
var copy_vdi_default = task(run197, {
|
|
23654
23863
|
inputSchema: XcpngCopyVdiParamsSchema,
|
|
23655
23864
|
outputSchema: XcpngCopyVdiResultSchema,
|
|
23656
23865
|
description: "Copies an XCP-ng VDI to a destination storage repository and optionally updates its metadata."
|
|
@@ -23668,7 +23877,7 @@ var XcpngDetachIsoResultSchema = z.object({
|
|
|
23668
23877
|
alreadyEmpty: z.boolean().optional(),
|
|
23669
23878
|
error: z.string().optional()
|
|
23670
23879
|
});
|
|
23671
|
-
async function
|
|
23880
|
+
async function run198(context) {
|
|
23672
23881
|
const { params, error } = context;
|
|
23673
23882
|
const { vm_uuid: vmUuid, allow_missing: rawAllowMissing } = params;
|
|
23674
23883
|
if (!vmUuid) {
|
|
@@ -23700,7 +23909,7 @@ async function run197(context) {
|
|
|
23700
23909
|
error: message
|
|
23701
23910
|
};
|
|
23702
23911
|
}
|
|
23703
|
-
var detach_iso_default = task(
|
|
23912
|
+
var detach_iso_default = task(run198, {
|
|
23704
23913
|
inputSchema: XcpngDetachIsoParamsSchema,
|
|
23705
23914
|
outputSchema: XcpngDetachIsoResultSchema,
|
|
23706
23915
|
description: "Ejects ISO media from a VM, tolerating empty drives when allow_missing:true."
|
|
@@ -23726,7 +23935,7 @@ var XcpngDetachVdiResultSchema = z.object({
|
|
|
23726
23935
|
appliedCommands: z.array(z.string()),
|
|
23727
23936
|
error: z.string().optional()
|
|
23728
23937
|
});
|
|
23729
|
-
async function
|
|
23938
|
+
async function run199(context) {
|
|
23730
23939
|
const { params } = context;
|
|
23731
23940
|
const {
|
|
23732
23941
|
vbd_uuid,
|
|
@@ -23763,7 +23972,7 @@ async function run198(context) {
|
|
|
23763
23972
|
error: result.error
|
|
23764
23973
|
};
|
|
23765
23974
|
}
|
|
23766
|
-
var detach_vdi_default = task(
|
|
23975
|
+
var detach_vdi_default = task(run199, {
|
|
23767
23976
|
inputSchema: XcpngDetachVdiParamsSchema,
|
|
23768
23977
|
outputSchema: XcpngDetachVdiResultSchema,
|
|
23769
23978
|
description: "Detaches a VDI from a VM by unplugging and optionally destroying the VBD, leaving the VDI intact by default."
|
|
@@ -23785,7 +23994,7 @@ var XcpngDetachNetworkInterfaceResultSchema = z.object({
|
|
|
23785
23994
|
appliedCommands: z.array(z.string()),
|
|
23786
23995
|
error: z.string().optional()
|
|
23787
23996
|
});
|
|
23788
|
-
async function
|
|
23997
|
+
async function run200(context) {
|
|
23789
23998
|
const { params, error } = context;
|
|
23790
23999
|
const {
|
|
23791
24000
|
vif_uuid: vifUuidParam,
|
|
@@ -23879,7 +24088,7 @@ async function run199(context) {
|
|
|
23879
24088
|
appliedCommands
|
|
23880
24089
|
};
|
|
23881
24090
|
}
|
|
23882
|
-
var detach_network_interface_default = task(
|
|
24091
|
+
var detach_network_interface_default = task(run200, {
|
|
23883
24092
|
inputSchema: XcpngDetachNetworkInterfaceParamsSchema,
|
|
23884
24093
|
outputSchema: XcpngDetachNetworkInterfaceResultSchema,
|
|
23885
24094
|
description: "Unplugs (and optionally destroys) a virtual network interface from an XCP-ng VM."
|
|
@@ -23899,7 +24108,7 @@ var XcpngEnableHostResultSchema = z.object({
|
|
|
23899
24108
|
skipped: z.boolean().optional(),
|
|
23900
24109
|
error: z.string().optional()
|
|
23901
24110
|
});
|
|
23902
|
-
async function
|
|
24111
|
+
async function run201(context) {
|
|
23903
24112
|
const { params, error } = context;
|
|
23904
24113
|
const {
|
|
23905
24114
|
host_uuid: hostUuidParam,
|
|
@@ -23967,7 +24176,7 @@ async function run200(context) {
|
|
|
23967
24176
|
appliedCommands
|
|
23968
24177
|
};
|
|
23969
24178
|
}
|
|
23970
|
-
var enable_host_default = task(
|
|
24179
|
+
var enable_host_default = task(run201, {
|
|
23971
24180
|
inputSchema: XcpngEnableHostParamsSchema,
|
|
23972
24181
|
outputSchema: XcpngEnableHostResultSchema,
|
|
23973
24182
|
description: "Enables maintenance-disabled hosts so they rejoin scheduling."
|
|
@@ -23989,7 +24198,7 @@ var XcpngDisableHostResultSchema = z.object({
|
|
|
23989
24198
|
evacuated: z.boolean().optional(),
|
|
23990
24199
|
error: z.string().optional()
|
|
23991
24200
|
});
|
|
23992
|
-
async function
|
|
24201
|
+
async function run202(context) {
|
|
23993
24202
|
const { params, error } = context;
|
|
23994
24203
|
const {
|
|
23995
24204
|
host_uuid: hostUuidParam,
|
|
@@ -24074,7 +24283,7 @@ async function run201(context) {
|
|
|
24074
24283
|
evacuated: evacuate
|
|
24075
24284
|
};
|
|
24076
24285
|
}
|
|
24077
|
-
var disable_host_default = task(
|
|
24286
|
+
var disable_host_default = task(run202, {
|
|
24078
24287
|
inputSchema: XcpngDisableHostParamsSchema,
|
|
24079
24288
|
outputSchema: XcpngDisableHostResultSchema,
|
|
24080
24289
|
description: "Disables a host (optionally evacuating resident VMs first)."
|
|
@@ -24094,7 +24303,7 @@ var XcpngPlugPbdResultSchema = z.object({
|
|
|
24094
24303
|
skipped: z.boolean().optional(),
|
|
24095
24304
|
error: z.string().optional()
|
|
24096
24305
|
});
|
|
24097
|
-
async function
|
|
24306
|
+
async function run203(context) {
|
|
24098
24307
|
const { params, error } = context;
|
|
24099
24308
|
const { pbd_uuid: pbdUuidParam, sr_uuid: srUuid, host_uuid: hostUuid, allow_missing: rawAllowMissing } = params ?? {};
|
|
24100
24309
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24158,7 +24367,7 @@ async function run202(context) {
|
|
|
24158
24367
|
appliedCommands
|
|
24159
24368
|
};
|
|
24160
24369
|
}
|
|
24161
|
-
var plug_pbd_default = task(
|
|
24370
|
+
var plug_pbd_default = task(run203, {
|
|
24162
24371
|
inputSchema: XcpngPlugPbdParamsSchema,
|
|
24163
24372
|
outputSchema: XcpngPlugPbdResultSchema,
|
|
24164
24373
|
description: "Plugs a PBD so the host reattaches the storage repository."
|
|
@@ -24178,7 +24387,7 @@ var XcpngUnplugPbdResultSchema = z.object({
|
|
|
24178
24387
|
skipped: z.boolean().optional(),
|
|
24179
24388
|
error: z.string().optional()
|
|
24180
24389
|
});
|
|
24181
|
-
async function
|
|
24390
|
+
async function run204(context) {
|
|
24182
24391
|
const { params, error } = context;
|
|
24183
24392
|
const { pbd_uuid: pbdUuidParam, sr_uuid: srUuid, host_uuid: hostUuid, allow_missing: rawAllowMissing } = params ?? {};
|
|
24184
24393
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24242,7 +24451,7 @@ async function run203(context) {
|
|
|
24242
24451
|
appliedCommands
|
|
24243
24452
|
};
|
|
24244
24453
|
}
|
|
24245
|
-
var unplug_pbd_default = task(
|
|
24454
|
+
var unplug_pbd_default = task(run204, {
|
|
24246
24455
|
inputSchema: XcpngUnplugPbdParamsSchema,
|
|
24247
24456
|
outputSchema: XcpngUnplugPbdResultSchema,
|
|
24248
24457
|
description: "Unplugs a PBD so the host detaches the storage repository."
|
|
@@ -24257,7 +24466,7 @@ var XcpngListPoolsResultSchema = z.object({
|
|
|
24257
24466
|
items: z.any().optional(),
|
|
24258
24467
|
error: z.string().optional()
|
|
24259
24468
|
});
|
|
24260
|
-
async function
|
|
24469
|
+
async function run205(context) {
|
|
24261
24470
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
24262
24471
|
const result = await runXeCommand(context, "pool-list", filters);
|
|
24263
24472
|
if (!result.success) {
|
|
@@ -24271,7 +24480,7 @@ async function run204(context) {
|
|
|
24271
24480
|
items: parseKeyValueOutput(result.stdout)
|
|
24272
24481
|
};
|
|
24273
24482
|
}
|
|
24274
|
-
var list_pools_default = task(
|
|
24483
|
+
var list_pools_default = task(run205, {
|
|
24275
24484
|
inputSchema: XcpngListPoolsParamsSchema,
|
|
24276
24485
|
outputSchema: XcpngListPoolsResultSchema,
|
|
24277
24486
|
description: "Lists pools available to the current host."
|
|
@@ -24292,7 +24501,7 @@ var XcpngFindPoolResultSchema = z.object({
|
|
|
24292
24501
|
multiple: z.boolean().optional(),
|
|
24293
24502
|
error: z.string().optional()
|
|
24294
24503
|
});
|
|
24295
|
-
async function
|
|
24504
|
+
async function run206(context) {
|
|
24296
24505
|
const params = context.params ?? {};
|
|
24297
24506
|
const {
|
|
24298
24507
|
uuid,
|
|
@@ -24392,7 +24601,7 @@ async function runListPools(context, params) {
|
|
|
24392
24601
|
})
|
|
24393
24602
|
);
|
|
24394
24603
|
}
|
|
24395
|
-
var find_pool_default = task(
|
|
24604
|
+
var find_pool_default = task(run206, {
|
|
24396
24605
|
inputSchema: XcpngFindPoolParamsSchema,
|
|
24397
24606
|
outputSchema: XcpngFindPoolResultSchema,
|
|
24398
24607
|
description: "Finds a single pool by UUID or name-label, optionally allowing multiple matches."
|
|
@@ -24411,7 +24620,7 @@ var XcpngSetPoolParamResultSchema = z.object({
|
|
|
24411
24620
|
appliedCommands: z.array(z.string()),
|
|
24412
24621
|
error: z.string().optional()
|
|
24413
24622
|
});
|
|
24414
|
-
async function
|
|
24623
|
+
async function run207(context) {
|
|
24415
24624
|
const { params, error } = context;
|
|
24416
24625
|
const { pool_uuid: poolUuidParam, pool_name_label: poolNameLabel, key, value } = params ?? {};
|
|
24417
24626
|
if (!key) {
|
|
@@ -24472,7 +24681,7 @@ async function run206(context) {
|
|
|
24472
24681
|
appliedCommands
|
|
24473
24682
|
};
|
|
24474
24683
|
}
|
|
24475
|
-
var set_pool_param_default = task(
|
|
24684
|
+
var set_pool_param_default = task(run207, {
|
|
24476
24685
|
inputSchema: XcpngSetPoolParamParamsSchema,
|
|
24477
24686
|
outputSchema: XcpngSetPoolParamResultSchema,
|
|
24478
24687
|
description: "Updates a pool parameter (wraps xe pool-param-set)."
|
|
@@ -24492,7 +24701,7 @@ var XcpngRebootHostResultSchema = z.object({
|
|
|
24492
24701
|
skipped: z.boolean().optional(),
|
|
24493
24702
|
error: z.string().optional()
|
|
24494
24703
|
});
|
|
24495
|
-
async function
|
|
24704
|
+
async function run208(context) {
|
|
24496
24705
|
const { params, error } = context;
|
|
24497
24706
|
const {
|
|
24498
24707
|
host_uuid: hostUuidParam,
|
|
@@ -24558,7 +24767,7 @@ async function run207(context) {
|
|
|
24558
24767
|
command: commandResult.command
|
|
24559
24768
|
};
|
|
24560
24769
|
}
|
|
24561
|
-
var reboot_host_default = task(
|
|
24770
|
+
var reboot_host_default = task(run208, {
|
|
24562
24771
|
inputSchema: XcpngRebootHostParamsSchema,
|
|
24563
24772
|
outputSchema: XcpngRebootHostResultSchema,
|
|
24564
24773
|
description: "Reboots an XCP-ng host (optionally forcing)."
|
|
@@ -24578,7 +24787,7 @@ var XcpngShutdownHostResultSchema = z.object({
|
|
|
24578
24787
|
skipped: z.boolean().optional(),
|
|
24579
24788
|
error: z.string().optional()
|
|
24580
24789
|
});
|
|
24581
|
-
async function
|
|
24790
|
+
async function run209(context) {
|
|
24582
24791
|
const { params, error } = context;
|
|
24583
24792
|
const {
|
|
24584
24793
|
host_uuid: hostUuidParam,
|
|
@@ -24642,7 +24851,7 @@ async function run208(context) {
|
|
|
24642
24851
|
command: commandResult.command
|
|
24643
24852
|
};
|
|
24644
24853
|
}
|
|
24645
|
-
var shutdown_host_default = task(
|
|
24854
|
+
var shutdown_host_default = task(run209, {
|
|
24646
24855
|
inputSchema: XcpngShutdownHostParamsSchema,
|
|
24647
24856
|
outputSchema: XcpngShutdownHostResultSchema,
|
|
24648
24857
|
description: "Shuts down an XCP-ng host (optionally forcing)."
|
|
@@ -24661,7 +24870,7 @@ var XcpngEvacuateHostResultSchema = z.object({
|
|
|
24661
24870
|
skipped: z.boolean().optional(),
|
|
24662
24871
|
error: z.string().optional()
|
|
24663
24872
|
});
|
|
24664
|
-
async function
|
|
24873
|
+
async function run210(context) {
|
|
24665
24874
|
const { params, error } = context;
|
|
24666
24875
|
const { host_uuid: hostUuidParam, host_name_label: hostNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
24667
24876
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24714,7 +24923,7 @@ async function run209(context) {
|
|
|
24714
24923
|
command: commandResult.command
|
|
24715
24924
|
};
|
|
24716
24925
|
}
|
|
24717
|
-
var evacuate_host_default = task(
|
|
24926
|
+
var evacuate_host_default = task(run210, {
|
|
24718
24927
|
inputSchema: XcpngEvacuateHostParamsSchema,
|
|
24719
24928
|
outputSchema: XcpngEvacuateHostResultSchema,
|
|
24720
24929
|
description: "Evacuates all VMs from a host."
|
|
@@ -24735,7 +24944,7 @@ var XcpngPlugPifResultSchema = z.object({
|
|
|
24735
24944
|
skipped: z.boolean().optional(),
|
|
24736
24945
|
error: z.string().optional()
|
|
24737
24946
|
});
|
|
24738
|
-
async function
|
|
24947
|
+
async function run211(context) {
|
|
24739
24948
|
const { params, error } = context;
|
|
24740
24949
|
const {
|
|
24741
24950
|
pif_uuid: pifUuidParam,
|
|
@@ -24832,7 +25041,7 @@ async function run210(context) {
|
|
|
24832
25041
|
appliedCommands
|
|
24833
25042
|
};
|
|
24834
25043
|
}
|
|
24835
|
-
var plug_pif_default = task(
|
|
25044
|
+
var plug_pif_default = task(run211, {
|
|
24836
25045
|
inputSchema: XcpngPlugPifParamsSchema,
|
|
24837
25046
|
outputSchema: XcpngPlugPifResultSchema,
|
|
24838
25047
|
description: "Plugs a physical interface (PIF) on the specified host."
|
|
@@ -24851,7 +25060,7 @@ var XcpngPifScanResultSchema = z.object({
|
|
|
24851
25060
|
skipped: z.boolean().optional(),
|
|
24852
25061
|
error: z.string().optional()
|
|
24853
25062
|
});
|
|
24854
|
-
async function
|
|
25063
|
+
async function run212(context) {
|
|
24855
25064
|
const { params, error } = context;
|
|
24856
25065
|
const { host_uuid: hostUuidParam, host_name_label: hostNameLabel, allow_missing: rawAllowMissing } = params ?? {};
|
|
24857
25066
|
const allowMissing = coerceBoolean(rawAllowMissing, false);
|
|
@@ -24916,7 +25125,7 @@ async function run211(context) {
|
|
|
24916
25125
|
appliedCommands
|
|
24917
25126
|
};
|
|
24918
25127
|
}
|
|
24919
|
-
var pif_scan_default = task(
|
|
25128
|
+
var pif_scan_default = task(run212, {
|
|
24920
25129
|
inputSchema: XcpngPifScanParamsSchema,
|
|
24921
25130
|
outputSchema: XcpngPifScanResultSchema,
|
|
24922
25131
|
description: "Rescans physical interfaces (PIFs) on a host to discover changes."
|
|
@@ -24937,7 +25146,7 @@ var XcpngUnplugPifResultSchema = z.object({
|
|
|
24937
25146
|
skipped: z.boolean().optional(),
|
|
24938
25147
|
error: z.string().optional()
|
|
24939
25148
|
});
|
|
24940
|
-
async function
|
|
25149
|
+
async function run213(context) {
|
|
24941
25150
|
const { params, error } = context;
|
|
24942
25151
|
const {
|
|
24943
25152
|
pif_uuid: pifUuidParam,
|
|
@@ -25034,7 +25243,7 @@ async function run212(context) {
|
|
|
25034
25243
|
appliedCommands
|
|
25035
25244
|
};
|
|
25036
25245
|
}
|
|
25037
|
-
var unplug_pif_default = task(
|
|
25246
|
+
var unplug_pif_default = task(run213, {
|
|
25038
25247
|
inputSchema: XcpngUnplugPifParamsSchema,
|
|
25039
25248
|
outputSchema: XcpngUnplugPifResultSchema,
|
|
25040
25249
|
description: "Unplugs a physical interface (PIF) on the specified host."
|
|
@@ -25052,7 +25261,7 @@ var XcpngSetPifParamResultSchema = z.object({
|
|
|
25052
25261
|
command: z.string().optional(),
|
|
25053
25262
|
error: z.string().optional()
|
|
25054
25263
|
});
|
|
25055
|
-
async function
|
|
25264
|
+
async function run214(context) {
|
|
25056
25265
|
const { params, error } = context;
|
|
25057
25266
|
const { pif_uuid: pifUuid, key, value } = params ?? {};
|
|
25058
25267
|
if (!pifUuid) {
|
|
@@ -25090,7 +25299,7 @@ async function run213(context) {
|
|
|
25090
25299
|
command: commandResult.command
|
|
25091
25300
|
};
|
|
25092
25301
|
}
|
|
25093
|
-
var set_pif_param_default = task(
|
|
25302
|
+
var set_pif_param_default = task(run214, {
|
|
25094
25303
|
inputSchema: XcpngSetPifParamParamsSchema,
|
|
25095
25304
|
outputSchema: XcpngSetPifParamResultSchema,
|
|
25096
25305
|
description: "Updates a PIF parameter (wraps `xe pif-param-set`)."
|
|
@@ -25107,7 +25316,7 @@ var XcpngUnplugVbdResultSchema = z.object({
|
|
|
25107
25316
|
alreadyDetached: z.boolean().optional(),
|
|
25108
25317
|
error: z.string().optional()
|
|
25109
25318
|
});
|
|
25110
|
-
async function
|
|
25319
|
+
async function run215(context) {
|
|
25111
25320
|
const { params, error } = context;
|
|
25112
25321
|
const { vbd_uuid: vbdUuid, allow_missing: rawAllowMissing } = params;
|
|
25113
25322
|
if (!vbdUuid) {
|
|
@@ -25137,7 +25346,7 @@ async function run214(context) {
|
|
|
25137
25346
|
error: message
|
|
25138
25347
|
};
|
|
25139
25348
|
}
|
|
25140
|
-
var unplug_vbd_default = task(
|
|
25349
|
+
var unplug_vbd_default = task(run215, {
|
|
25141
25350
|
inputSchema: XcpngUnplugVbdParamsSchema,
|
|
25142
25351
|
outputSchema: XcpngUnplugVbdResultSchema,
|
|
25143
25352
|
description: "Unplugs a VBD from an XCP-ng VM, tolerating already-detached devices when allow_missing:true."
|
|
@@ -25157,7 +25366,7 @@ var XcpngSuspendVmResultSchema = z.object({
|
|
|
25157
25366
|
waitAttempts: z.number().optional(),
|
|
25158
25367
|
error: z.string().optional()
|
|
25159
25368
|
});
|
|
25160
|
-
async function
|
|
25369
|
+
async function run216(context) {
|
|
25161
25370
|
const { params, error } = context;
|
|
25162
25371
|
const { vm_uuid: vmUuid, allow_running: rawAllowRunning } = params;
|
|
25163
25372
|
if (!vmUuid) {
|
|
@@ -25218,7 +25427,7 @@ async function run215(context) {
|
|
|
25218
25427
|
waitAttempts: waitResult.attempts
|
|
25219
25428
|
};
|
|
25220
25429
|
}
|
|
25221
|
-
var suspend_vm_default = task(
|
|
25430
|
+
var suspend_vm_default = task(run216, {
|
|
25222
25431
|
inputSchema: XcpngSuspendVmParamsSchema,
|
|
25223
25432
|
outputSchema: XcpngSuspendVmResultSchema,
|
|
25224
25433
|
description: "Suspends an XCP-ng VM, waiting until the VM reports the suspended power state."
|
|
@@ -25239,7 +25448,7 @@ var XcpngResumeVmResultSchema = z.object({
|
|
|
25239
25448
|
waitAttempts: z.number().optional(),
|
|
25240
25449
|
error: z.string().optional()
|
|
25241
25450
|
});
|
|
25242
|
-
async function
|
|
25451
|
+
async function run217(context) {
|
|
25243
25452
|
const { params, error } = context;
|
|
25244
25453
|
const { vm_uuid: vmUuid, start_paused: rawStartPaused, host_uuid: hostUuid } = params;
|
|
25245
25454
|
if (!vmUuid) {
|
|
@@ -25304,7 +25513,7 @@ async function run216(context) {
|
|
|
25304
25513
|
waitAttempts: waitResult.attempts
|
|
25305
25514
|
};
|
|
25306
25515
|
}
|
|
25307
|
-
var resume_vm_default = task(
|
|
25516
|
+
var resume_vm_default = task(run217, {
|
|
25308
25517
|
inputSchema: XcpngResumeVmParamsSchema,
|
|
25309
25518
|
outputSchema: XcpngResumeVmResultSchema,
|
|
25310
25519
|
description: "Resumes a suspended XCP-ng VM, optionally starting it in a paused state or on a specific host."
|
|
@@ -25319,7 +25528,7 @@ var XcpngListVifParamsResultSchema = z.object({
|
|
|
25319
25528
|
items: z.any().optional(),
|
|
25320
25529
|
error: z.string().optional()
|
|
25321
25530
|
});
|
|
25322
|
-
async function
|
|
25531
|
+
async function run218(context) {
|
|
25323
25532
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25324
25533
|
const result = await runXeCommand(context, "vif-param-list", filters);
|
|
25325
25534
|
if (!result.success) {
|
|
@@ -25333,7 +25542,7 @@ async function run217(context) {
|
|
|
25333
25542
|
items: parseKeyValueOutput(result.stdout)
|
|
25334
25543
|
};
|
|
25335
25544
|
}
|
|
25336
|
-
var list_vif_params_default = task(
|
|
25545
|
+
var list_vif_params_default = task(run218, {
|
|
25337
25546
|
inputSchema: XcpngListVifParamsParamsSchema,
|
|
25338
25547
|
outputSchema: XcpngListVifParamsResultSchema,
|
|
25339
25548
|
description: "Lists parameters for virtual interfaces (VIFs) on an XCP-ng host."
|
|
@@ -25348,7 +25557,7 @@ var XcpngListVifsResultSchema = z.object({
|
|
|
25348
25557
|
items: z.array(z.any()).optional(),
|
|
25349
25558
|
error: z.string().optional()
|
|
25350
25559
|
});
|
|
25351
|
-
async function
|
|
25560
|
+
async function run219(context) {
|
|
25352
25561
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25353
25562
|
const result = await runXeCommand(context, "vif-list", filters);
|
|
25354
25563
|
if (!result.success) {
|
|
@@ -25396,7 +25605,7 @@ async function run218(context) {
|
|
|
25396
25605
|
items: enrichedItems
|
|
25397
25606
|
};
|
|
25398
25607
|
}
|
|
25399
|
-
var list_vifs_default = task(
|
|
25608
|
+
var list_vifs_default = task(run219, {
|
|
25400
25609
|
inputSchema: XcpngListVifsParamsSchema,
|
|
25401
25610
|
outputSchema: XcpngListVifsResultSchema,
|
|
25402
25611
|
description: "Lists VIFs (virtual interfaces) attached to VMs."
|
|
@@ -25411,7 +25620,7 @@ var XcpngListPifParamsResultSchema = z.object({
|
|
|
25411
25620
|
items: z.any().optional(),
|
|
25412
25621
|
error: z.string().optional()
|
|
25413
25622
|
});
|
|
25414
|
-
async function
|
|
25623
|
+
async function run220(context) {
|
|
25415
25624
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25416
25625
|
const result = await runXeCommand(context, "pif-param-list", filters);
|
|
25417
25626
|
if (!result.success) {
|
|
@@ -25425,7 +25634,7 @@ async function run219(context) {
|
|
|
25425
25634
|
items: parseKeyValueOutput(result.stdout)
|
|
25426
25635
|
};
|
|
25427
25636
|
}
|
|
25428
|
-
var list_pif_params_default = task(
|
|
25637
|
+
var list_pif_params_default = task(run220, {
|
|
25429
25638
|
inputSchema: XcpngListPifParamsParamsSchema,
|
|
25430
25639
|
outputSchema: XcpngListPifParamsResultSchema,
|
|
25431
25640
|
description: "Lists parameters for PIFs on an XCP-ng host."
|
|
@@ -25440,7 +25649,7 @@ var XcpngListPifsResultSchema = z.object({
|
|
|
25440
25649
|
items: z.array(z.any()).optional(),
|
|
25441
25650
|
error: z.string().optional()
|
|
25442
25651
|
});
|
|
25443
|
-
async function
|
|
25652
|
+
async function run221(context) {
|
|
25444
25653
|
const filters = normalizeFilterArgs(context.params?.filters);
|
|
25445
25654
|
const result = await runXeCommand(context, "pif-list", filters);
|
|
25446
25655
|
if (!result.success) {
|
|
@@ -25488,7 +25697,7 @@ async function run220(context) {
|
|
|
25488
25697
|
items: enrichedItems
|
|
25489
25698
|
};
|
|
25490
25699
|
}
|
|
25491
|
-
var list_pifs_default = task(
|
|
25700
|
+
var list_pifs_default = task(run221, {
|
|
25492
25701
|
inputSchema: XcpngListPifsParamsSchema,
|
|
25493
25702
|
outputSchema: XcpngListPifsResultSchema,
|
|
25494
25703
|
description: "Lists PIFs (physical interfaces) available on the XCP-ng host."
|
|
@@ -25508,7 +25717,7 @@ var XcpngRebootVmResultSchema = z.object({
|
|
|
25508
25717
|
powerState: z.string().optional(),
|
|
25509
25718
|
waitAttempts: z.number().optional()
|
|
25510
25719
|
});
|
|
25511
|
-
async function
|
|
25720
|
+
async function run222(context) {
|
|
25512
25721
|
const { params, error } = context;
|
|
25513
25722
|
const { vm_uuid: vmUuidParam, vm_name_label: vmNameLabel, force: rawForce } = params ?? {};
|
|
25514
25723
|
const force = coerceBoolean(rawForce, false);
|
|
@@ -25569,7 +25778,7 @@ async function run221(context) {
|
|
|
25569
25778
|
waitAttempts: waitResult.attempts
|
|
25570
25779
|
};
|
|
25571
25780
|
}
|
|
25572
|
-
var reboot_vm_default = task(
|
|
25781
|
+
var reboot_vm_default = task(run222, {
|
|
25573
25782
|
inputSchema: XcpngRebootVmParamsSchema,
|
|
25574
25783
|
outputSchema: XcpngRebootVmResultSchema,
|
|
25575
25784
|
description: "Reboots an XCP-ng VM using `xe vm-reboot`."
|
|
@@ -25588,7 +25797,7 @@ var XcpngSetNetworkParamResultSchema = z.object({
|
|
|
25588
25797
|
appliedCommands: z.array(z.string()),
|
|
25589
25798
|
error: z.string().optional()
|
|
25590
25799
|
});
|
|
25591
|
-
async function
|
|
25800
|
+
async function run223(context) {
|
|
25592
25801
|
const { params, error } = context;
|
|
25593
25802
|
const { network_uuid: networkUuidParam, network_name_label: networkNameLabel, key, value } = params ?? {};
|
|
25594
25803
|
if (!key) {
|
|
@@ -25649,7 +25858,7 @@ async function run222(context) {
|
|
|
25649
25858
|
appliedCommands
|
|
25650
25859
|
};
|
|
25651
25860
|
}
|
|
25652
|
-
var set_network_param_default = task(
|
|
25861
|
+
var set_network_param_default = task(run223, {
|
|
25653
25862
|
inputSchema: XcpngSetNetworkParamParamsSchema,
|
|
25654
25863
|
outputSchema: XcpngSetNetworkParamResultSchema,
|
|
25655
25864
|
description: "Updates a network parameter (wraps xe network-param-set)."
|
|
@@ -25673,7 +25882,7 @@ var XcpngResizeVdiResultSchema = z.object({
|
|
|
25673
25882
|
newSizeBytes: z.number().optional(),
|
|
25674
25883
|
error: z.string().optional()
|
|
25675
25884
|
});
|
|
25676
|
-
async function
|
|
25885
|
+
async function run224(context) {
|
|
25677
25886
|
const { params, error } = context;
|
|
25678
25887
|
const {
|
|
25679
25888
|
vdi_uuid: vdiUuidParam,
|
|
@@ -25747,7 +25956,7 @@ async function run223(context) {
|
|
|
25747
25956
|
newSizeBytes: sizeBytes
|
|
25748
25957
|
};
|
|
25749
25958
|
}
|
|
25750
|
-
var resize_vdi_default = task(
|
|
25959
|
+
var resize_vdi_default = task(run224, {
|
|
25751
25960
|
inputSchema: XcpngResizeVdiParamsSchema,
|
|
25752
25961
|
outputSchema: XcpngResizeVdiResultSchema,
|
|
25753
25962
|
description: "Resizes an existing VDI on XCP-ng using `xe vdi-resize`/`vdi-resize-online`."
|
|
@@ -25779,7 +25988,7 @@ var XcpngSetVmResourcesResultSchema = z.object({
|
|
|
25779
25988
|
powerState: z.string().optional(),
|
|
25780
25989
|
waitAttempts: z.number().optional()
|
|
25781
25990
|
});
|
|
25782
|
-
async function
|
|
25991
|
+
async function run225(context) {
|
|
25783
25992
|
const { params, error } = context;
|
|
25784
25993
|
const {
|
|
25785
25994
|
vm_uuid: vmUuidParam,
|
|
@@ -26082,7 +26291,7 @@ function ensurePositiveMib(value, fieldName) {
|
|
|
26082
26291
|
bytes: mibToBytes2(value)
|
|
26083
26292
|
};
|
|
26084
26293
|
}
|
|
26085
|
-
var set_vm_resources_default = task(
|
|
26294
|
+
var set_vm_resources_default = task(run225, {
|
|
26086
26295
|
inputSchema: XcpngSetVmResourcesParamsSchema,
|
|
26087
26296
|
outputSchema: XcpngSetVmResourcesResultSchema,
|
|
26088
26297
|
description: "Updates VM memory and vCPU settings on an XCP-ng host."
|
|
@@ -26107,7 +26316,7 @@ var XcpngResizeVmCpusResultSchema = z.object({
|
|
|
26107
26316
|
powerState: z.string().optional(),
|
|
26108
26317
|
waitAttempts: z.number().optional()
|
|
26109
26318
|
});
|
|
26110
|
-
async function
|
|
26319
|
+
async function run226(context) {
|
|
26111
26320
|
const { params, error } = context;
|
|
26112
26321
|
const {
|
|
26113
26322
|
vm_uuid: vmUuid,
|
|
@@ -26156,7 +26365,7 @@ async function run225(context) {
|
|
|
26156
26365
|
waitAttempts: result.waitAttempts
|
|
26157
26366
|
};
|
|
26158
26367
|
}
|
|
26159
|
-
var resize_vm_cpus_default = task(
|
|
26368
|
+
var resize_vm_cpus_default = task(run226, {
|
|
26160
26369
|
inputSchema: XcpngResizeVmCpusParamsSchema,
|
|
26161
26370
|
outputSchema: XcpngResizeVmCpusResultSchema,
|
|
26162
26371
|
description: "Resizes an XCP-ng VM\u2019s vCPU configuration."
|
|
@@ -26177,7 +26386,7 @@ var XcpngResizeVmMemoryResultSchema = z.object({
|
|
|
26177
26386
|
powerState: z.string().optional(),
|
|
26178
26387
|
waitAttempts: z.number().optional()
|
|
26179
26388
|
});
|
|
26180
|
-
async function
|
|
26389
|
+
async function run227(context) {
|
|
26181
26390
|
const { params, error } = context;
|
|
26182
26391
|
const { vm_uuid: vmUuid, vm_name_label: vmNameLabel, memory_mib: memoryMib } = params ?? {};
|
|
26183
26392
|
if (!memoryMib || !Number.isFinite(memoryMib) || memoryMib <= 0) {
|
|
@@ -26216,7 +26425,7 @@ async function run226(context) {
|
|
|
26216
26425
|
waitAttempts: result.waitAttempts
|
|
26217
26426
|
};
|
|
26218
26427
|
}
|
|
26219
|
-
var resize_vm_memory_default = task(
|
|
26428
|
+
var resize_vm_memory_default = task(run227, {
|
|
26220
26429
|
inputSchema: XcpngResizeVmMemoryParamsSchema,
|
|
26221
26430
|
outputSchema: XcpngResizeVmMemoryResultSchema,
|
|
26222
26431
|
description: "Resizes an XCP-ng VM\u2019s memory allocation (static/dynamic bounds)."
|
|
@@ -26235,7 +26444,7 @@ var XcpngRevertSnapshotResultSchema = z.object({
|
|
|
26235
26444
|
powerState: z.string().optional(),
|
|
26236
26445
|
waitAttempts: z.number().optional()
|
|
26237
26446
|
});
|
|
26238
|
-
async function
|
|
26447
|
+
async function run228(context) {
|
|
26239
26448
|
const { params, error } = context;
|
|
26240
26449
|
const { snapshot_uuid: snapshotUuid } = params ?? {};
|
|
26241
26450
|
if (!snapshotUuid) {
|
|
@@ -26324,7 +26533,7 @@ async function run227(context) {
|
|
|
26324
26533
|
waitAttempts
|
|
26325
26534
|
};
|
|
26326
26535
|
}
|
|
26327
|
-
var revert_snapshot_default = task(
|
|
26536
|
+
var revert_snapshot_default = task(run228, {
|
|
26328
26537
|
inputSchema: XcpngRevertSnapshotParamsSchema,
|
|
26329
26538
|
outputSchema: XcpngRevertSnapshotResultSchema,
|
|
26330
26539
|
description: "Reverts an XCP-ng VM to a specified snapshot."
|
|
@@ -26342,7 +26551,7 @@ var XcpngSetSnapshotParamResultSchema = z.object({
|
|
|
26342
26551
|
command: z.string().optional(),
|
|
26343
26552
|
error: z.string().optional()
|
|
26344
26553
|
});
|
|
26345
|
-
async function
|
|
26554
|
+
async function run229(context) {
|
|
26346
26555
|
const { params, error } = context;
|
|
26347
26556
|
const { snapshot_uuid: snapshotUuid, key, value } = params ?? {};
|
|
26348
26557
|
if (!snapshotUuid) {
|
|
@@ -26380,7 +26589,7 @@ async function run228(context) {
|
|
|
26380
26589
|
command: commandResult.command
|
|
26381
26590
|
};
|
|
26382
26591
|
}
|
|
26383
|
-
var set_snapshot_param_default = task(
|
|
26592
|
+
var set_snapshot_param_default = task(run229, {
|
|
26384
26593
|
inputSchema: XcpngSetSnapshotParamParamsSchema,
|
|
26385
26594
|
outputSchema: XcpngSetSnapshotParamResultSchema,
|
|
26386
26595
|
description: "Updates a snapshot parameter (wraps xe snapshot-param-set)."
|
|
@@ -26399,7 +26608,7 @@ var XcpngSetSrParamResultSchema = z.object({
|
|
|
26399
26608
|
appliedCommands: z.array(z.string()),
|
|
26400
26609
|
error: z.string().optional()
|
|
26401
26610
|
});
|
|
26402
|
-
async function
|
|
26611
|
+
async function run230(context) {
|
|
26403
26612
|
const { params, error } = context;
|
|
26404
26613
|
const { sr_uuid: srUuidParam, sr_name_label: srNameLabel, key, value } = params ?? {};
|
|
26405
26614
|
if (!key) {
|
|
@@ -26460,7 +26669,7 @@ async function run229(context) {
|
|
|
26460
26669
|
appliedCommands
|
|
26461
26670
|
};
|
|
26462
26671
|
}
|
|
26463
|
-
var set_sr_param_default = task(
|
|
26672
|
+
var set_sr_param_default = task(run230, {
|
|
26464
26673
|
inputSchema: XcpngSetSrParamParamsSchema,
|
|
26465
26674
|
outputSchema: XcpngSetSrParamResultSchema,
|
|
26466
26675
|
description: "Updates a storage repository parameter (wraps xe sr-param-set)."
|
|
@@ -26481,7 +26690,7 @@ var XcpngStartVmResultSchema = z.object({
|
|
|
26481
26690
|
finalPowerState: z.string().optional(),
|
|
26482
26691
|
waitAttempts: z.number().optional()
|
|
26483
26692
|
});
|
|
26484
|
-
async function
|
|
26693
|
+
async function run231(context) {
|
|
26485
26694
|
const { params, error } = context;
|
|
26486
26695
|
const { vm_uuid, start_paused: rawStartPaused, force: rawForce } = params;
|
|
26487
26696
|
const startPaused = coerceBoolean(rawStartPaused, false);
|
|
@@ -26548,7 +26757,7 @@ async function run230(context) {
|
|
|
26548
26757
|
waitAttempts: waitResult.attempts
|
|
26549
26758
|
};
|
|
26550
26759
|
}
|
|
26551
|
-
var start_vm_default = task(
|
|
26760
|
+
var start_vm_default = task(run231, {
|
|
26552
26761
|
inputSchema: XcpngStartVmParamsSchema,
|
|
26553
26762
|
outputSchema: XcpngStartVmResultSchema,
|
|
26554
26763
|
description: "Starts an XCP-ng virtual machine with optional paused or forced modes."
|
|
@@ -26569,7 +26778,7 @@ var XcpngStopVmResultSchema = z.object({
|
|
|
26569
26778
|
finalPowerState: z.string().optional(),
|
|
26570
26779
|
waitAttempts: z.number().optional()
|
|
26571
26780
|
});
|
|
26572
|
-
async function
|
|
26781
|
+
async function run232(context) {
|
|
26573
26782
|
const { params, error } = context;
|
|
26574
26783
|
const { vm_uuid, force: rawForce, timeout_seconds: rawTimeout } = params;
|
|
26575
26784
|
const force = coerceBoolean(rawForce, false);
|
|
@@ -26644,7 +26853,7 @@ async function run231(context) {
|
|
|
26644
26853
|
waitAttempts: waitResult.attempts
|
|
26645
26854
|
};
|
|
26646
26855
|
}
|
|
26647
|
-
var stop_vm_default = task(
|
|
26856
|
+
var stop_vm_default = task(run232, {
|
|
26648
26857
|
inputSchema: XcpngStopVmParamsSchema,
|
|
26649
26858
|
outputSchema: XcpngStopVmResultSchema,
|
|
26650
26859
|
description: "Stops an XCP-ng virtual machine gracefully or forcefully."
|
|
@@ -26673,7 +26882,7 @@ var XcpngImportIsoResultSchema = z.object({
|
|
|
26673
26882
|
commands: z.array(z.string()),
|
|
26674
26883
|
error: z.string().optional()
|
|
26675
26884
|
});
|
|
26676
|
-
async function
|
|
26885
|
+
async function run233(context) {
|
|
26677
26886
|
if (!context.host) {
|
|
26678
26887
|
return {
|
|
26679
26888
|
success: false,
|
|
@@ -26879,7 +27088,7 @@ async function findIsoVdi2(context, srUuid, isoFileName) {
|
|
|
26879
27088
|
}
|
|
26880
27089
|
return { vdi };
|
|
26881
27090
|
}
|
|
26882
|
-
var import_iso_default = task(
|
|
27091
|
+
var import_iso_default = task(run233, {
|
|
26883
27092
|
inputSchema: XcpngImportIsoParamsSchema,
|
|
26884
27093
|
outputSchema: XcpngImportIsoResultSchema,
|
|
26885
27094
|
description: "Ensures an ISO file is represented as a VDI in an ISO SR by rescanning and importing when necessary."
|
|
@@ -26908,7 +27117,7 @@ var XcpngUploadIsoHostResultSchema = z.object({
|
|
|
26908
27117
|
remotePath: z.string().optional(),
|
|
26909
27118
|
error: z.string().optional()
|
|
26910
27119
|
});
|
|
26911
|
-
async function
|
|
27120
|
+
async function run234(context) {
|
|
26912
27121
|
if (context.host) {
|
|
26913
27122
|
return {
|
|
26914
27123
|
success: false,
|
|
@@ -26963,10 +27172,10 @@ async function run233(context) {
|
|
|
26963
27172
|
const uploads = await context.ssh(
|
|
26964
27173
|
[],
|
|
26965
27174
|
async (remoteContext) => {
|
|
26966
|
-
const { run:
|
|
27175
|
+
const { run: run253 } = remoteContext;
|
|
26967
27176
|
const remotePath = pathPosix3.join(resolvedLocation, remoteFileName);
|
|
26968
27177
|
try {
|
|
26969
|
-
const srResult = await
|
|
27178
|
+
const srResult = await run253(
|
|
26970
27179
|
find_or_create_iso_sr_default({
|
|
26971
27180
|
name_label: isoSrName,
|
|
26972
27181
|
location: resolvedLocation,
|
|
@@ -26983,7 +27192,7 @@ async function run233(context) {
|
|
|
26983
27192
|
error: srResult.error ?? "Failed to ensure ISO SR exists."
|
|
26984
27193
|
};
|
|
26985
27194
|
}
|
|
26986
|
-
const fileExistsResult = await
|
|
27195
|
+
const fileExistsResult = await run253(exists_default2({ path: remotePath }));
|
|
26987
27196
|
if (fileExistsResult.exists) {
|
|
26988
27197
|
return {
|
|
26989
27198
|
success: true,
|
|
@@ -27050,7 +27259,7 @@ function resolveChunkSizeBytes(chunkSizeMb) {
|
|
|
27050
27259
|
const bounded = Math.min(Math.max(safeSize, MIN_CHUNK_SIZE_MB), MAX_CHUNK_SIZE_MB);
|
|
27051
27260
|
return bounded * 1024 * 1024;
|
|
27052
27261
|
}
|
|
27053
|
-
var upload_iso_default = task(
|
|
27262
|
+
var upload_iso_default = task(run234, {
|
|
27054
27263
|
inputSchema: XcpngUploadIsoParamsSchema,
|
|
27055
27264
|
outputSchema: XcpngUploadIsoHostResultSchema,
|
|
27056
27265
|
description: "Uploads a local ISO to the remote XCP-ng hypervisor, ensuring the target ISO SR exists beforehand."
|
|
@@ -27087,7 +27296,7 @@ function parseMapValue(raw) {
|
|
|
27087
27296
|
return acc;
|
|
27088
27297
|
}, {});
|
|
27089
27298
|
}
|
|
27090
|
-
async function
|
|
27299
|
+
async function run235(context) {
|
|
27091
27300
|
const { params, error } = context;
|
|
27092
27301
|
const {
|
|
27093
27302
|
vm_uuid: vmUuidParam,
|
|
@@ -27225,7 +27434,7 @@ async function run234(context) {
|
|
|
27225
27434
|
}
|
|
27226
27435
|
return result;
|
|
27227
27436
|
}
|
|
27228
|
-
var get_vm_info_default = task(
|
|
27437
|
+
var get_vm_info_default = task(run235, {
|
|
27229
27438
|
inputSchema: XcpngGetVmInfoParamsSchema,
|
|
27230
27439
|
outputSchema: XcpngGetVmInfoResultSchema,
|
|
27231
27440
|
description: "Returns structured VM details (platform, boot configuration, memory/CPU sizing, and optional VBD/VIF inventory)."
|
|
@@ -27249,7 +27458,7 @@ var XcpngExportVdiResultSchema = z.object({
|
|
|
27249
27458
|
skipped: z.boolean().optional(),
|
|
27250
27459
|
error: z.string().optional()
|
|
27251
27460
|
});
|
|
27252
|
-
async function
|
|
27461
|
+
async function run236(context) {
|
|
27253
27462
|
const { params, error } = context;
|
|
27254
27463
|
const {
|
|
27255
27464
|
vdi_uuid: vdiUuidParam,
|
|
@@ -27329,7 +27538,7 @@ async function run235(context) {
|
|
|
27329
27538
|
appliedCommands
|
|
27330
27539
|
};
|
|
27331
27540
|
}
|
|
27332
|
-
var export_vdi_default = task(
|
|
27541
|
+
var export_vdi_default = task(run236, {
|
|
27333
27542
|
inputSchema: XcpngExportVdiParamsSchema,
|
|
27334
27543
|
outputSchema: XcpngExportVdiResultSchema,
|
|
27335
27544
|
description: "Exports a VDI to the hypervisor filesystem via xe vdi-export."
|
|
@@ -27383,7 +27592,7 @@ var XcpngProvisionVmFromIsoResultSchema = z.object({
|
|
|
27383
27592
|
steps: z.array(z.any()),
|
|
27384
27593
|
error: z.string().optional()
|
|
27385
27594
|
});
|
|
27386
|
-
async function
|
|
27595
|
+
async function run237(context) {
|
|
27387
27596
|
if (!context.host) {
|
|
27388
27597
|
return {
|
|
27389
27598
|
success: false,
|
|
@@ -27710,7 +27919,7 @@ async function run236(context) {
|
|
|
27710
27919
|
steps
|
|
27711
27920
|
};
|
|
27712
27921
|
}
|
|
27713
|
-
var provision_vm_from_iso_default = task(
|
|
27922
|
+
var provision_vm_from_iso_default = task(run237, {
|
|
27714
27923
|
inputSchema: XcpngProvisionVmFromIsoParamsSchema,
|
|
27715
27924
|
outputSchema: XcpngProvisionVmFromIsoResultSchema,
|
|
27716
27925
|
description: "Creates a VM from a template, attaches storage, network, and ISO media, and optionally boots it for installation."
|
|
@@ -28740,7 +28949,7 @@ function resolveMemoryMib(input) {
|
|
|
28740
28949
|
}
|
|
28741
28950
|
return { value: Math.floor(value) };
|
|
28742
28951
|
}
|
|
28743
|
-
async function
|
|
28952
|
+
async function run238(context) {
|
|
28744
28953
|
if (!context.host) {
|
|
28745
28954
|
return runLocal(context);
|
|
28746
28955
|
}
|
|
@@ -28953,7 +29162,7 @@ function buildLocalFailure(step, message) {
|
|
|
28953
29162
|
error: message
|
|
28954
29163
|
};
|
|
28955
29164
|
}
|
|
28956
|
-
var provision_vm_default = task(
|
|
29165
|
+
var provision_vm_default = task(run238, {
|
|
28957
29166
|
inputSchema: XcpngProvisionVmParamsSchema,
|
|
28958
29167
|
outputSchema: XcpngProvisionVmResultSchema,
|
|
28959
29168
|
description: "Provisions a VM from an XCP-ng template by cloning its root disk, configuring cloud-init metadata, and attaching network resources."
|
|
@@ -29019,7 +29228,7 @@ var XcpngSnapshotVmResultSchema = z.object({
|
|
|
29019
29228
|
command: z.string().optional(),
|
|
29020
29229
|
error: z.string().optional()
|
|
29021
29230
|
});
|
|
29022
|
-
async function
|
|
29231
|
+
async function run239(context) {
|
|
29023
29232
|
const { params, error } = context;
|
|
29024
29233
|
const {
|
|
29025
29234
|
vm_uuid: vmUuidParam,
|
|
@@ -29089,7 +29298,7 @@ async function run238(context) {
|
|
|
29089
29298
|
command: snapshotResult.command
|
|
29090
29299
|
};
|
|
29091
29300
|
}
|
|
29092
|
-
var snapshot_vm_default = task(
|
|
29301
|
+
var snapshot_vm_default = task(run239, {
|
|
29093
29302
|
inputSchema: XcpngSnapshotVmParamsSchema,
|
|
29094
29303
|
outputSchema: XcpngSnapshotVmResultSchema,
|
|
29095
29304
|
description: "Creates a snapshot of an XCP-ng VM (optionally with quiesce)."
|
|
@@ -29116,7 +29325,7 @@ var XcpngImportVdiResultSchema = z.object({
|
|
|
29116
29325
|
appliedCommands: z.array(z.string()),
|
|
29117
29326
|
error: z.string().optional()
|
|
29118
29327
|
});
|
|
29119
|
-
async function
|
|
29328
|
+
async function run240(context) {
|
|
29120
29329
|
const { params, error } = context;
|
|
29121
29330
|
const {
|
|
29122
29331
|
sr_uuid: srUuidParam,
|
|
@@ -29238,7 +29447,7 @@ async function run239(context) {
|
|
|
29238
29447
|
appliedCommands
|
|
29239
29448
|
};
|
|
29240
29449
|
}
|
|
29241
|
-
var import_vdi_default = task(
|
|
29450
|
+
var import_vdi_default = task(run240, {
|
|
29242
29451
|
inputSchema: XcpngImportVdiParamsSchema,
|
|
29243
29452
|
outputSchema: XcpngImportVdiResultSchema,
|
|
29244
29453
|
description: "Imports a VDI file into a storage repository via xe vdi-import."
|
|
@@ -29340,7 +29549,7 @@ var XcpngVmMigrateResultSchema = z.object({
|
|
|
29340
29549
|
skipped: z.boolean().optional(),
|
|
29341
29550
|
error: z.string().optional()
|
|
29342
29551
|
});
|
|
29343
|
-
async function
|
|
29552
|
+
async function run241(context) {
|
|
29344
29553
|
const { params, error } = context;
|
|
29345
29554
|
const {
|
|
29346
29555
|
vm_uuid: vmUuidParam,
|
|
@@ -29464,7 +29673,7 @@ async function run240(context) {
|
|
|
29464
29673
|
appliedCommands
|
|
29465
29674
|
};
|
|
29466
29675
|
}
|
|
29467
|
-
var vm_migrate_default = task(
|
|
29676
|
+
var vm_migrate_default = task(run241, {
|
|
29468
29677
|
inputSchema: XcpngVmMigrateParamsSchema,
|
|
29469
29678
|
outputSchema: XcpngVmMigrateResultSchema,
|
|
29470
29679
|
description: "Migrates a VM to another host (and optionally storage repository) via xe vm-migrate."
|
|
@@ -29489,7 +29698,7 @@ var XcpngVmExportResultSchema = z.object({
|
|
|
29489
29698
|
skipped: z.boolean().optional(),
|
|
29490
29699
|
error: z.string().optional()
|
|
29491
29700
|
});
|
|
29492
|
-
async function
|
|
29701
|
+
async function run242(context) {
|
|
29493
29702
|
const { params, error } = context;
|
|
29494
29703
|
const {
|
|
29495
29704
|
vm_uuid: vmUuidParam,
|
|
@@ -29578,7 +29787,7 @@ async function run241(context) {
|
|
|
29578
29787
|
appliedCommands
|
|
29579
29788
|
};
|
|
29580
29789
|
}
|
|
29581
|
-
var vm_export_default = task(
|
|
29790
|
+
var vm_export_default = task(run242, {
|
|
29582
29791
|
inputSchema: XcpngVmExportParamsSchema,
|
|
29583
29792
|
outputSchema: XcpngVmExportResultSchema,
|
|
29584
29793
|
description: "Exports a VM to an XVA file via xe vm-export."
|
|
@@ -29600,7 +29809,7 @@ var XcpngVmImportResultSchema = z.object({
|
|
|
29600
29809
|
appliedCommands: z.array(z.string()),
|
|
29601
29810
|
error: z.string().optional()
|
|
29602
29811
|
});
|
|
29603
|
-
async function
|
|
29812
|
+
async function run243(context) {
|
|
29604
29813
|
const { params, error } = context;
|
|
29605
29814
|
const {
|
|
29606
29815
|
filename,
|
|
@@ -29669,7 +29878,7 @@ async function run242(context) {
|
|
|
29669
29878
|
appliedCommands
|
|
29670
29879
|
};
|
|
29671
29880
|
}
|
|
29672
|
-
var vm_import_default = task(
|
|
29881
|
+
var vm_import_default = task(run243, {
|
|
29673
29882
|
inputSchema: XcpngVmImportParamsSchema,
|
|
29674
29883
|
outputSchema: XcpngVmImportResultSchema,
|
|
29675
29884
|
description: "Imports a VM image from an XVA file via xe vm-import."
|
|
@@ -29696,7 +29905,7 @@ var XcpngVmCopyResultSchema = z.object({
|
|
|
29696
29905
|
skipped: z.boolean().optional(),
|
|
29697
29906
|
error: z.string().optional()
|
|
29698
29907
|
});
|
|
29699
|
-
async function
|
|
29908
|
+
async function run244(context) {
|
|
29700
29909
|
const { params, error } = context;
|
|
29701
29910
|
const {
|
|
29702
29911
|
vm_uuid: vmUuidParam,
|
|
@@ -29823,7 +30032,7 @@ async function run243(context) {
|
|
|
29823
30032
|
appliedCommands
|
|
29824
30033
|
};
|
|
29825
30034
|
}
|
|
29826
|
-
var vm_copy_default = task(
|
|
30035
|
+
var vm_copy_default = task(run244, {
|
|
29827
30036
|
inputSchema: XcpngVmCopyParamsSchema,
|
|
29828
30037
|
outputSchema: XcpngVmCopyResultSchema,
|
|
29829
30038
|
description: "Creates a full copy of a VM, optionally targeting a different SR."
|
|
@@ -29843,7 +30052,7 @@ var XcpngDetachCdMediaResultSchema = z.object({
|
|
|
29843
30052
|
error: z.string().optional(),
|
|
29844
30053
|
skipped: z.boolean().optional()
|
|
29845
30054
|
});
|
|
29846
|
-
async function
|
|
30055
|
+
async function run245(context) {
|
|
29847
30056
|
if (!context.host) {
|
|
29848
30057
|
return {
|
|
29849
30058
|
success: false,
|
|
@@ -29980,7 +30189,7 @@ function filterCdDisks(disks) {
|
|
|
29980
30189
|
}
|
|
29981
30190
|
return results;
|
|
29982
30191
|
}
|
|
29983
|
-
var detach_cd_media_default = task(
|
|
30192
|
+
var detach_cd_media_default = task(run245, {
|
|
29984
30193
|
inputSchema: XcpngDetachCdMediaParamsSchema,
|
|
29985
30194
|
outputSchema: XcpngDetachCdMediaResultSchema,
|
|
29986
30195
|
description: "Detaches CD/DVD virtual media from a VM by unplugging and destroying associated VBDs."
|
|
@@ -30003,7 +30212,7 @@ var XcpngCleanupConfigDriveResultSchema = z.object({
|
|
|
30003
30212
|
error: z.string().optional(),
|
|
30004
30213
|
skipped: z.boolean().optional()
|
|
30005
30214
|
});
|
|
30006
|
-
async function
|
|
30215
|
+
async function run246(context) {
|
|
30007
30216
|
if (!context.host) {
|
|
30008
30217
|
return {
|
|
30009
30218
|
success: false,
|
|
@@ -30203,7 +30412,7 @@ async function run245(context) {
|
|
|
30203
30412
|
steps
|
|
30204
30413
|
};
|
|
30205
30414
|
}
|
|
30206
|
-
var cleanup_config_drive_default = task(
|
|
30415
|
+
var cleanup_config_drive_default = task(run246, {
|
|
30207
30416
|
inputSchema: XcpngCleanupConfigDriveParamsSchema,
|
|
30208
30417
|
outputSchema: XcpngCleanupConfigDriveResultSchema,
|
|
30209
30418
|
description: "Detaches an attached config-drive ISO from a VM and removes the associated VDI once the guest is halted."
|
|
@@ -30342,7 +30551,7 @@ var YumAddRepositoryResultSchema = z.object({
|
|
|
30342
30551
|
error: z.string().optional()
|
|
30343
30552
|
})
|
|
30344
30553
|
);
|
|
30345
|
-
async function
|
|
30554
|
+
async function run247(context) {
|
|
30346
30555
|
const { params, exec, info, error } = context;
|
|
30347
30556
|
const { content, name, sudo = true } = params;
|
|
30348
30557
|
if (!content) {
|
|
@@ -30374,7 +30583,7 @@ EOF`;
|
|
|
30374
30583
|
return { success: false, error: errorMsg };
|
|
30375
30584
|
}
|
|
30376
30585
|
}
|
|
30377
|
-
var add_repository_default2 = task(
|
|
30586
|
+
var add_repository_default2 = task(run247, {
|
|
30378
30587
|
description: "Adds a YUM repository.",
|
|
30379
30588
|
inputSchema: YumAddRepositoryParamsSchema,
|
|
30380
30589
|
outputSchema: YumAddRepositoryResultSchema
|
|
@@ -30400,7 +30609,7 @@ var DownloadOutputSchema = z.object({
|
|
|
30400
30609
|
path: z.string().optional(),
|
|
30401
30610
|
error: z.string().optional()
|
|
30402
30611
|
});
|
|
30403
|
-
async function
|
|
30612
|
+
async function run248(context) {
|
|
30404
30613
|
const { params, info, error, exec } = context;
|
|
30405
30614
|
const { url, dest, mode, sudo = false } = params;
|
|
30406
30615
|
if (!url || !dest) {
|
|
@@ -30445,7 +30654,7 @@ async function run247(context) {
|
|
|
30445
30654
|
return { success: false, error: errorMsg };
|
|
30446
30655
|
}
|
|
30447
30656
|
}
|
|
30448
|
-
var download_default = task(
|
|
30657
|
+
var download_default = task(run248, {
|
|
30449
30658
|
description: "Downloads a file from a URL using curl or wget.",
|
|
30450
30659
|
inputSchema: DownloadInputSchema,
|
|
30451
30660
|
outputSchema: DownloadOutputSchema
|
|
@@ -30476,7 +30685,7 @@ var InterfacesOutputSchema = z.object({
|
|
|
30476
30685
|
error: z.string()
|
|
30477
30686
|
})
|
|
30478
30687
|
);
|
|
30479
|
-
async function
|
|
30688
|
+
async function run249(context) {
|
|
30480
30689
|
const { params, info, error, exec } = context;
|
|
30481
30690
|
const { sudo = false } = params;
|
|
30482
30691
|
try {
|
|
@@ -30568,7 +30777,7 @@ async function run248(context) {
|
|
|
30568
30777
|
return { success: false, error: errorMsg };
|
|
30569
30778
|
}
|
|
30570
30779
|
}
|
|
30571
|
-
var interfaces_default = task(
|
|
30780
|
+
var interfaces_default = task(run249, {
|
|
30572
30781
|
name: "interfaces",
|
|
30573
30782
|
description: "Lists network interfaces with their properties.",
|
|
30574
30783
|
inputSchema: InterfacesInputSchema,
|
|
@@ -30594,7 +30803,7 @@ var NftablesApplyOutputSchema = z.object({
|
|
|
30594
30803
|
error: z.string().optional()
|
|
30595
30804
|
})
|
|
30596
30805
|
);
|
|
30597
|
-
async function
|
|
30806
|
+
async function run250(context) {
|
|
30598
30807
|
const { params, exec, info } = context;
|
|
30599
30808
|
const { config } = params;
|
|
30600
30809
|
if (!config) {
|
|
@@ -30618,7 +30827,7 @@ async function run249(context) {
|
|
|
30618
30827
|
return { success: false, error };
|
|
30619
30828
|
}
|
|
30620
30829
|
}
|
|
30621
|
-
var apply_default = task(
|
|
30830
|
+
var apply_default = task(run250, {
|
|
30622
30831
|
description: "Applies an nftables configuration.",
|
|
30623
30832
|
inputSchema: NftablesApplyInputSchema,
|
|
30624
30833
|
outputSchema: NftablesApplyOutputSchema
|
|
@@ -30641,7 +30850,7 @@ var FirewalldDisableResultSchema = z.object({
|
|
|
30641
30850
|
success: z.boolean(),
|
|
30642
30851
|
error: z.string().optional()
|
|
30643
30852
|
});
|
|
30644
|
-
async function
|
|
30853
|
+
async function run251(context) {
|
|
30645
30854
|
const { run: runTask, debug, error, info } = context;
|
|
30646
30855
|
const statusResult = await runTask(status_default({ service: "firewalld", sudo: true }));
|
|
30647
30856
|
if (!statusResult.success && (statusResult.error?.includes("Could not find") || statusResult.error?.includes("not-found"))) {
|
|
@@ -30665,7 +30874,7 @@ async function run250(context) {
|
|
|
30665
30874
|
info("firewalld service disabled successfully.");
|
|
30666
30875
|
return { success: true };
|
|
30667
30876
|
}
|
|
30668
|
-
var disable_default3 = task(
|
|
30877
|
+
var disable_default3 = task(run251, {
|
|
30669
30878
|
description: "Disables and stops the firewalld service.",
|
|
30670
30879
|
inputSchema: FirewalldDisableInputSchema,
|
|
30671
30880
|
outputSchema: FirewalldDisableResultSchema
|
|
@@ -31650,6 +31859,23 @@ var Cli = class {
|
|
|
31650
31859
|
taskFilter = spec;
|
|
31651
31860
|
spec = ".";
|
|
31652
31861
|
}
|
|
31862
|
+
if (spec === "core") {
|
|
31863
|
+
const coreRoot2 = path12.resolve(path12.dirname(fileURLToPath2(import.meta.url)), "core");
|
|
31864
|
+
const rows2 = registry.tasks().map(([name, taskFn]) => {
|
|
31865
|
+
const task6 = taskFn.task;
|
|
31866
|
+
const moduleRel = task6.taskModuleAbsolutePath ? path12.relative(coreRoot2, task6.taskModuleAbsolutePath) || path12.basename(task6.taskModuleAbsolutePath) : void 0;
|
|
31867
|
+
return {
|
|
31868
|
+
name,
|
|
31869
|
+
description: task6.description ?? "",
|
|
31870
|
+
module: moduleRel,
|
|
31871
|
+
inputSchema: task6.inputSchema,
|
|
31872
|
+
outputSchema: task6.outputSchema,
|
|
31873
|
+
schemaSource: task6.inputSchema || task6.outputSchema ? "present" : "absent"
|
|
31874
|
+
};
|
|
31875
|
+
}).filter((row) => taskFilter ? row.name === taskFilter : true);
|
|
31876
|
+
renderTaskRows(rows2, { target: "core registry", taskFilter, json: opts.json });
|
|
31877
|
+
return;
|
|
31878
|
+
}
|
|
31653
31879
|
const specPath = Path.new(spec);
|
|
31654
31880
|
let packagePath = null;
|
|
31655
31881
|
if (specPath.exists()) {
|
|
@@ -31685,44 +31911,51 @@ var Cli = class {
|
|
|
31685
31911
|
schemaSource: m.schemaSource
|
|
31686
31912
|
};
|
|
31687
31913
|
});
|
|
31688
|
-
|
|
31689
|
-
const sanitized = rows.map((r) => ({
|
|
31690
|
-
name: r.name,
|
|
31691
|
-
description: r.description,
|
|
31692
|
-
module: r.module,
|
|
31693
|
-
inputSchema: Boolean(r.inputSchema),
|
|
31694
|
-
outputSchema: Boolean(r.outputSchema),
|
|
31695
|
-
schemaSource: r.schemaSource
|
|
31696
|
-
}));
|
|
31697
|
-
console.log(JSON.stringify(sanitized, null, 2));
|
|
31698
|
-
return;
|
|
31699
|
-
}
|
|
31700
|
-
if (rows.length === 0) {
|
|
31701
|
-
const target = taskFilter ? `${taskFilter} in ${packagePath}` : packagePath;
|
|
31702
|
-
console.log(`No tasks found in ${target}`);
|
|
31703
|
-
return;
|
|
31704
|
-
}
|
|
31705
|
-
console.log(`Tasks in ${packagePath}${taskFilter ? ` (filtered to ${taskFilter})` : ""}:`);
|
|
31706
|
-
rows.forEach((row) => {
|
|
31707
|
-
console.log(`- ${row.name}${row.module ? ` (${row.module})` : ""}`);
|
|
31708
|
-
console.log(` description: ${row.description || "no description"}`);
|
|
31709
|
-
if (row.inputSchema) {
|
|
31710
|
-
const lines = formatSchemaLines(row.inputSchema);
|
|
31711
|
-
if (lines.length) {
|
|
31712
|
-
console.log(" input:");
|
|
31713
|
-
lines.forEach((line) => console.log(` ${line}`));
|
|
31714
|
-
}
|
|
31715
|
-
}
|
|
31716
|
-
if (row.outputSchema) {
|
|
31717
|
-
const lines = formatSchemaLines(row.outputSchema);
|
|
31718
|
-
if (lines.length) {
|
|
31719
|
-
console.log(" output:");
|
|
31720
|
-
lines.forEach((line) => console.log(` ${line}`));
|
|
31721
|
-
}
|
|
31722
|
-
}
|
|
31723
|
-
});
|
|
31914
|
+
renderTaskRows(rows, { target: packagePath, taskFilter, json: opts.json });
|
|
31724
31915
|
}
|
|
31725
31916
|
};
|
|
31917
|
+
function renderTaskRows(rows, {
|
|
31918
|
+
target,
|
|
31919
|
+
taskFilter,
|
|
31920
|
+
json
|
|
31921
|
+
}) {
|
|
31922
|
+
if (json) {
|
|
31923
|
+
const sanitized = rows.map((r) => ({
|
|
31924
|
+
name: r.name,
|
|
31925
|
+
description: r.description,
|
|
31926
|
+
module: r.module,
|
|
31927
|
+
inputSchema: Boolean(r.inputSchema),
|
|
31928
|
+
outputSchema: Boolean(r.outputSchema),
|
|
31929
|
+
schemaSource: r.schemaSource
|
|
31930
|
+
}));
|
|
31931
|
+
console.log(JSON.stringify(sanitized, null, 2));
|
|
31932
|
+
return;
|
|
31933
|
+
}
|
|
31934
|
+
if (rows.length === 0) {
|
|
31935
|
+
const targetLabel = taskFilter ? `${taskFilter} in ${target}` : target;
|
|
31936
|
+
console.log(`No tasks found in ${targetLabel}`);
|
|
31937
|
+
return;
|
|
31938
|
+
}
|
|
31939
|
+
console.log(`Tasks in ${target}${taskFilter ? ` (filtered to ${taskFilter})` : ""}:`);
|
|
31940
|
+
rows.forEach((row) => {
|
|
31941
|
+
console.log(`- ${row.name}${row.module ? ` (${row.module})` : ""}`);
|
|
31942
|
+
console.log(` description: ${row.description || "no description"}`);
|
|
31943
|
+
if (row.inputSchema) {
|
|
31944
|
+
const lines = formatSchemaLines(row.inputSchema);
|
|
31945
|
+
if (lines.length) {
|
|
31946
|
+
console.log(" input:");
|
|
31947
|
+
lines.forEach((line) => console.log(` ${line}`));
|
|
31948
|
+
}
|
|
31949
|
+
}
|
|
31950
|
+
if (row.outputSchema) {
|
|
31951
|
+
const lines = formatSchemaLines(row.outputSchema);
|
|
31952
|
+
if (lines.length) {
|
|
31953
|
+
console.log(" output:");
|
|
31954
|
+
lines.forEach((line) => console.log(` ${line}`));
|
|
31955
|
+
}
|
|
31956
|
+
}
|
|
31957
|
+
});
|
|
31958
|
+
}
|
|
31726
31959
|
function summarizeType(val) {
|
|
31727
31960
|
const def = val?._def ?? val?.def;
|
|
31728
31961
|
const tn = def?.typeName || def?.type;
|
|
@@ -32667,7 +32900,7 @@ function serializeError(value) {
|
|
|
32667
32900
|
}
|
|
32668
32901
|
return { error: String(value) };
|
|
32669
32902
|
}
|
|
32670
|
-
async function
|
|
32903
|
+
async function run252(context) {
|
|
32671
32904
|
const { params, ssh } = context;
|
|
32672
32905
|
const { taskFn, params: taskParams } = params;
|
|
32673
32906
|
const remoteResults = await ssh([], async (remoteContext) => {
|
|
@@ -32696,7 +32929,7 @@ async function run251(context) {
|
|
|
32696
32929
|
});
|
|
32697
32930
|
return Object.fromEntries(normalizedEntries);
|
|
32698
32931
|
}
|
|
32699
|
-
var runAllRemote_default = task(
|
|
32932
|
+
var runAllRemote_default = task(run252, {
|
|
32700
32933
|
description: "run a task on all selected hosts",
|
|
32701
32934
|
inputSchema: RunParamsSchema,
|
|
32702
32935
|
outputSchema: RunResultSchema
|