Skip to content

Instantly share code, notes, and snippets.

@mator
Created April 23, 2019 20:23
Show Gist options
  • Save mator/204cda08f7a2f808efdc387cd155d287 to your computer and use it in GitHub Desktop.
Save mator/204cda08f7a2f808efdc387cd155d287 to your computer and use it in GitHub Desktop.
pr 55643
elif sys.platform.startswith('aix'):
if module is not None:
cmd = module.get_bin_path('lsattr', required=True)
cmd = cmd + " -E -l iscsi0"
rc, out, err = module.run_command(cmd)
if out:
line = self.findstr(out, 'initiator_name')
iscsi_facts['iscsi_iqn'] = line.split()[1].rstrip()
...
def findstr(self, text, str):
for line in text.splitlines():
if str in line: found = line
return found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment