There is a module named nodedev_xml in virttest/libvirt_xml/. And a method get_sysfs_sub_path seems useful for this test.