Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
ACCOUNTADMIN
ACTIVEMQ
advancedthreatprotection
artifactregistry
Comment thread
mondoo-code-review[bot] marked this conversation as resolved.
Comment thread
mondoo-code-review[bot] marked this conversation as resolved.
alloydb
alpn
antispam
appslot
arp
artifactregistry
atlassian
auditlog
Auths
autoaccept
autoclose
autoexpand
autoreplace
autotrim
autoprovision
Autoscalers
awsapps
Expand All @@ -24,20 +27,20 @@
bigquery
bigtable
blackhole
Blobstore
BYOS
bytematchstatement
cavium
cdn
certificatechains
ciscocatalyst
clcerts
cname
cloudflare
Clusterwide
cmek
cmnd
cname
cooldown
compressratio
copywrite
cpe
cryptokey
Expand All @@ -50,15 +53,16 @@
DATAUSER
datetime
ddos
dedupratio
deliverychannel
dfw
directoryservice
documentdb
draid
dlp
dlq
dlv
dnskey
documentdb
Doublings
dsse
eas
Ecmp
Expand All @@ -68,17 +72,16 @@
elbv
endpointslice
EPP
ETL
exo
failback
fargate
filestore
filesz
firefox
firestore
fortios
FLEXGROUP
FLEXVOL
fortios
frontmatter
ftps
fumadocs
Expand Down Expand Up @@ -111,9 +114,8 @@
ipsetreferencestatement
istio
jira
jsonbody
junos
KFP
jsonbody
kqueue
KSK
labelmatchstatement
Expand All @@ -129,17 +131,17 @@
maxmemory
mcp
mcr
meid
memorydb
meid
messagestoragepolicy
mfs
mgroup
minfree
MINIMALUSER
mkey
Mpim
msk
MULTIAZ
msk
Mpim
naflags
natgateway
networkfirewall
Expand Down Expand Up @@ -182,9 +184,9 @@
PTn
pushconfig
Pzi
Pzs
pzs
querypack
raidz
RABBITMQ
ratebasedstatement
recaptcha
Expand All @@ -199,7 +201,6 @@
rulegroupreferencestatement
saas
Sas
SASL
sbom
scim
scm
Expand Down Expand Up @@ -233,13 +234,16 @@
tpu
transitgateway
udid
UNAVAIL
uefi
Uocm
usb
Utc
valkey
VAULTNAME
vdcs
vdev
vdevs

Check warning on line 246 in .github/actions/spelling/expect.txt

View workflow job for this annotation

GitHub Actions / Run spell check

`vdevs` is ignored by check-spelling because another more general variant is also in expect. (ignored-expect-variant)
VGeneration
virtualmachine
vlans
Expand All @@ -256,5 +260,7 @@
workspacesweb
xssmatchstatement
yara
zfs
zpool
zrt
ZSTD
zstd
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ for {
- `topicArn string` → `topic() aws.sns.topic`
- `streamArn string` → `stream() aws.kinesis.stream`
These enable MQL traversal (e.g., `aws.rds.proxy.vpc.cidrBlock`) instead of requiring manual lookups. Store the raw ID/ARN in a `cache*` field on the Internal struct, then implement the typed method using `NewResource`.
- Every resource and field has an explicit entry in `.lr.versions`. When a new field is added to an `.lr` file that isn't yet tracked, the `versions` command automatically assigns it the next patch version (current provider version + 1 patch). Existing entries are never overwritten.
- Every resource and field has an explicit entry in `.lr.versions`. New entries must use the **next patch version** after the provider's current version (e.g., if the provider is at `13.1.1`, new fields should be `13.1.2`). Check the provider's current version before adding entries. The `versions` command does this automatically, but verify the result. Existing entries are never overwritten.
- **Match SDK types faithfully:** If an SDK field is `*bool`, use `bool` in `.lr` and `llx.BoolDataPtr()` in Go — don't cast it to `string`. If an SDK enum has only two states (Enabled/Disabled), prefer `bool`. Use `*type` intermediate variables with `llx.*DataPtr` helpers to preserve nil semantics.
- **Consistency with existing fields:** Before adding new fields to a resource, check how its existing fields handle pointers, nil checks, and type conversions. Follow the same pattern.
- **Verify enum values in `.lr` comments:** When listing possible values in field comments, check the SDK/API docs for completeness — don't assume the set is closed.
Expand Down
108 changes: 108 additions & 0 deletions providers/os/resources/os.lr
Original file line number Diff line number Diff line change
Expand Up @@ -2645,3 +2645,111 @@ private mdadm.device @defaults("name state") {
// Device state (e.g., active sync, spare, faulty)
state string
}

// ZFS storage pool and dataset management
zfs @defaults("pools") {
// ZFS version string
version() string
// ZFS storage pools
pools() []zfs.pool
// All ZFS datasets (filesystems, volumes, snapshots, bookmarks)
datasets() []zfs.dataset
}

// ZFS storage pool
zfs.pool @defaults("name health sizeBytes") {
init(name string)
// Pool name
name string
// Pool GUID
guid string
// Health status (ONLINE, DEGRADED, FAULTED, OFFLINE, REMOVED, UNAVAIL)
health string
// Total size in bytes
sizeBytes int
// Allocated space in bytes
allocatedBytes int
// Free space in bytes
freeBytes int
// Fragmentation percentage
fragmentation int
// Percentage of pool space used (0-100)
percentUsed int
// Deduplication ratio
dedupratio float
// Whether the pool is read-only
readonly bool
// Whether auto-expand is enabled
autoexpand bool
// Whether auto-replace is enabled
autoreplace bool
// Whether auto-trim is enabled
autotrim bool
// Top-level virtual device groups (mirrors, raidz, etc.)
vdevs() []zfs.pool.vdev
// All pool properties (lazy-loaded via zpool get all)
properties() map[string]string
}

// ZFS virtual device (vdev) in a pool's topology
zfs.pool.vdev @defaults("name type state numDevices") {
// Vdev name (e.g., "raidz2-0", "mirror-0", "sda")
name string
// Vdev type (mirror, raidz, raidz2, raidz3, disk, file, draid, etc.)
type string
// Vdev state (ONLINE, DEGRADED, FAULTED, OFFLINE, REMOVED, UNAVAIL)
state string
// Device path (for leaf vdevs, empty for groups)
path string
// Read error count
readErrors int
// Write error count
writeErrors int
// Checksum error count
checksumErrors int
// Slow I/O count
slowIos int
// Number of child devices
numDevices int
// Child vdevs/devices
devices []zfs.pool.vdev
}

// ZFS dataset (filesystem, volume, snapshot, or bookmark)
zfs.dataset @defaults("name type usedBytes") {
init(name string)
// Full dataset name (pool/path or pool/path@snap)
name string
// Dataset type (filesystem, volume, snapshot, bookmark)
type string
// Used space in bytes
usedBytes int
// Available space in bytes
availableBytes int
// Referenced space in bytes
referencedBytes int
// Mount point (empty for volumes/snapshots)
mountpoint string
// Compression algorithm (off, lz4, gzip, zstd, etc.)
compression string
// Compression ratio
compressratio float
// Whether the dataset is currently mounted
mounted bool
// Record size in bytes
recordsizeBytes int
// Quota in bytes (0 = none)
quotaBytes int
// Reservation in bytes (0 = none)
reservationBytes int
// Origin snapshot (for clones, empty otherwise)
origin string
// Creation time
creation time
// Encryption algorithm (off, aes-256-gcm, etc.)
encryption string
// All dataset properties (lazy-loaded via zfs get all)
properties() map[string]string
// Snapshots of this dataset
snapshots() []zfs.dataset
}
Loading
Loading