@ornncompute/cli 1.0.123 → 1.0.125

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.
@@ -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(`/v1/workflows/compute/networks/shared?overlay=true`),
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("/v1/workflows/compute/networks/shared?overlay=true"),
1698
+ orchestrator.getNetwork(context.fetch, "shared"),
1699
1699
  executeWorkspaceCapability(context, interaction, "storage.volumes.show", {
1700
1700
  $positionals: [input.volume],
1701
1701
  }),
@@ -519,6 +519,67 @@ 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
+ }
522
583
  export {
523
584
  addReservationSshKey,
524
585
  assignNode,
@@ -533,6 +594,8 @@ export {
533
594
  createDisk,
534
595
  createDrive,
535
596
  createGhostNodes,
597
+ createNetwork,
598
+ createNetworkPeer,
536
599
  createShellSession,
537
600
  createVirtualMachine,
538
601
  deleteDisk,
@@ -541,6 +604,8 @@ export {
541
604
  deleteDriveFolder,
542
605
  deleteGitHubConnection,
543
606
  deleteImage,
607
+ deleteNetwork,
608
+ deleteNetworkPeer,
544
609
  deleteRegistryTag,
545
610
  deleteReservationSshKey,
546
611
  deleteVirtualMachine,
@@ -554,6 +619,7 @@ export {
554
619
  getCurrentShellSession,
555
620
  getDrive,
556
621
  getHardwareCatalog,
622
+ getNetwork,
557
623
  getNode,
558
624
  getNodeSanitize,
559
625
  getNodeSanitizeLog,
@@ -578,6 +644,10 @@ export {
578
644
  listGitHubConnections,
579
645
  listGitHubRepositories,
580
646
  listLocalityRegions,
647
+ listNetworkCompartments,
648
+ listNetworkMemberPeers,
649
+ listNetworkPeerConfigs,
650
+ listNetworks,
581
651
  listNodeVirtualMachines,
582
652
  listNodes,
583
653
  listRegistryCaches,
@@ -591,6 +661,7 @@ export {
591
661
  listStorageTargets,
592
662
  listVirtualMachinePorts,
593
663
  localityGeolocatePath,
664
+ networksSubscriptionPath,
594
665
  openVirtualMachinePort,
595
666
  postDiskObject,
596
667
  postImageObject,
@@ -612,6 +683,7 @@ export {
612
683
  transferNode,
613
684
  updateDisk,
614
685
  updateDrive,
686
+ updateNetwork,
615
687
  updateNode,
616
688
  updateNodeKeys,
617
689
  updateNodeSanitize,