@ornncompute/cli 1.0.193 → 1.0.195
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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
// ../../packages/api-client/dist/orchestrator/agent-rollouts.js
|
|
2
2
|
var path = "/v1/orchestrator/agent-rollouts";
|
|
3
|
+
function listAvailableAgentReleases(request, signal) {
|
|
4
|
+
return request("/v1/orchestrator/agent-releases", {
|
|
5
|
+
method: "GET",
|
|
6
|
+
signal
|
|
7
|
+
});
|
|
8
|
+
}
|
|
3
9
|
function startAgentRollout(request, body) {
|
|
4
10
|
return request(path, { method: "POST", body });
|
|
5
11
|
}
|
|
@@ -942,6 +948,32 @@ function listStaffNodeVirtualMachines(request, nodeId, signal) {
|
|
|
942
948
|
...signal ? { signal } : {}
|
|
943
949
|
});
|
|
944
950
|
}
|
|
951
|
+
async function listStaffVirtualMachines(request, input, signal) {
|
|
952
|
+
const virtual_machines = [];
|
|
953
|
+
let cursor = input.cursor;
|
|
954
|
+
const seen = new Set(cursor ? [cursor] : []);
|
|
955
|
+
for (; ; ) {
|
|
956
|
+
const query = new URLSearchParams({
|
|
957
|
+
node_ids: input.node_ids.join(","),
|
|
958
|
+
limit: String(input.limit ?? 500)
|
|
959
|
+
});
|
|
960
|
+
if (cursor)
|
|
961
|
+
query.set("cursor", cursor);
|
|
962
|
+
const page = await request(`/v1/staff/virtual-machines?${query}`, {
|
|
963
|
+
method: "GET",
|
|
964
|
+
...signal ? { signal } : {}
|
|
965
|
+
});
|
|
966
|
+
if (!Array.isArray(page.virtual_machines) || page.next_cursor === void 0)
|
|
967
|
+
throw new Error("The virtual machine catalog did not return a complete page.");
|
|
968
|
+
virtual_machines.push(...page.virtual_machines);
|
|
969
|
+
if (!page.next_cursor)
|
|
970
|
+
return { ...page, virtual_machines };
|
|
971
|
+
if (seen.has(page.next_cursor))
|
|
972
|
+
throw new Error("Virtual machine pagination repeated a cursor.");
|
|
973
|
+
seen.add(page.next_cursor);
|
|
974
|
+
cursor = page.next_cursor;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
945
977
|
function listReservationVirtualMachines(request, reservationId, signal) {
|
|
946
978
|
return request(`/v1/orchestrator/reservations/${encodeURIComponent(reservationId)}/virtual-machines`, { method: "GET", ...signal ? { signal } : {} });
|
|
947
979
|
}
|
|
@@ -1094,6 +1126,7 @@ export {
|
|
|
1094
1126
|
launchReservation,
|
|
1095
1127
|
listAgentRollouts,
|
|
1096
1128
|
listAllEnrollmentProfiles,
|
|
1129
|
+
listAvailableAgentReleases,
|
|
1097
1130
|
listCatalogImages,
|
|
1098
1131
|
listControllers,
|
|
1099
1132
|
listControlplanes,
|
|
@@ -1124,6 +1157,7 @@ export {
|
|
|
1124
1157
|
listSshBastions,
|
|
1125
1158
|
listStaffNodeVirtualMachines,
|
|
1126
1159
|
listStaffNodes,
|
|
1160
|
+
listStaffVirtualMachines,
|
|
1127
1161
|
listStorageInventory,
|
|
1128
1162
|
listStorageTargets,
|
|
1129
1163
|
listSupplierConnectionConfigs,
|