def rescan_all(host):
 if os.path.isdir('/sys/class/scsi_host/host{0}'.format(host)):
  cmd = 'echo "- - -" > /sys/class/scsi_host/host{0}/scan'.format(host)
 else:
  return 'Host {0} does not exist'.format(host)
 return __salt__['cmd.run'](cmd).splitlines()

def rescan_all ( host ) : if os . path . isdir ( '/sys/class/scsi_host/host{0}' . format ( host ) ) : cmd = 'echo "- - -" > /sys/class/scsi_host/host{0}/scan' . format ( host ) else : return 'Host {0} does not exist' . format ( host ) return __salt__ [ 'cmd.run' ] ( cmd ) . splitlines ( )
list scsi devices cli example: .