diff --git a/base/models/models.go b/base/models/models.go index b87949515..b8cbf8fe0 100644 --- a/base/models/models.go +++ b/base/models/models.go @@ -95,6 +95,7 @@ type SystemPlatform struct { SatelliteManaged bool `gorm:"column:satellite_managed"` BuiltPkgcache bool `gorm:"column:built_pkgcache"` Arch *string + Bootc bool } func (SystemPlatform) TableName() string { diff --git a/listener/upload.go b/listener/upload.go index 433983b51..47427ef17 100644 --- a/listener/upload.go +++ b/listener/upload.go @@ -320,6 +320,7 @@ func updateSystemPlatform(tx *gorm.DB, inventoryID string, accountID int, host * "satellite_managed", "built_pkgcache", "arch", + "bootc", } now := time.Now() @@ -328,6 +329,11 @@ func updateSystemPlatform(tx *gorm.DB, inventoryID string, accountID int, host * displayName = *host.DisplayName } + isBootc := false + if len(host.SystemProfile.BootcStatus.Booted.Image) > 0 { + isBootc = true + } + staleWarning := host.StaleWarningTimestamp.Time() updatesReqJSONString := string(updatesReqJSON) systemPlatform := models.SystemPlatform{ @@ -347,6 +353,7 @@ func updateSystemPlatform(tx *gorm.DB, inventoryID string, accountID int, host * SatelliteManaged: host.SystemProfile.SatelliteManaged, BuiltPkgcache: yumUpdates.GetBuiltPkgcache(), Arch: host.SystemProfile.Arch, + Bootc: isBootc, } type OldChecksums struct {