def iterateIscsiInterfaces(): names = iscsiadm.iface_list() for name in names: yield IscsiInterface(name)
def iterateIscsiInterfaces(): for iface in iscsiadm.iface_list(): yield IscsiInterface(iface.ifacename, netIfaceName=iface.net_ifacename)