@ornncompute/cli 1.0.148 → 1.0.150
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/package.json +1 -1
- package/src/admin-command-handlers.mjs +1 -1
- package/src/admin-node-lifecycle.mjs +3 -0
- package/src/admin-shell.mjs +1 -1
- package/src/catalog-shell.mjs +3 -3
- package/src/evidence-commands.mjs +6 -2
- package/src/kubernetes-commands.mjs +54 -49
- package/src/machine-reference.mjs +2 -1
- package/src/vm-commands.mjs +49 -54
- package/vendor/api-client/gateway.js +0 -16
- package/vendor/api-client/orchestrator.js +58 -16
- package/vendor/capabilities/cli.js +2808 -2732
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export function adminCommandHandler(capability) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function commandParts(capability) {
|
|
25
|
-
return capability.cli?.
|
|
25
|
+
return capability.cli?.command ?? [];
|
|
26
26
|
}
|
|
27
27
|
function matchedAdminCapability(catalog, argv) {
|
|
28
28
|
return catalog.find((candidate) => {
|
|
@@ -779,6 +779,9 @@ export async function runAdminNodeLifecycle({
|
|
|
779
779
|
const executionInput = {
|
|
780
780
|
...input,
|
|
781
781
|
node_id: value.node_id,
|
|
782
|
+
...(command === "assign"
|
|
783
|
+
? { expected_reservation_id: reservationId(value.node) || null }
|
|
784
|
+
: {}),
|
|
782
785
|
...(value.live_machine ? { machine_id: value.live_machine.id } : {}),
|
|
783
786
|
};
|
|
784
787
|
return execute(executionInput, { confirmed: true });
|
package/src/admin-shell.mjs
CHANGED
package/src/catalog-shell.mjs
CHANGED
|
@@ -158,7 +158,7 @@ function extractFormat(argv) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
function vnextCommand(capability) {
|
|
161
|
-
return capability.cli?.
|
|
161
|
+
return capability.cli?.command ?? [];
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
function customerCommands(catalog) {
|
|
@@ -945,9 +945,9 @@ async function executeCapability(
|
|
|
945
945
|
signal: io.signal,
|
|
946
946
|
sleep: io.sleep,
|
|
947
947
|
stderr: io.stderr ?? process.stderr,
|
|
948
|
-
cluster(command, clusterInput) {
|
|
948
|
+
cluster(command, clusterInput, context) {
|
|
949
949
|
return executeKubernetesClusterCommand(command, clusterInput, {
|
|
950
|
-
fetch:
|
|
950
|
+
fetch: context.fetch,
|
|
951
951
|
interaction: this,
|
|
952
952
|
now: io.now,
|
|
953
953
|
signal: io.signal,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
clusterListCapability,
|
|
3
|
+
metricsSnapshotCapability,
|
|
4
|
+
metricsHistoryCapability,
|
|
5
|
+
} from "../vendor/capabilities/cli.js";
|
|
2
6
|
import * as gatewayApi from "../vendor/api-client/gateway.js";
|
|
3
7
|
import { gpuLabeler } from "./gpu-catalog.mjs";
|
|
4
8
|
import { clusterFactLabel, reservationFactsForCluster } from "./kubernetes-commands.mjs";
|
|
@@ -416,7 +420,7 @@ async function activeMachines(fetch, interaction) {
|
|
|
416
420
|
}
|
|
417
421
|
|
|
418
422
|
async function clusters(fetch, interaction) {
|
|
419
|
-
const payload = await
|
|
423
|
+
const payload = await clusterListCapability.execute({ actor: "", role: "user", fetch }, {});
|
|
420
424
|
const rows = payloadRows(payload, "clusters");
|
|
421
425
|
if (!rows)
|
|
422
426
|
interaction.error("The gateway returned an invalid cluster collection.", {
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import * as gatewayApi from "../vendor/api-client/gateway.js";
|
|
2
|
+
import {
|
|
3
|
+
clusterCreateCapability,
|
|
4
|
+
clusterAddNodeCapability,
|
|
5
|
+
clusterRemoveNodeCapability,
|
|
6
|
+
clusterListCapability,
|
|
7
|
+
clusterShowCapability,
|
|
8
|
+
clusterCredentialsCapability,
|
|
9
|
+
clusterTeardownCapability,
|
|
10
|
+
} from "../vendor/capabilities/cli.js";
|
|
2
11
|
import { getReservation } from "../vendor/api-client/commerce.js";
|
|
3
12
|
import { createHash } from "node:crypto";
|
|
4
13
|
|
|
@@ -93,7 +102,7 @@ function memberLifecycle(value) {
|
|
|
93
102
|
return { class: "working", phase: state };
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
function projectCluster(value) {
|
|
105
|
+
function projectCluster(value, reservationId) {
|
|
97
106
|
const source = record(value);
|
|
98
107
|
const rawMembers = Array.isArray(source.machines)
|
|
99
108
|
? source.machines
|
|
@@ -109,7 +118,7 @@ function projectCluster(value) {
|
|
|
109
118
|
});
|
|
110
119
|
const cluster = {
|
|
111
120
|
id: text(source.id),
|
|
112
|
-
reservation_id: text(source.reservation_id),
|
|
121
|
+
reservation_id: text(source.reservation_id) ?? reservationId ?? null,
|
|
113
122
|
access_mode: cleanState(source.access_mode),
|
|
114
123
|
lifecycle: null,
|
|
115
124
|
network_mode: text(source.network_mode),
|
|
@@ -136,7 +145,7 @@ function clusterLines(cluster) {
|
|
|
136
145
|
}
|
|
137
146
|
|
|
138
147
|
async function fetchClusters(fetch) {
|
|
139
|
-
const payload = await
|
|
148
|
+
const payload = await clusterListCapability.execute({ actor: "", role: "user", fetch }, {});
|
|
140
149
|
const rows = Array.isArray(payload)
|
|
141
150
|
? payload
|
|
142
151
|
: Array.isArray(record(payload).clusters)
|
|
@@ -231,11 +240,13 @@ async function resolveCluster(fetch, runtime, input) {
|
|
|
231
240
|
async function fetchClusterDetail(fetch, runtime, cluster, { allowMissing = false, signal } = {}) {
|
|
232
241
|
let payload;
|
|
233
242
|
try {
|
|
234
|
-
payload = await
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
243
|
+
payload = await clusterShowCapability.execute(
|
|
244
|
+
{
|
|
245
|
+
actor: "",
|
|
246
|
+
role: "user",
|
|
247
|
+
fetch: signal ? (path, init) => fetch(path, { ...init, signal }) : fetch,
|
|
248
|
+
},
|
|
249
|
+
{ type: cluster.access_mode, reservationId: cluster.reservation_id }
|
|
239
250
|
);
|
|
240
251
|
} catch (error) {
|
|
241
252
|
if (allowMissing && error?.status === 404) return null;
|
|
@@ -553,11 +564,13 @@ function partialClusterExecution(runtime, cluster, accepted = {}) {
|
|
|
553
564
|
async function clusterAccessIsReady(fetch, cluster, signal) {
|
|
554
565
|
try {
|
|
555
566
|
const credentials = record(
|
|
556
|
-
await
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
567
|
+
await clusterCredentialsCapability.execute(
|
|
568
|
+
{
|
|
569
|
+
actor: "",
|
|
570
|
+
role: "user",
|
|
571
|
+
fetch: signal ? (path, init) => fetch(path, { ...init, signal }) : fetch,
|
|
572
|
+
},
|
|
573
|
+
{ type: cluster.access_mode, reservationId: cluster.reservation_id }
|
|
561
574
|
)
|
|
562
575
|
);
|
|
563
576
|
if (cluster.access_mode === "slurm") {
|
|
@@ -1277,20 +1290,17 @@ export async function launchClusterMode(
|
|
|
1277
1290
|
});
|
|
1278
1291
|
}
|
|
1279
1292
|
if (selectedKeyId && requested.ssh_key) requested.ssh_key.id = selectedKeyId;
|
|
1280
|
-
const response = await
|
|
1281
|
-
|
|
1282
|
-
accessMode,
|
|
1293
|
+
const response = await clusterCreateCapability.execute(context, {
|
|
1294
|
+
type: accessMode,
|
|
1283
1295
|
reservationId,
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
);
|
|
1293
|
-
let cluster = projectCluster(response);
|
|
1296
|
+
networkMode,
|
|
1297
|
+
...(membershipCount > 0 ? { nodeCount: membershipCount } : {}),
|
|
1298
|
+
nodeIds: selectedIds,
|
|
1299
|
+
...(virtualMachineIds.length ? { virtualMachineIds } : {}),
|
|
1300
|
+
...(selectedKeyId ? { sshKeyIds: [selectedKeyId] } : {}),
|
|
1301
|
+
idempotencyKey,
|
|
1302
|
+
});
|
|
1303
|
+
let cluster = projectCluster(response, reservationId);
|
|
1294
1304
|
if (!UUID.test(cluster.id ?? "")) {
|
|
1295
1305
|
cluster = await existingReservationCluster(context.fetch, runtime, reservationId, accessMode);
|
|
1296
1306
|
}
|
|
@@ -1551,11 +1561,9 @@ async function addNode(input, deps) {
|
|
|
1551
1561
|
code: "cluster_eligibility_changed",
|
|
1552
1562
|
});
|
|
1553
1563
|
}
|
|
1554
|
-
await
|
|
1555
|
-
deps.fetch,
|
|
1556
|
-
current.
|
|
1557
|
-
{ node_id: machine.id },
|
|
1558
|
-
{ headers: { "Idempotency-Key": prepared.idempotencyKey } }
|
|
1564
|
+
await clusterAddNodeCapability.execute(
|
|
1565
|
+
{ actor: "", role: "user", fetch: deps.fetch },
|
|
1566
|
+
{ controllerId: current.id, nodeId: machine.id, idempotencyKey: prepared.idempotencyKey }
|
|
1559
1567
|
);
|
|
1560
1568
|
const accepted = { membership_goal: goalIds, replayed: false };
|
|
1561
1569
|
if (!shouldWait(deps.interaction, input))
|
|
@@ -1641,9 +1649,10 @@ async function removeNode(input, deps) {
|
|
|
1641
1649
|
code: "cluster_membership_changed",
|
|
1642
1650
|
});
|
|
1643
1651
|
}
|
|
1644
|
-
await
|
|
1645
|
-
|
|
1646
|
-
|
|
1652
|
+
await clusterRemoveNodeCapability.execute(
|
|
1653
|
+
{ actor: "", role: "user", fetch: deps.fetch },
|
|
1654
|
+
{ controllerId: current.id, nodeId: machine.id, idempotencyKey: prepared.idempotencyKey }
|
|
1655
|
+
);
|
|
1647
1656
|
const accepted = { membership_goal: goalIds, replayed: false };
|
|
1648
1657
|
if (!shouldWait(deps.interaction, input))
|
|
1649
1658
|
return deps.interaction.result({
|
|
@@ -1713,11 +1722,9 @@ async function teardownCluster(input, deps) {
|
|
|
1713
1722
|
code: "cluster_membership_changed",
|
|
1714
1723
|
});
|
|
1715
1724
|
}
|
|
1716
|
-
await
|
|
1717
|
-
deps.fetch,
|
|
1718
|
-
current.access_mode,
|
|
1719
|
-
current.reservation_id,
|
|
1720
|
-
{ headers: { "Idempotency-Key": idempotencyKey } }
|
|
1725
|
+
await clusterTeardownCapability.execute(
|
|
1726
|
+
{ actor: "", role: "user", fetch: deps.fetch },
|
|
1727
|
+
{ type: current.access_mode, reservationId: current.reservation_id, idempotencyKey }
|
|
1721
1728
|
);
|
|
1722
1729
|
const accepted = {
|
|
1723
1730
|
replayed: false,
|
|
@@ -1901,11 +1908,10 @@ export async function readClusterModeConnectContext(state, accessMode) {
|
|
|
1901
1908
|
let credentialError = null;
|
|
1902
1909
|
try {
|
|
1903
1910
|
credentials = record(
|
|
1904
|
-
await
|
|
1905
|
-
|
|
1906
|
-
current.
|
|
1907
|
-
|
|
1908
|
-
)
|
|
1911
|
+
await clusterCredentialsCapability.execute(state.context, {
|
|
1912
|
+
type: current.access_mode,
|
|
1913
|
+
reservationId: current.reservation_id,
|
|
1914
|
+
})
|
|
1909
1915
|
);
|
|
1910
1916
|
} catch (error) {
|
|
1911
1917
|
const status = Number(error?.status);
|
|
@@ -2042,11 +2048,10 @@ export const kubernetesConnectModeHandler = {
|
|
|
2042
2048
|
});
|
|
2043
2049
|
}
|
|
2044
2050
|
const credentials = record(
|
|
2045
|
-
await
|
|
2046
|
-
|
|
2047
|
-
current.
|
|
2048
|
-
|
|
2049
|
-
)
|
|
2051
|
+
await clusterCredentialsCapability.execute(state.context, {
|
|
2052
|
+
type: current.access_mode,
|
|
2053
|
+
reservationId: current.reservation_id,
|
|
2054
|
+
})
|
|
2050
2055
|
);
|
|
2051
2056
|
const kubeconfig =
|
|
2052
2057
|
typeof credentials.kubeconfig === "string" && credentials.kubeconfig.trim()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { accessShowCapability } from "../vendor/capabilities/cli.js";
|
|
1
2
|
import * as orchestrator from "../vendor/api-client/orchestrator.js";
|
|
2
3
|
import { getCliSession } from "../vendor/api-client/authorization.js";
|
|
3
4
|
import { listAllReservations } from "../vendor/api-client/commerce.js";
|
|
@@ -152,7 +153,7 @@ export async function listOwnedActiveMachines(context, interaction, activeReserv
|
|
|
152
153
|
"The gateway returned a capacity reservation without a canonical identifier."
|
|
153
154
|
);
|
|
154
155
|
}
|
|
155
|
-
const payload = await
|
|
156
|
+
const payload = await accessShowCapability.execute(context, { reservationId: ref });
|
|
156
157
|
const machineRows = rows(payload, "machines");
|
|
157
158
|
if (!machineRows)
|
|
158
159
|
invalidGateway(interaction, "The gateway returned an invalid machine collection.");
|
package/src/vm-commands.mjs
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
+
accessActivateCapability,
|
|
3
|
+
accessShowCapability,
|
|
4
|
+
machineSwitchCapability,
|
|
5
|
+
machineRebootCapability,
|
|
6
|
+
machineResetCapability,
|
|
7
|
+
privateNetworkShowCapability,
|
|
2
8
|
sshKeyListCapability,
|
|
3
9
|
sshKeyAddCapability,
|
|
4
10
|
sshKeyDeleteCapability,
|
|
@@ -9,7 +15,6 @@ import {
|
|
|
9
15
|
volumeMountShowCapability,
|
|
10
16
|
} from "../vendor/capabilities/cli.js";
|
|
11
17
|
import * as orchestrator from "../vendor/api-client/orchestrator.js";
|
|
12
|
-
import * as gatewayApi from "../vendor/api-client/gateway.js";
|
|
13
18
|
import { getReservation } from "../vendor/api-client/commerce.js";
|
|
14
19
|
import { spawn as spawnProcessDefault } from "node:child_process";
|
|
15
20
|
import { createHash } from "node:crypto";
|
|
@@ -716,9 +721,7 @@ async function ensureAssignment(context, reservationId, key, idempotencyKey, int
|
|
|
716
721
|
|
|
717
722
|
async function fetchMachines(context, reservationId) {
|
|
718
723
|
return activeMachines(
|
|
719
|
-
machinesFromPayload(
|
|
720
|
-
await orchestrator.listNodes(context.fetch, { reservation_id: reservationId })
|
|
721
|
-
)
|
|
724
|
+
machinesFromPayload(await accessShowCapability.execute(context, { reservationId }))
|
|
722
725
|
);
|
|
723
726
|
}
|
|
724
727
|
|
|
@@ -1230,13 +1233,14 @@ export const vmLaunchModeHandler = {
|
|
|
1230
1233
|
if (!machine) {
|
|
1231
1234
|
let launch;
|
|
1232
1235
|
try {
|
|
1233
|
-
launch = await
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1236
|
+
launch = await accessActivateCapability.execute(context, {
|
|
1237
|
+
reservationId,
|
|
1238
|
+
accessMode: "vm",
|
|
1239
|
+
networkMode: "public",
|
|
1240
|
+
diskId: null,
|
|
1241
|
+
machineCount: 1,
|
|
1242
|
+
requestId: idempotencyKey,
|
|
1243
|
+
sshKeyIds: [resourceId(key)],
|
|
1240
1244
|
zone: null,
|
|
1241
1245
|
});
|
|
1242
1246
|
} catch (error) {
|
|
@@ -1506,7 +1510,7 @@ async function bareMetalRelationships(context, reservationId) {
|
|
|
1506
1510
|
return null;
|
|
1507
1511
|
};
|
|
1508
1512
|
const [network, storage] = await Promise.all([
|
|
1509
|
-
|
|
1513
|
+
privateNetworkShowCapability.execute(context, { networkId: "shared" }),
|
|
1510
1514
|
volumeMountShowCapability.execute(context, { reservationId }).catch(missingAttachment),
|
|
1511
1515
|
]);
|
|
1512
1516
|
return {
|
|
@@ -1683,7 +1687,7 @@ async function executeWorkspaceCapability(
|
|
|
1683
1687
|
|
|
1684
1688
|
async function workspaceResourceFacts(context, interaction, input, reservationId) {
|
|
1685
1689
|
const [network, volume, volumeMount] = await Promise.all([
|
|
1686
|
-
|
|
1690
|
+
privateNetworkShowCapability.execute(context, { networkId: "shared" }),
|
|
1687
1691
|
executeWorkspaceCapability(context, interaction, "storage.volumes.show", {
|
|
1688
1692
|
$positionals: [input.volume],
|
|
1689
1693
|
}),
|
|
@@ -2121,13 +2125,14 @@ async function launchDurableBareMetalWorkspace({
|
|
|
2121
2125
|
machine = replay.machine;
|
|
2122
2126
|
const replayed = replay.replayed;
|
|
2123
2127
|
if (!machine) {
|
|
2124
|
-
const launch = await
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2128
|
+
const launch = await accessActivateCapability.execute(context, {
|
|
2129
|
+
reservationId,
|
|
2130
|
+
accessMode: "bare-metal",
|
|
2131
|
+
diskId: null,
|
|
2132
|
+
machineCount: 1,
|
|
2133
|
+
networkMode: "private",
|
|
2134
|
+
requestId: `${id}:machine`,
|
|
2135
|
+
sshKeyIds: [resourceId(key)],
|
|
2131
2136
|
zone: null,
|
|
2132
2137
|
});
|
|
2133
2138
|
const launched = activeMachines(machinesFromPayload(launch));
|
|
@@ -2531,16 +2536,17 @@ export const bareMetalLaunchModeHandler = {
|
|
|
2531
2536
|
let launch;
|
|
2532
2537
|
try {
|
|
2533
2538
|
await ensureAssignment(context, reservationId, key, idempotencyKey, interaction);
|
|
2534
|
-
const
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2539
|
+
const launchInput = {
|
|
2540
|
+
reservationId,
|
|
2541
|
+
accessMode: "bare-metal",
|
|
2542
|
+
networkMode: "public",
|
|
2543
|
+
diskId: null,
|
|
2544
|
+
machineCount: 1,
|
|
2545
|
+
requestId: idempotencyKey,
|
|
2546
|
+
sshKeyIds: [resourceId(key)],
|
|
2541
2547
|
zone: null,
|
|
2542
2548
|
};
|
|
2543
|
-
launch = await
|
|
2549
|
+
launch = await accessActivateCapability.execute(context, launchInput);
|
|
2544
2550
|
} catch (error) {
|
|
2545
2551
|
if (!isRecoverableWaitFailure(error)) throw error;
|
|
2546
2552
|
const discovered = await fetchMachines(context, reservationId).catch(() => []);
|
|
@@ -3680,15 +3686,14 @@ async function switchMachine(input, context, interaction) {
|
|
|
3680
3686
|
{ code: "network_mode_required", field: "network" }
|
|
3681
3687
|
);
|
|
3682
3688
|
}
|
|
3683
|
-
const
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
ssh_key_ids: keys.map(resourceId),
|
|
3689
|
+
const switchInput = {
|
|
3690
|
+
reservationId,
|
|
3691
|
+
accessMode: requestedMode ? (requestedMode === "vm" ? "virtual-machine" : "bare-metal") : null,
|
|
3692
|
+
networkMode: targetNetwork,
|
|
3693
|
+
...(input.eraseLocalData ? { eraseLocalData: true } : {}),
|
|
3694
|
+
machineCount: machines.length,
|
|
3695
|
+
requestId: idempotencyKey,
|
|
3696
|
+
sshKeyIds: keys.map(resourceId),
|
|
3692
3697
|
};
|
|
3693
3698
|
const retryCommand = [
|
|
3694
3699
|
"ornn machines switch",
|
|
@@ -3780,7 +3785,7 @@ async function switchMachine(input, context, interaction) {
|
|
|
3780
3785
|
);
|
|
3781
3786
|
}
|
|
3782
3787
|
try {
|
|
3783
|
-
response = await
|
|
3788
|
+
response = await machineSwitchCapability.execute(context, switchInput);
|
|
3784
3789
|
} catch (error) {
|
|
3785
3790
|
return uncertainMutationFailure(interaction, error, {
|
|
3786
3791
|
data: {
|
|
@@ -4028,22 +4033,12 @@ async function maintainMachine(command, input, context, interaction) {
|
|
|
4028
4033
|
let response;
|
|
4029
4034
|
try {
|
|
4030
4035
|
response = record(
|
|
4031
|
-
|
|
4032
|
-
?
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
)
|
|
4038
|
-
: await orchestrator.rebootNode(
|
|
4039
|
-
context.fetch,
|
|
4040
|
-
virtualMachine ? virtualMachine.id : machineId(machine),
|
|
4041
|
-
{
|
|
4042
|
-
mode: destructive ? "hard_reset" : "reboot",
|
|
4043
|
-
request_id: idempotencyKey,
|
|
4044
|
-
erase_local_data: destructive,
|
|
4045
|
-
}
|
|
4046
|
-
)
|
|
4036
|
+
await (destructive ? machineResetCapability : machineRebootCapability).execute(context, {
|
|
4037
|
+
nodeId: virtualMachine && destructive ? virtualMachine.id : machineId(machine),
|
|
4038
|
+
...(virtualMachine && !destructive
|
|
4039
|
+
? { virtualMachineId: virtualMachine.id }
|
|
4040
|
+
: { requestId: idempotencyKey, eraseLocalData: destructive }),
|
|
4041
|
+
})
|
|
4047
4042
|
);
|
|
4048
4043
|
} catch (error) {
|
|
4049
4044
|
return uncertainMutationFailure(interaction, error, {
|
|
@@ -166,22 +166,9 @@ function getReservationClusterCredentials(request, kind, id, signal) {
|
|
|
166
166
|
function getReservationClusterEligibility(request, id, input) {
|
|
167
167
|
return request(`${compute}/tenants/me/reservations/${encodeURIComponent(id)}/cluster-eligible-machines${query2(input)}`, { method: "GET" });
|
|
168
168
|
}
|
|
169
|
-
function launchReservationCluster(request, kind, id, body, options) {
|
|
170
|
-
return request(clusterPath(kind, id, "cluster/launch"), { ...options, method: "POST", body });
|
|
171
|
-
}
|
|
172
169
|
function teardownReservationCluster(request, kind, id, options) {
|
|
173
170
|
return request(clusterPath(kind, id, "cluster/teardown"), { ...options, method: "POST" });
|
|
174
171
|
}
|
|
175
|
-
function addReservationClusterNode(request, id, body, options) {
|
|
176
|
-
return request(`${compute}/clusters/reservations/${encodeURIComponent(id)}/cluster/nodes`, {
|
|
177
|
-
...options,
|
|
178
|
-
method: "POST",
|
|
179
|
-
body
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
function removeReservationClusterNode(request, id, nodeId, options) {
|
|
183
|
-
return request(`${compute}/clusters/reservations/${encodeURIComponent(id)}/cluster/nodes/${encodeURIComponent(nodeId)}`, { ...options, method: "DELETE" });
|
|
184
|
-
}
|
|
185
172
|
function getReservationLiveMetrics(request, id, input, signal) {
|
|
186
173
|
return request(`${reservationPath(id, "live-metrics")}${query2(input)}`, {
|
|
187
174
|
method: "GET",
|
|
@@ -289,7 +276,6 @@ function getCliStatus(request) {
|
|
|
289
276
|
return request("/v1/cli/status", { method: "GET" });
|
|
290
277
|
}
|
|
291
278
|
export {
|
|
292
|
-
addReservationClusterNode,
|
|
293
279
|
addStaffReservationKey,
|
|
294
280
|
claimSupplierIntakeEditor,
|
|
295
281
|
consoleMcpPath,
|
|
@@ -319,7 +305,6 @@ export {
|
|
|
319
305
|
getStaffNodeReservationAccess,
|
|
320
306
|
getSupplierIntakeDraft,
|
|
321
307
|
getSupportThread,
|
|
322
|
-
launchReservationCluster,
|
|
323
308
|
linkPylonAccount,
|
|
324
309
|
linkPylonIssue,
|
|
325
310
|
listAccountSshKeys,
|
|
@@ -334,7 +319,6 @@ export {
|
|
|
334
319
|
listSupportThreads,
|
|
335
320
|
pushStaffNodeKeys,
|
|
336
321
|
releaseSupplierIntakeEditor,
|
|
337
|
-
removeReservationClusterNode,
|
|
338
322
|
removeStaffReservationKey,
|
|
339
323
|
replySupportThread,
|
|
340
324
|
revokeStaffOrganizationKey,
|
|
@@ -265,20 +265,20 @@ function importDisk(request, body) {
|
|
|
265
265
|
function drivePath(id) {
|
|
266
266
|
return `/v1/orchestrator/drives/${encodeURIComponent(id)}`;
|
|
267
267
|
}
|
|
268
|
-
function filePath(
|
|
269
|
-
return
|
|
268
|
+
function filePath(path6) {
|
|
269
|
+
return path6.replace(/\\/g, "/").split("/").filter(Boolean).map(encodeURIComponent).join("/");
|
|
270
270
|
}
|
|
271
|
-
function driveFilePath(id,
|
|
272
|
-
return `${drivePath(id)}/files/${filePath(
|
|
271
|
+
function driveFilePath(id, path6) {
|
|
272
|
+
return `${drivePath(id)}/files/${filePath(path6)}`;
|
|
273
273
|
}
|
|
274
274
|
function driveArchivePath(id) {
|
|
275
275
|
return `${drivePath(id)}/archive`;
|
|
276
276
|
}
|
|
277
|
-
function driveFolderArchivePath(id,
|
|
278
|
-
return `${drivePath(id)}/folders/${filePath(
|
|
277
|
+
function driveFolderArchivePath(id, path6) {
|
|
278
|
+
return `${drivePath(id)}/folders/${filePath(path6)}/archive`;
|
|
279
279
|
}
|
|
280
|
-
function downloadDriveFile(fetch, id,
|
|
281
|
-
return fetch(driveFilePath(id,
|
|
280
|
+
function downloadDriveFile(fetch, id, path6, signal) {
|
|
281
|
+
return fetch(driveFilePath(id, path6), { method: "GET", ...signal ? { signal } : {} });
|
|
282
282
|
}
|
|
283
283
|
function listDriveContents(request, id, query = {}, signal) {
|
|
284
284
|
const params = new URLSearchParams();
|
|
@@ -291,11 +291,11 @@ function listDriveContents(request, id, query = {}, signal) {
|
|
|
291
291
|
...signal ? { signal } : {}
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
function deleteDriveFile(request, id,
|
|
295
|
-
return request(driveFilePath(id,
|
|
294
|
+
function deleteDriveFile(request, id, path6) {
|
|
295
|
+
return request(driveFilePath(id, path6), { method: "DELETE" });
|
|
296
296
|
}
|
|
297
|
-
function deleteDriveFolder(request, id,
|
|
298
|
-
return request(`${drivePath(id)}/folders/${filePath(
|
|
297
|
+
function deleteDriveFolder(request, id, path6) {
|
|
298
|
+
return request(`${drivePath(id)}/folders/${filePath(path6)}`, { method: "DELETE" });
|
|
299
299
|
}
|
|
300
300
|
function clearDriveContents(request, id) {
|
|
301
301
|
return request(`${drivePath(id)}/contents`, { method: "DELETE" });
|
|
@@ -321,13 +321,13 @@ function keepDriveUploadsAlive(request, id) {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
// ../../packages/api-client/dist/orchestrator/drives.js
|
|
324
|
-
function queryPath(
|
|
324
|
+
function queryPath(path6, query) {
|
|
325
325
|
const params = new URLSearchParams();
|
|
326
326
|
for (const [key, value] of Object.entries(query)) {
|
|
327
327
|
if (value !== void 0 && value !== null)
|
|
328
328
|
params.set(key, String(value));
|
|
329
329
|
}
|
|
330
|
-
return `${
|
|
330
|
+
return `${path6}${params.size ? `?${params}` : ""}`;
|
|
331
331
|
}
|
|
332
332
|
function listDrives(request, query = {}, signal) {
|
|
333
333
|
return request(queryPath("/v1/orchestrator/drives", query), {
|
|
@@ -779,13 +779,13 @@ async function deleteSshBastion(request, id, query) {
|
|
|
779
779
|
var storageEventsPath = "/v1/orchestrator/storage/ws";
|
|
780
780
|
|
|
781
781
|
// ../../packages/api-client/dist/orchestrator/storage-usage.js
|
|
782
|
-
function queryPath2(
|
|
782
|
+
function queryPath2(path6, query) {
|
|
783
783
|
const params = new URLSearchParams();
|
|
784
784
|
for (const [key, value] of Object.entries(query)) {
|
|
785
785
|
if (value !== void 0)
|
|
786
786
|
params.set(key, String(value));
|
|
787
787
|
}
|
|
788
|
-
return `${
|
|
788
|
+
return `${path6}${params.size ? `?${params}` : ""}`;
|
|
789
789
|
}
|
|
790
790
|
function listStorageInventory(request, query = {}, signal) {
|
|
791
791
|
return request(queryPath2("/v1/staff/storage/volumes", query), {
|
|
@@ -818,6 +818,43 @@ function getSupplierGateway(request, id, signal) {
|
|
|
818
818
|
});
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
+
// ../../packages/api-client/dist/orchestrator/supplier-connection-configs.js
|
|
822
|
+
var path5 = "/v1/orchestrator/supplier-connection-configs";
|
|
823
|
+
function listSupplierConnectionTypes(request, signal) {
|
|
824
|
+
return request("/v1/orchestrator/supplier-connection-types", {
|
|
825
|
+
method: "GET",
|
|
826
|
+
...signal ? { signal } : {}
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
function listSupplierConnectionConfigs(request, query = {}, signal) {
|
|
830
|
+
const params = new URLSearchParams();
|
|
831
|
+
if (query.organization_id !== void 0)
|
|
832
|
+
params.set("organization_id", query.organization_id);
|
|
833
|
+
if (query.after !== void 0)
|
|
834
|
+
params.set("after", query.after);
|
|
835
|
+
if (query.limit !== void 0)
|
|
836
|
+
params.set("limit", String(query.limit));
|
|
837
|
+
return request(`${path5}${params.size ? `?${params}` : ""}`, {
|
|
838
|
+
method: "GET",
|
|
839
|
+
...signal ? { signal } : {}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
function getSupplierConnectionConfig(request, id, signal) {
|
|
843
|
+
return request(`${path5}/${encodeURIComponent(id)}`, {
|
|
844
|
+
method: "GET",
|
|
845
|
+
...signal ? { signal } : {}
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
function createSupplierConnectionConfig(request, body) {
|
|
849
|
+
return request(path5, { method: "POST", body });
|
|
850
|
+
}
|
|
851
|
+
function patchSupplierConnectionConfig(request, id, body) {
|
|
852
|
+
return request(`${path5}/${encodeURIComponent(id)}`, {
|
|
853
|
+
method: "PATCH",
|
|
854
|
+
body
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
|
|
821
858
|
// ../../packages/api-client/dist/orchestrator/supplier-node-configs.js
|
|
822
859
|
function listSupplierNodeConfigs(request, query = {}, signal) {
|
|
823
860
|
const params = new URLSearchParams();
|
|
@@ -936,6 +973,7 @@ export {
|
|
|
936
973
|
createNetworkPeer,
|
|
937
974
|
createShellSession,
|
|
938
975
|
createSshBastion,
|
|
976
|
+
createSupplierConnectionConfig,
|
|
939
977
|
createSupplierGateway,
|
|
940
978
|
createVirtualMachine,
|
|
941
979
|
deleteDisk,
|
|
@@ -985,6 +1023,7 @@ export {
|
|
|
985
1023
|
getReservationAccessSwitch,
|
|
986
1024
|
getSoftwareCatalog,
|
|
987
1025
|
getStorageUsage,
|
|
1026
|
+
getSupplierConnectionConfig,
|
|
988
1027
|
getSupplierGateway,
|
|
989
1028
|
getVirtualMachine,
|
|
990
1029
|
getVirtualMachineLogs,
|
|
@@ -1028,11 +1067,14 @@ export {
|
|
|
1028
1067
|
listStaffNodes,
|
|
1029
1068
|
listStorageInventory,
|
|
1030
1069
|
listStorageTargets,
|
|
1070
|
+
listSupplierConnectionConfigs,
|
|
1071
|
+
listSupplierConnectionTypes,
|
|
1031
1072
|
listSupplierNodeConfigs,
|
|
1032
1073
|
listVirtualMachinePorts,
|
|
1033
1074
|
localityGeolocatePath,
|
|
1034
1075
|
networksSubscriptionPath,
|
|
1035
1076
|
openVirtualMachinePort,
|
|
1077
|
+
patchSupplierConnectionConfig,
|
|
1036
1078
|
postDiskObject,
|
|
1037
1079
|
postImageObject,
|
|
1038
1080
|
pullGitHubRepository,
|