from pyanaconda.modules.common.constants.services import STORAGE storage_devices = STORAGE.storage_devices print(storage_devices)
from pyanaconda.modules.common.constants.services import STORAGE storage_device = "/dev/sda" storage_type = STORAGE.device_types.get(storage_device) print(storage_type)This code will output the type of the storage device "/dev/sda". Package library: pyanaconda.