Commit Graph

470 Commits

Author SHA1 Message Date
Stéphane Graber
1926918563
shared/api: Hide additional sensitive config keys
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-07-31 05:04:13 -04:00
Benjamin Somers
5eaad262c2
shared/api: Add InstanceNVRAMVariablePut struct
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-07-29 22:51:01 -04:00
Stéphane Graber
70dafdac43
shared/api: Add Cluster to ResourcesCPUCore
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-07-23 11:14:43 -04:00
Benjamin Somers
5d70034573
shared/api: Add InstanceNVRAMVariable struct
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-07-22 20:27:25 -04:00
Stéphane Graber
8b165bff4e
shared/api: Add InstancePortForwardPost
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-07-12 12:06:47 -04:00
Marcos Guillermo
4f88c2a16e
shared/api: add Network field to NetworkAllocations
Signed-off-by: Marcos Guillermo <marcos.cosson@ccc.ufcg.edu.br>
2026-07-09 21:59:21 -04:00
Stéphane Graber
6728a1eafc
global: Update for go-yaml/v4 rc5
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-10 22:26:22 -04:00
Stéphane Graber
3732e84290
shared/api: Add Server.Filtered()
This returns a filtered version of the struct where sensitive keys are
replaced with SENSITIVE and where some other noisy keys are removed or
summarized.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 00:34:07 -04:00
Stéphane Graber
ba407ebf09
shared/api: Remove legacy logic
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-04 14:23:12 -04:00
Benjamin Somers
ae5b55a706 shared/api/url: Add URL fragment setter
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-28 10:07:02 +00:00
Stéphane Graber
0be992c3de
Merge pull request #3404 from stgraber/rebuild
Implement storage volume rebuild
2026-05-27 14:54:01 -04:00
Stéphane Graber
75bcc0159a
shared/api: Drop no-op omitempty on nested struct fields
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-27 03:37:58 -04:00
Stéphane Graber
a172b4ef43
shared/api: Add StorageVolumeRebuildPost
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-26 18:35:05 -04:00
Stéphane Graber
d56e91ceda
shared/api: Fix swagger examples
This fixes a few inconsistencies/issues with the current examples.

Closes #3335

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-21 11:34:33 +02:00
Stéphane Graber
40dd4f151d
Rewrite Go import path to v7
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-02 01:18:25 +02:00
Stéphane Graber
a18b30213a
shared/api/scriptlet: Add InstancePlacementReasonRebalance
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-01 03:29:27 +02:00
Piotr Resztak
f4ad06efbe
shared/api: Add structs for managing dirty bitmaps
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2026-04-13 01:12:10 -04:00
Stéphane Graber
0fae4ba67c
shared/api: Switch to go-yaml/v4
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-31 16:14:26 -04:00
Piotr Resztak
3c1c72d5d5
shared/api: Add RootOnly to InstanceBackupsPost
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2026-03-16 14:24:34 -04:00
0xk1f0
d7eacd827e
shared/api: add new instance-agent events
Signed-off-by: 0xk1f0 <dev@k1f0.dev>
2026-03-12 15:58:14 +01:00
Stéphane Graber
c1caca2a0f
shared/api: Add InstanceDebugRepairPost
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-04 22:16:27 -05:00
Stéphane Graber
091c4f2912
shared/api: Align JSON and YAML behavior for preseeding
YAML which is our primary user facing format has been using in-lining of
the server configuration within the preseed. But the Go and JSON side of
the struct were not set up to match, leading to a bunch of issues with
IncusOS and associated projects that frequently flip back and forth
between JSON and YAML.

To fix this properly, change the struct to reflect the way it's been
used by users since its introduction. This is technically a small
breaking change for anyone directly interacting with the struct through Go.

This isn't an actual REST API struct, so there is no impact at the REST
API level.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-02-24 01:34:10 -05:00
Leon Schoch
463f3fa039
shared/api: Add DiskOnly option in InstancePut
Signed-off-by: Leon Schoch <lschoch@anexia.com>
2026-02-08 21:40:48 -05:00
baconyao
dd034aa3dd
shared/api: add comprehensive unit tests for URL builder
Replace Example test with proper unit tests for all URL builder methods.
Focus on testing our business logic rather than standard library behavior.
Fix Target method comment (checks "none" not "default").

Signed-off-by: baconyao <bacon735392@gmail.com>
2025-12-18 13:49:30 -05:00
Lucas Bremgartner
837d477d31
api: Use DevicesMap type for map[string]map[string]string
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-11-29 01:16:32 -05:00
Lucas Bremgartner
612a10de5f
api: Add DevicesMap typ to better support unmarshaling
of numbers and bools in map[string]map[string]string devices types

Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-11-29 01:16:31 -05:00
Lucas Bremgartner
42056d3eac
api: More precise name for test
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-11-29 01:16:30 -05:00
baconyao
ace6cb8e8d
shared/api: Add Serial device resource types
Add ResourcesSerial and ResourcesSerialDevice types to expose serial
device information in the resources API.

Signed-off-by: baconyao <bacon735392@gmail.com>
2025-11-28 02:38:20 -05:00
Stéphane Graber
9b23183b52
shared/api: Add StorageBucketFull
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-11-27 18:51:03 -05:00
Stéphane Graber
204b247e79
shared/api: Add StorageVolumeFull
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-11-27 18:51:02 -05:00
Stéphane Graber
1e2648bc62
shared/api: Add missing CreatedAt on bucket backup
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-11-27 18:50:58 -05:00
Stéphane Graber
525dcb1f14
shared/api: Remove non-existent field from StoragePoolBucketBackup
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-11-27 18:50:56 -05:00
Piotr Resztak
a2a042473e shared/api: Add lifecycle events for storage volume files management
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2025-10-24 13:50:06 +02:00
Piotr Resztak
530bc95061 api: Add cluster_group_usedby extension
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2025-10-19 13:04:02 +02:00
Piotr Resztak
d561b5db81 shared/api: Add 'UsedBy' field to 'ClusterGroup' struct
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
2025-10-19 12:17:02 +02:00
Stéphane Graber
51503cc852
Merge pull request #2496 from breml/config-map
Replace map[string]string with ConfigMap for more user friendly handling of bool and numbers (with defaults)
2025-09-25 22:06:34 -04:00
Stéphane Graber
105e72ff34
shared/api: Add support for cluster group preseeding
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-09-25 15:34:12 -04:00
Stéphane Graber
8f3918ebae
shared/api: Add missing YAML tag
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-09-25 15:29:15 -04:00
Lucas Bremgartner
e78e22fb2a
api: Handle pre initialized targed ConfigMap (default values)
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-09-22 11:18:46 +02:00
Lucas Bremgartner
055396ccdd
api: Use ConfigMap type for map[string]string
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-09-22 11:18:45 +02:00
Lucas Bremgartner
fff3f9832e
api: Add ConfigMap type to better support unmarshaling numbers and bools to map[string]string
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
2025-09-22 11:18:44 +02:00
Stéphane Graber
722076723c
shared/api: Add missing Description field to InstanceSnapshots
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-08-28 16:55:43 -04:00
Stéphane Graber
61520c7577
api: resources_cpu_address_sizes
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-06-23 17:39:48 -04:00
Akshat Kumar
78afcd97fd
shared/api: Add backup target for instance and volume
Signed-off-by: Akshat Kumar <akaman.boss@gmail.com>
2025-06-03 18:08:03 -04:00
Stéphane Graber
c4e01a3878
Merge pull request #2147 from truenas/se/typos
incusd: Fix some trivial typos
2025-05-27 02:09:04 -04:00
Stuart Espey
2cecb8ed5b typo: DIsk -> Disk
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
2025-05-27 14:28:25 +10:00
Nathan Chase
fd503dd227
shared/api: Don't needlessly use format string functions
Signed-off-by: Nathan Chase <ntc477@utexas.edu>
2025-05-23 01:44:26 -04:00
JUN JIE NAN
ac3082a4f6
shared/api: Simplify code by using modern constructs
Using more modern features of Go, such as:
- conditional assignment -> built-in min or max in go1.21,
- sort.Slice -> slices.Sort in go1.21,
- loop assign map -> maps.Copy in go1.21,
- []byte(fmt.Sprintf...) -> fmt.Appendf(nil,...) in go1.19,
- strings.HasPrefix / strings.TrimPrefix -> strings.CutPrefix in go1.20

Signed-off-by: JUN JIE NAN <nanjunjie@gmail.com>
2025-05-17 12:32:29 -04:00
Stéphane Graber
0e4095ff5e
Merge pull request #2035 from Aryan470/database-gen
Porting `network_acls` to database generator
2025-05-06 02:49:18 -04:00
Stéphane Graber
2023073ee1
shared/api: Add URL function on NetworkACL
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-05-06 01:29:19 -04:00