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
Akshat Kumar
7eaacafc19
shared/api: Add Certificates to InitLocalPreseed
...
Signed-off-by: Akshat Kumar <akaman.boss@gmail.com >
2025-05-06 00:54:15 -04:00
Saahir Narang
05b276dd4b
shared/api: Add field for image type to ImagePost struct
...
Signed-off-by: Saahir Narang <saahir.narang@gmail.com >
2025-05-02 20:10:19 -04:00
karo
f3e9cdec7d
shared/api: unify methods declared on the Instance struct to all take a pointer
...
Signed-off-by: karo <karolin.kostial@gmail.com >
2025-04-27 14:31:27 +02:00
Stéphane Graber
841df47217
Merge pull request #1973 from breml/scriptlet-struct-tags
...
shared/api/scriptlet: Add yaml struct tags
2025-04-22 21:26:09 -04:00
Lucas Bremgartner
ed4bb1a62c
api/scriptlet: Add yaml struct tags
...
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io >
2025-04-22 21:57:03 +02:00
Stéphane Graber
ba8319ac62
shared/api: Add SNAT to NetworkForwardPort
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
Sponsored-by: ActivePort (https://www.activeport.com.au )
2025-04-14 00:37:47 -04:00
Isidore Reinhardt
c7ada676ca
shared/api/lifecycle: Add events for network address sets
...
Signed-off-by: Isidore Reinhardt <pro.irhndt@4fk.fr >
2025-04-04 15:15:11 -04:00
Isidore Reinhardt
ff99d8c45c
shared/api: Add network address sets
...
Signed-off-by: Isidore Reinhardt <pro.irhndt@4fk.fr >
2025-04-04 15:15:10 -04:00
Stéphane Graber
e34c0ebe64
shared/api: Make golangci-lint clean
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-02 21:58:35 -04:00
Benjamin Somers
08ee9e729d
shared/api: Add AllocatedTime CPU field
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-03-19 15:12:18 -04:00
Colin Watson
4221663596
shared: Fix spelling errors found by codespell
...
Signed-off-by: Colin Watson <cjwatson@debian.org >
2025-03-18 14:51:49 -04:00
Stéphane Graber
3f150b7c4f
shared/api: Switch to new MAC prefix
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-16 02:47:30 -04:00
Stéphane Graber
01b0e1c4e6
shared/api: Make NetworkStateCounters a pointer
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-14 16:36:43 -04:00
Stéphane Graber
250ffb5c04
shared/api: Add LogicalSwitch to OVN state
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-14 16:36:37 -04:00
Meghea Iulian
3c2b5c0679
shared/api: Add project support to profiles in preseed init
...
Signed-off-by: Meghea Iulian <iulian.meghea@gmail.com >
2025-01-27 13:36:23 -05:00
Meghea Iulian
fb6f116fba
shared/api: Add storage volume initialization
...
Signed-off-by: Meghea Iulian <iulian.meghea@gmail.com >
2025-01-23 18:45:23 -05:00
Winicius Silva
3630bc9b10
shared/api: Expand OVN state with uplink addresses
...
Signed-off-by: Winicius Silva <winiciusab12@gmail.com >
2024-12-17 01:10:51 -05:00
Piotr Resztak
8949e0c7b3
shared/api: Add Force field to InstanceConsolePost
...
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io >
2024-12-11 18:45:07 +01:00
Parm Gill
7ba95d6fbd
shared/api: Add RefreshExcludeOlder to InstanceSource and StorageVolumeSource
...
Signed-off-by: Parm Gill <pgdev@daak.ca >
2024-11-14 08:44:13 -05:00
Stéphane Graber
dd68156f27
shared/api: Add NetworkLoadBalancerState
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
Sponsored-by: Luizalabs (https://luizalabs.com )
2024-09-25 00:05:13 -04:00
Mathias Gibbens
8ef3cbc415
shared/api: Add OSInfo to InstanceState
...
Signed-off-by: Mathias Gibbens <mathias.gibbens@futurfusion.io >
2024-09-24 08:05:28 -06:00
Stéphane Graber
52b6b031a5
shared/api: Fix incorrect struct naming for volume backups
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2024-08-26 01:08:32 -04:00
Stéphane Graber
27548c5861
shared/api: Add lifecycle events for cluster evacuation and healing
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2024-08-04 22:13:33 -04:00