Add udev accessor for ID_MODEL_FROM_DATABASE/ID_MODEL.
We get model info from udev, and it's useful to expose it.
---
storage/udev.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/storage/udev.py b/storage/udev.py
index 8f1f78f..42b27e6 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -276,6 +276,10 @@ def udev_device_get_vendor(udev_info):
""" Get the vendor of the device as reported by udev. """
return udev_info.get("ID_VENDOR_FROM_DATABASE", udev_info.get("ID_VENDOR"))
+def udev_device_get_model(udev_info):
+ """ Get the model of the device as reported by udev. """
+ return udev_info.get("ID_MODEL_FROM_DATABASE", udev_info.get("ID_MODEL"))
+
def udev_device_get_bus(udev_info):
""" Get the bus a device is connected to the system by. """
return udev_info.get("ID_BUS", "").upper()
--
1.6.5.2
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list