mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
source/system: Add reading product name information
This commit is contained in:
parent
c07f71e934
commit
7f6669eb92
2 changed files with 2 additions and 1 deletions
|
@ -1027,6 +1027,7 @@ The following features are available for matching:
|
||||||
| | | **`<parameter>`** | string | One parameter from `/etc/os-release` |
|
| | | **`<parameter>`** | string | One parameter from `/etc/os-release` |
|
||||||
| **`system.dmiid`** | attribute | | | DMI identification data from `/sys/devices/virtual/dmi/id/` |
|
| **`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` |
|
| | | **`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 |
|
| **`system.name`** | attribute | | | System name information |
|
||||||
| | | **`nodename`** | string | Name of the kubernetes node object |
|
| | | **`nodename`** | string | Name of the kubernetes node object |
|
||||||
| **`usb.device`** | instance | | | USB devices present in the system |
|
| **`usb.device`** | instance | | | USB devices present in the system |
|
||||||
|
|
|
@ -103,7 +103,7 @@ func (s *systemSource) Discover() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get DMI ID attributes
|
// Get DMI ID attributes
|
||||||
dmiIDAttributeNames := []string{"sys_vendor"}
|
dmiIDAttributeNames := []string{"sys_vendor", "product_name"}
|
||||||
dmiAttrs := make(map[string]string)
|
dmiAttrs := make(map[string]string)
|
||||||
for _, name := range dmiIDAttributeNames {
|
for _, name := range dmiIDAttributeNames {
|
||||||
val, err := getDmiIDAttribute(name)
|
val, err := getDmiIDAttribute(name)
|
||||||
|
|
Loading…
Reference in a new issue