def refresh_luns(targetIQN, portal): wait_for_devs(targetIQN, portal) try: path = os.path.join("/dev/iscsi",targetIQN,portal) id = scsiutil.getSessionID(path) f=open('/sys/class/scsi_host/host%s/scan' % id, 'w') f.write('- - -\n') f.close() time.sleep(2) # FIXME except: pass
def refresh_luns(targetIQN, portal): wait_for_devs(targetIQN, portal) try: path = os.path.join("/dev/iscsi", targetIQN, portal) id = scsiutil.getSessionID(path) f = open('/sys/class/scsi_host/host%s/scan' % id, 'w') f.write('- - -\n') f.close() time.sleep(2) # FIXME except: pass