@ornncompute/cli 1.0.124 → 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/README.md +4 -1
- package/package.json +1 -1
- package/src/catalog-shell.mjs +2 -0
- package/src/network-commands.mjs +1187 -0
- package/src/vm-commands.mjs +2 -2
- package/vendor/api-client/orchestrator.js +141 -0
- package/vendor/capabilities/cli.js +175 -1011
package/src/vm-commands.mjs
CHANGED
|
@@ -1516,7 +1516,7 @@ async function bareMetalRelationships(context, reservationId) {
|
|
|
1516
1516
|
return null;
|
|
1517
1517
|
};
|
|
1518
1518
|
const [network, storage] = await Promise.all([
|
|
1519
|
-
context.fetch
|
|
1519
|
+
orchestrator.getNetwork(context.fetch, "shared"),
|
|
1520
1520
|
gatewayApi
|
|
1521
1521
|
.getReservationStorageAttachment(context.fetch, reservationId)
|
|
1522
1522
|
.catch(missingAttachment),
|
|
@@ -1695,7 +1695,7 @@ async function executeWorkspaceCapability(
|
|
|
1695
1695
|
|
|
1696
1696
|
async function workspaceResourceFacts(context, interaction, input, reservationId) {
|
|
1697
1697
|
const [network, volume, volumeMount] = await Promise.all([
|
|
1698
|
-
context.fetch
|
|
1698
|
+
orchestrator.getNetwork(context.fetch, "shared"),
|
|
1699
1699
|
executeWorkspaceCapability(context, interaction, "storage.volumes.show", {
|
|
1700
1700
|
$positionals: [input.volume],
|
|
1701
1701
|
}),
|
|
@@ -519,7 +519,130 @@ function getNodeSanitizeLog(fetcher, nodeId, jobId) {
|
|
|
519
519
|
headers: { Accept: "application/x-ndjson" }
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
|
+
|
|
523
|
+
// ../../packages/api-client/dist/orchestrator/networks.js
|
|
524
|
+
var networks = "/v1/orchestrator/networks";
|
|
525
|
+
function networkPath(id) {
|
|
526
|
+
return `${networks}/${encodeURIComponent(id)}`;
|
|
527
|
+
}
|
|
528
|
+
function listNetworks(request, signal) {
|
|
529
|
+
return request(networks, { method: "GET", ...signal ? { signal } : {} });
|
|
530
|
+
}
|
|
531
|
+
function getNetwork(request, id, query = {}, signal) {
|
|
532
|
+
const params = new URLSearchParams();
|
|
533
|
+
if (query.overlay !== void 0)
|
|
534
|
+
params.set("overlay", String(query.overlay));
|
|
535
|
+
return request(`${networkPath(id)}${params.size ? `?${params}` : ""}`, {
|
|
536
|
+
method: "GET",
|
|
537
|
+
...signal ? { signal } : {}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
function createNetwork(request, body, options = {}) {
|
|
541
|
+
return request(networks, { method: "POST", body, ...options });
|
|
542
|
+
}
|
|
543
|
+
function updateNetwork(request, id, body, options = {}) {
|
|
544
|
+
return request(networkPath(id), { method: "PATCH", body, ...options });
|
|
545
|
+
}
|
|
546
|
+
function deleteNetwork(request, id, options = {}) {
|
|
547
|
+
return request(networkPath(id), { method: "DELETE", ...options });
|
|
548
|
+
}
|
|
549
|
+
function listNetworkCompartments(request, signal) {
|
|
550
|
+
return request(`${networks}/compartments`, {
|
|
551
|
+
method: "GET",
|
|
552
|
+
...signal ? { signal } : {}
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
function networksSubscriptionPath() {
|
|
556
|
+
return `${networks}/ws`;
|
|
557
|
+
}
|
|
558
|
+
function listNetworkMemberPeers(request, query, signal) {
|
|
559
|
+
return request(`${networks}/peers?${new URLSearchParams(query)}`, {
|
|
560
|
+
method: "GET",
|
|
561
|
+
...signal ? { signal } : {}
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
function listNetworkPeerConfigs(request, networkId, signal) {
|
|
565
|
+
return request(`${networkPath(networkId)}/peers`, {
|
|
566
|
+
method: "GET",
|
|
567
|
+
...signal ? { signal } : {}
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
function createNetworkPeer(request, networkId, body, options = {}) {
|
|
571
|
+
return request(`${networkPath(networkId)}/peers`, {
|
|
572
|
+
method: "POST",
|
|
573
|
+
body,
|
|
574
|
+
...options
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
function deleteNetworkPeer(request, networkId, peerId, options = {}) {
|
|
578
|
+
return request(`${networkPath(networkId)}/peers/${encodeURIComponent(peerId)}`, {
|
|
579
|
+
method: "DELETE",
|
|
580
|
+
...options
|
|
581
|
+
});
|
|
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
|
+
}
|
|
522
643
|
export {
|
|
644
|
+
addControllerNode,
|
|
645
|
+
addControllerVirtualMachine,
|
|
523
646
|
addReservationSshKey,
|
|
524
647
|
assignNode,
|
|
525
648
|
cancelDriveUpload,
|
|
@@ -530,9 +653,13 @@ export {
|
|
|
530
653
|
completeDriveUpload,
|
|
531
654
|
completeGitHubConnection,
|
|
532
655
|
completeImageUpload,
|
|
656
|
+
controllersSocketPath,
|
|
657
|
+
createController,
|
|
533
658
|
createDisk,
|
|
534
659
|
createDrive,
|
|
535
660
|
createGhostNodes,
|
|
661
|
+
createNetwork,
|
|
662
|
+
createNetworkPeer,
|
|
536
663
|
createShellSession,
|
|
537
664
|
createVirtualMachine,
|
|
538
665
|
deleteDisk,
|
|
@@ -541,6 +668,8 @@ export {
|
|
|
541
668
|
deleteDriveFolder,
|
|
542
669
|
deleteGitHubConnection,
|
|
543
670
|
deleteImage,
|
|
671
|
+
deleteNetwork,
|
|
672
|
+
deleteNetworkPeer,
|
|
544
673
|
deleteRegistryTag,
|
|
545
674
|
deleteReservationSshKey,
|
|
546
675
|
deleteVirtualMachine,
|
|
@@ -551,9 +680,11 @@ export {
|
|
|
551
680
|
driveFolderArchivePath,
|
|
552
681
|
geolocate,
|
|
553
682
|
getContainerRegistry,
|
|
683
|
+
getControllerAccess,
|
|
554
684
|
getCurrentShellSession,
|
|
555
685
|
getDrive,
|
|
556
686
|
getHardwareCatalog,
|
|
687
|
+
getNetwork,
|
|
557
688
|
getNode,
|
|
558
689
|
getNodeSanitize,
|
|
559
690
|
getNodeSanitizeLog,
|
|
@@ -571,6 +702,7 @@ export {
|
|
|
571
702
|
keepDriveUploadsAlive,
|
|
572
703
|
launchReservation,
|
|
573
704
|
listCatalogImages,
|
|
705
|
+
listControllers,
|
|
574
706
|
listDisks,
|
|
575
707
|
listDriveContents,
|
|
576
708
|
listDrives,
|
|
@@ -578,6 +710,10 @@ export {
|
|
|
578
710
|
listGitHubConnections,
|
|
579
711
|
listGitHubRepositories,
|
|
580
712
|
listLocalityRegions,
|
|
713
|
+
listNetworkCompartments,
|
|
714
|
+
listNetworkMemberPeers,
|
|
715
|
+
listNetworkPeerConfigs,
|
|
716
|
+
listNetworks,
|
|
581
717
|
listNodeVirtualMachines,
|
|
582
718
|
listNodes,
|
|
583
719
|
listRegistryCaches,
|
|
@@ -591,6 +727,7 @@ export {
|
|
|
591
727
|
listStorageTargets,
|
|
592
728
|
listVirtualMachinePorts,
|
|
593
729
|
localityGeolocatePath,
|
|
730
|
+
networksSubscriptionPath,
|
|
594
731
|
openVirtualMachinePort,
|
|
595
732
|
postDiskObject,
|
|
596
733
|
postImageObject,
|
|
@@ -598,6 +735,8 @@ export {
|
|
|
598
735
|
pushNodeKeys,
|
|
599
736
|
rebootNode,
|
|
600
737
|
rebootVirtualMachine,
|
|
738
|
+
removeControllerNode,
|
|
739
|
+
removeControllerVirtualMachine,
|
|
601
740
|
reservationEventsPath,
|
|
602
741
|
shellSessionAttachPath,
|
|
603
742
|
startDiskUpload,
|
|
@@ -608,10 +747,12 @@ export {
|
|
|
608
747
|
storageEventsPath,
|
|
609
748
|
switchReservationAccess,
|
|
610
749
|
syncGitHubRepository,
|
|
750
|
+
teardownController,
|
|
611
751
|
terminateNode,
|
|
612
752
|
transferNode,
|
|
613
753
|
updateDisk,
|
|
614
754
|
updateDrive,
|
|
755
|
+
updateNetwork,
|
|
615
756
|
updateNode,
|
|
616
757
|
updateNodeKeys,
|
|
617
758
|
updateNodeSanitize,
|