1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00

Merge pull request #1871 from superbrothers/dmiIDAttributeNames_product_name

source/system: Add reading product name information
This commit is contained in:
Kubernetes Prow Robot 2024-09-10 08:55:14 +01:00 committed by GitHub
commit a8fd5051bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1027,6 +1027,7 @@ The following features are available for matching:
| | | **`<parameter>`** | string | One parameter from `/etc/os-release` |
| **`system.dmiid`** | attribute | | | DMI identification data from `/sys/devices/virtual/dmi/id/` |
| | | **`sys_vendor`** | string | Vendor name from `/sys/devices/virtual/dmi/id/sys_vendor` |
| | | **`product_name`** | string | Product name from `/sys/devices/virtual/dmi/id/product_name` |
| **`system.name`** | attribute | | | System name information |
| | | **`nodename`** | string | Name of the kubernetes node object |
| **`usb.device`** | instance | | | USB devices present in the system |

View file

@ -103,7 +103,7 @@ func (s *systemSource) Discover() error {
}
// Get DMI ID attributes
dmiIDAttributeNames := []string{"sys_vendor"}
dmiIDAttributeNames := []string{"sys_vendor", "product_name"}
dmiAttrs := make(map[string]string)
for _, name := range dmiIDAttributeNames {
val, err := getDmiIDAttribute(name)