def iscsi_login(target_name):
 cmd = ('iscsiadm --mode node --login --targetname %s' % target_name)
 output = utils.system_output(cmd)
 target_login = ''
 if ('successful' in output):
  target_login = target_name
 return target_login

def iscsi_login ( target_name ) : cmd = ( 'iscsiadm --mode node --login --targetname %s' % target_name ) output = utils . system_output ( cmd ) target_login = '' if ( 'successful' in output ) : target_login = target_name return target_login
login to a target with the target name .