@ornncompute/cli 1.0.125 → 1.0.126
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
CHANGED
|
@@ -580,7 +580,69 @@ function deleteNetworkPeer(request, networkId, peerId, options = {}) {
|
|
|
580
580
|
...options
|
|
581
581
|
});
|
|
582
582
|
}
|
|
583
|
+
|
|
584
|
+
// ../../packages/api-client/dist/orchestrator/controllers.js
|
|
585
|
+
var controllersSocketPath = "/v1/orchestrator/controllers";
|
|
586
|
+
function controllerPath(id) {
|
|
587
|
+
return `${controllersSocketPath}/${encodeURIComponent(id)}`;
|
|
588
|
+
}
|
|
589
|
+
function listControllers(request, query = {}, signal) {
|
|
590
|
+
const params = new URLSearchParams();
|
|
591
|
+
if (query.kind !== void 0)
|
|
592
|
+
params.set("kind", query.kind);
|
|
593
|
+
if (query.tenant_id !== void 0)
|
|
594
|
+
params.set("tenant_id", query.tenant_id);
|
|
595
|
+
return request(`${controllersSocketPath}${params.size ? `?${params}` : ""}`, {
|
|
596
|
+
method: "GET",
|
|
597
|
+
...signal ? { signal } : {}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
function createController(request, body, options) {
|
|
601
|
+
return request(controllersSocketPath, {
|
|
602
|
+
...options,
|
|
603
|
+
method: "POST",
|
|
604
|
+
body
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
function getControllerAccess(request, id, signal) {
|
|
608
|
+
return request(`${controllerPath(id)}/access`, {
|
|
609
|
+
method: "GET",
|
|
610
|
+
...signal ? { signal } : {}
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
function teardownController(request, id, options) {
|
|
614
|
+
return request(`${controllerPath(id)}/teardown`, {
|
|
615
|
+
...options,
|
|
616
|
+
method: "POST"
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
function addControllerNode(request, id, nodeId, options) {
|
|
620
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId)}`, {
|
|
621
|
+
...options,
|
|
622
|
+
method: "POST"
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
function removeControllerNode(request, id, nodeId, options) {
|
|
626
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId)}`, {
|
|
627
|
+
...options,
|
|
628
|
+
method: "DELETE"
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
function addControllerVirtualMachine(request, id, virtualMachineId, query = {}, options) {
|
|
632
|
+
const params = new URLSearchParams();
|
|
633
|
+
if (query.tenant_id !== void 0)
|
|
634
|
+
params.set("tenant_id", query.tenant_id);
|
|
635
|
+
return request(`${controllerPath(id)}/virtual-machines/${encodeURIComponent(virtualMachineId)}${params.size ? `?${params}` : ""}`, { ...options, method: "POST" });
|
|
636
|
+
}
|
|
637
|
+
function removeControllerVirtualMachine(request, id, virtualMachineId, options) {
|
|
638
|
+
return request(`${controllerPath(id)}/virtual-machines/${encodeURIComponent(virtualMachineId)}`, {
|
|
639
|
+
...options,
|
|
640
|
+
method: "DELETE"
|
|
641
|
+
});
|
|
642
|
+
}
|
|
583
643
|
export {
|
|
644
|
+
addControllerNode,
|
|
645
|
+
addControllerVirtualMachine,
|
|
584
646
|
addReservationSshKey,
|
|
585
647
|
assignNode,
|
|
586
648
|
cancelDriveUpload,
|
|
@@ -591,6 +653,8 @@ export {
|
|
|
591
653
|
completeDriveUpload,
|
|
592
654
|
completeGitHubConnection,
|
|
593
655
|
completeImageUpload,
|
|
656
|
+
controllersSocketPath,
|
|
657
|
+
createController,
|
|
594
658
|
createDisk,
|
|
595
659
|
createDrive,
|
|
596
660
|
createGhostNodes,
|
|
@@ -616,6 +680,7 @@ export {
|
|
|
616
680
|
driveFolderArchivePath,
|
|
617
681
|
geolocate,
|
|
618
682
|
getContainerRegistry,
|
|
683
|
+
getControllerAccess,
|
|
619
684
|
getCurrentShellSession,
|
|
620
685
|
getDrive,
|
|
621
686
|
getHardwareCatalog,
|
|
@@ -637,6 +702,7 @@ export {
|
|
|
637
702
|
keepDriveUploadsAlive,
|
|
638
703
|
launchReservation,
|
|
639
704
|
listCatalogImages,
|
|
705
|
+
listControllers,
|
|
640
706
|
listDisks,
|
|
641
707
|
listDriveContents,
|
|
642
708
|
listDrives,
|
|
@@ -669,6 +735,8 @@ export {
|
|
|
669
735
|
pushNodeKeys,
|
|
670
736
|
rebootNode,
|
|
671
737
|
rebootVirtualMachine,
|
|
738
|
+
removeControllerNode,
|
|
739
|
+
removeControllerVirtualMachine,
|
|
672
740
|
reservationEventsPath,
|
|
673
741
|
shellSessionAttachPath,
|
|
674
742
|
startDiskUpload,
|
|
@@ -679,6 +747,7 @@ export {
|
|
|
679
747
|
storageEventsPath,
|
|
680
748
|
switchReservationAccess,
|
|
681
749
|
syncGitHubRepository,
|
|
750
|
+
teardownController,
|
|
682
751
|
terminateNode,
|
|
683
752
|
transferNode,
|
|
684
753
|
updateDisk,
|
|
@@ -249,6 +249,31 @@ function deleteNetworkPeer(request, networkId, peerId, options = {}) {
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
// ../../packages/api-client/dist/orchestrator/controllers.js
|
|
253
|
+
var controllersSocketPath = "/v1/orchestrator/controllers";
|
|
254
|
+
function controllerPath(id) {
|
|
255
|
+
return `${controllersSocketPath}/${encodeURIComponent(id)}`;
|
|
256
|
+
}
|
|
257
|
+
function createController(request, body2, options) {
|
|
258
|
+
return request(controllersSocketPath, {
|
|
259
|
+
...options,
|
|
260
|
+
method: "POST",
|
|
261
|
+
body: body2
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function addControllerNode(request, id, nodeId3, options) {
|
|
265
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
|
|
266
|
+
...options,
|
|
267
|
+
method: "POST"
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function removeControllerNode(request, id, nodeId3, options) {
|
|
271
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
|
|
272
|
+
...options,
|
|
273
|
+
method: "DELETE"
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
252
277
|
// ../../packages/capabilities/dist/capabilities/admin-ssh.js
|
|
253
278
|
import { z } from "zod";
|
|
254
279
|
|
|
@@ -4663,9 +4688,6 @@ var controllerNode = z20.object({
|
|
|
4663
4688
|
nodeId: z20.string(),
|
|
4664
4689
|
confirm: z20.boolean().optional()
|
|
4665
4690
|
});
|
|
4666
|
-
function controllerNodePath(input) {
|
|
4667
|
-
return `/v1/orchestrator/controllers/${encodeURIComponent(input.controllerId)}/nodes/${encodeURIComponent(input.nodeId)}`;
|
|
4668
|
-
}
|
|
4669
4691
|
var clusterCapabilities = [
|
|
4670
4692
|
defineCapability({
|
|
4671
4693
|
id: "cluster.list",
|
|
@@ -4709,21 +4731,16 @@ var clusterCapabilities = [
|
|
|
4709
4731
|
networkMode: z20.enum(["public", "private"]).optional(),
|
|
4710
4732
|
nodeIds: z20.array(z20.string()).optional(),
|
|
4711
4733
|
nodeCount: z20.number().int().positive().optional(),
|
|
4712
|
-
storageLoadSizeBytes: z20.number().int().nonnegative().optional(),
|
|
4713
4734
|
confirm: z20.boolean().optional()
|
|
4714
|
-
}),
|
|
4735
|
+
}).strict(),
|
|
4715
4736
|
mcp: { name: "clusters_create" },
|
|
4716
4737
|
slack: false,
|
|
4717
|
-
execute: (ctx, input) => ctx.fetch
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
...input.nodeCount !== void 0 ? { node_count: input.nodeCount } : {},
|
|
4724
|
-
...input.nodeIds?.length ? { node_ids: input.nodeIds } : {},
|
|
4725
|
-
...input.storageLoadSizeBytes !== void 0 ? { storage_load_size_bytes: input.storageLoadSizeBytes } : {}
|
|
4726
|
-
}
|
|
4738
|
+
execute: (ctx, input) => createController(ctx.fetch, {
|
|
4739
|
+
kind: input.type,
|
|
4740
|
+
reservation_id: input.reservationId,
|
|
4741
|
+
...input.networkMode ? { network_mode: input.networkMode } : {},
|
|
4742
|
+
...input.nodeCount !== void 0 ? { node_count: input.nodeCount } : {},
|
|
4743
|
+
...input.nodeIds?.length ? { node_ids: input.nodeIds } : {}
|
|
4727
4744
|
})
|
|
4728
4745
|
}),
|
|
4729
4746
|
defineCapability({
|
|
@@ -4787,7 +4804,7 @@ var clusterCapabilities = [
|
|
|
4787
4804
|
input: controllerNode,
|
|
4788
4805
|
mcp: { name: "clusters_add_node" },
|
|
4789
4806
|
slack: false,
|
|
4790
|
-
execute: (ctx, input) => ctx.fetch
|
|
4807
|
+
execute: (ctx, input) => addControllerNode(ctx.fetch, input.controllerId, input.nodeId)
|
|
4791
4808
|
}),
|
|
4792
4809
|
defineCapability({
|
|
4793
4810
|
id: "cluster.remove_node",
|
|
@@ -4799,7 +4816,7 @@ var clusterCapabilities = [
|
|
|
4799
4816
|
input: controllerNode,
|
|
4800
4817
|
mcp: { name: "clusters_remove_node" },
|
|
4801
4818
|
slack: false,
|
|
4802
|
-
execute: (ctx, input) => ctx.fetch
|
|
4819
|
+
execute: (ctx, input) => removeControllerNode(ctx.fetch, input.controllerId, input.nodeId)
|
|
4803
4820
|
}),
|
|
4804
4821
|
defineCapability({
|
|
4805
4822
|
id: "cluster.teardown",
|