@homeflare/distilled-proxmox 0.3.0 → 0.3.2
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 +37 -10
- package/dist/config-not-found.test.d.ts +2 -0
- package/dist/config-not-found.test.d.ts.map +1 -0
- package/dist/config-not-found.test.js +125 -0
- package/dist/config-not-found.test.js.map +1 -0
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/lxc-config-errors.test.d.ts +2 -0
- package/dist/lxc-config-errors.test.d.ts.map +1 -0
- package/dist/lxc-config-errors.test.js +48 -0
- package/dist/lxc-config-errors.test.js.map +1 -0
- package/dist/protocol-form.d.ts +18 -0
- package/dist/protocol-form.d.ts.map +1 -0
- package/dist/protocol-form.js +37 -0
- package/dist/protocol-form.js.map +1 -0
- package/dist/protocol-form.test.d.ts +2 -0
- package/dist/protocol-form.test.d.ts.map +1 -0
- package/dist/protocol-form.test.js +68 -0
- package/dist/protocol-form.test.js.map +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +25 -2
- package/dist/protocol.js.map +1 -1
- package/dist/replication-firewall-errors.test.d.ts +2 -0
- package/dist/replication-firewall-errors.test.d.ts.map +1 -0
- package/dist/replication-firewall-errors.test.js +76 -0
- package/dist/replication-firewall-errors.test.js.map +1 -0
- package/dist/services/cluster.d.ts +50 -10
- package/dist/services/cluster.d.ts.map +1 -1
- package/dist/services/cluster.js +50 -10
- package/dist/services/cluster.js.map +1 -1
- package/dist/services/nodes.d.ts +25 -5
- package/dist/services/nodes.d.ts.map +1 -1
- package/dist/services/nodes.js +24 -5
- package/dist/services/nodes.js.map +1 -1
- package/dist/services/pools.d.ts +16 -6
- package/dist/services/pools.d.ts.map +1 -1
- package/dist/services/pools.js +18 -6
- package/dist/services/pools.js.map +1 -1
- package/package.json +1 -1
- package/src/config-not-found.test.ts +202 -0
- package/src/errors.ts +4 -12
- package/src/lxc-config-errors.test.ts +100 -0
- package/src/protocol-form.test.ts +102 -0
- package/src/protocol-form.ts +49 -0
- package/src/protocol.ts +30 -2
- package/src/replication-firewall-errors.test.ts +126 -0
- package/src/services/cluster.ts +97 -20
- package/src/services/nodes.ts +39 -10
- package/src/services/pools.ts +27 -12
package/src/services/pools.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidata.js, via scripts/apidoc.ts — see its header). Do not edit.
|
|
2
2
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
3
|
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
4
5
|
import * as T from "../traits.ts";
|
|
5
6
|
import {
|
|
6
7
|
ProxmoxProtocol,
|
|
@@ -11,6 +12,20 @@ import * as Retry from "../retry.ts";
|
|
|
11
12
|
|
|
12
13
|
export type { ProxmoxOpError, ProxmoxOpContext };
|
|
13
14
|
|
|
15
|
+
/** The resource pool does not exist. pve-manager 9.2.11, f6997e698c7933ea8e62319e2bf1bf7262daa56a, PVE/API2/Pool.pm:106,327,512 throws pool '<poolid>' does not exist in the read, update and delete handlers. Deprecated item routes delegate to them. The wire status is 500; a nonempty pool refusal or missing parent during create is a different error and must not match. */
|
|
16
|
+
export class PoolNotFound
|
|
17
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
18
|
+
/*@__PURE__*/ S.TaggedError<PoolNotFound>()("PoolNotFound", {
|
|
19
|
+
message: S.String,
|
|
20
|
+
}).pipe(C.withBadRequestError),
|
|
21
|
+
[
|
|
22
|
+
{
|
|
23
|
+
status: 500,
|
|
24
|
+
message: { matches: "^pool '[^']+' does not exist\\n?$" },
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
) {}
|
|
28
|
+
|
|
14
29
|
export interface CreatePoolRequest {
|
|
15
30
|
comment?: string;
|
|
16
31
|
poolid: string;
|
|
@@ -299,7 +314,7 @@ export const createPool: API.OperationMethod<
|
|
|
299
314
|
retry: Retry.Retry,
|
|
300
315
|
}));
|
|
301
316
|
|
|
302
|
-
export type DeletePoolError = ProxmoxOpError;
|
|
317
|
+
export type DeletePoolError = PoolNotFound | ProxmoxOpError;
|
|
303
318
|
/** Delete pool (deprecated, no support for nested pools, use 'DELETE /pools/?poolid={poolid}'). (root-privileged endpoint) */
|
|
304
319
|
export const deletePool: API.OperationMethod<
|
|
305
320
|
DeletePoolRequest,
|
|
@@ -309,12 +324,12 @@ export const deletePool: API.OperationMethod<
|
|
|
309
324
|
> = /*@__PURE__*/ API.make(() => ({
|
|
310
325
|
input: DeletePoolRequest,
|
|
311
326
|
output: DeletePoolResponse,
|
|
312
|
-
errors: [],
|
|
327
|
+
errors: [PoolNotFound],
|
|
313
328
|
protocol: ProxmoxProtocol,
|
|
314
329
|
retry: Retry.Retry,
|
|
315
330
|
}));
|
|
316
331
|
|
|
317
|
-
export type DeletePoolsError = ProxmoxOpError;
|
|
332
|
+
export type DeletePoolsError = PoolNotFound | ProxmoxOpError;
|
|
318
333
|
/** Delete pool. (root-privileged endpoint) */
|
|
319
334
|
export const deletePools: API.OperationMethod<
|
|
320
335
|
DeletePoolsRequest,
|
|
@@ -324,12 +339,12 @@ export const deletePools: API.OperationMethod<
|
|
|
324
339
|
> = /*@__PURE__*/ API.make(() => ({
|
|
325
340
|
input: DeletePoolsRequest,
|
|
326
341
|
output: DeletePoolsResponse,
|
|
327
|
-
errors: [],
|
|
342
|
+
errors: [PoolNotFound],
|
|
328
343
|
protocol: ProxmoxProtocol,
|
|
329
344
|
retry: Retry.Retry,
|
|
330
345
|
}));
|
|
331
346
|
|
|
332
|
-
export type GetPoolError = ProxmoxOpError;
|
|
347
|
+
export type GetPoolError = PoolNotFound | ProxmoxOpError;
|
|
333
348
|
/** Get pool configuration (deprecated, no support for nested pools, use 'GET /pools/?poolid={poolid}'). */
|
|
334
349
|
export const getPool: API.OperationMethod<
|
|
335
350
|
GetPoolRequest,
|
|
@@ -339,12 +354,12 @@ export const getPool: API.OperationMethod<
|
|
|
339
354
|
> = /*@__PURE__*/ API.make(() => ({
|
|
340
355
|
input: GetPoolRequest,
|
|
341
356
|
output: GetPoolResponse,
|
|
342
|
-
errors: [],
|
|
357
|
+
errors: [PoolNotFound],
|
|
343
358
|
protocol: ProxmoxProtocol,
|
|
344
359
|
retry: Retry.Retry,
|
|
345
360
|
}));
|
|
346
361
|
|
|
347
|
-
export type ListPoolsError = ProxmoxOpError;
|
|
362
|
+
export type ListPoolsError = PoolNotFound | ProxmoxOpError;
|
|
348
363
|
/** List pools or get pool configuration. */
|
|
349
364
|
export const listPools: API.OperationMethod<
|
|
350
365
|
ListPoolsRequest,
|
|
@@ -354,12 +369,12 @@ export const listPools: API.OperationMethod<
|
|
|
354
369
|
> = /*@__PURE__*/ API.make(() => ({
|
|
355
370
|
input: ListPoolsRequest,
|
|
356
371
|
output: ListPoolsResponse,
|
|
357
|
-
errors: [],
|
|
372
|
+
errors: [PoolNotFound],
|
|
358
373
|
protocol: ProxmoxProtocol,
|
|
359
374
|
retry: Retry.Retry,
|
|
360
375
|
}));
|
|
361
376
|
|
|
362
|
-
export type PutPoolError = ProxmoxOpError;
|
|
377
|
+
export type PutPoolError = PoolNotFound | ProxmoxOpError;
|
|
363
378
|
/** Update pool data (deprecated, no support for nested pools - use 'PUT /pools/?poolid={poolid}' instead). (root-privileged endpoint) */
|
|
364
379
|
export const putPool: API.OperationMethod<
|
|
365
380
|
PutPoolRequest,
|
|
@@ -369,12 +384,12 @@ export const putPool: API.OperationMethod<
|
|
|
369
384
|
> = /*@__PURE__*/ API.make(() => ({
|
|
370
385
|
input: PutPoolRequest,
|
|
371
386
|
output: PutPoolResponse,
|
|
372
|
-
errors: [],
|
|
387
|
+
errors: [PoolNotFound],
|
|
373
388
|
protocol: ProxmoxProtocol,
|
|
374
389
|
retry: Retry.Retry,
|
|
375
390
|
}));
|
|
376
391
|
|
|
377
|
-
export type PutPoolsError = ProxmoxOpError;
|
|
392
|
+
export type PutPoolsError = PoolNotFound | ProxmoxOpError;
|
|
378
393
|
/** Update pool. (root-privileged endpoint) */
|
|
379
394
|
export const putPools: API.OperationMethod<
|
|
380
395
|
PutPoolsRequest,
|
|
@@ -384,7 +399,7 @@ export const putPools: API.OperationMethod<
|
|
|
384
399
|
> = /*@__PURE__*/ API.make(() => ({
|
|
385
400
|
input: PutPoolsRequest,
|
|
386
401
|
output: PutPoolsResponse,
|
|
387
|
-
errors: [],
|
|
402
|
+
errors: [PoolNotFound],
|
|
388
403
|
protocol: ProxmoxProtocol,
|
|
389
404
|
retry: Retry.Retry,
|
|
390
405
|
}));
|