community.general/lib/ansible/module_utils/facts
Anatoly Pugachev 19f6634353 Add support of facts gathering WWNs on AIX OS (#51704)
* Extend git commit c65909d6db "Add network fact to obtain FC WWN initiator ports"
adding support of enumerating AIX device WWN ports

$ lsdev -Cc adapter -l fcs*
fcs0 Defined   00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1 Defined   00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2 Available 04-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3 Available 04-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

$ lscfg -vpl fcs3 | grep 'Network Address'
        Network Address.............10000090FA551509

* no self in this code

* Two fixes:

- fix run_command execution, passing 'use_unsafe_shell=True' since we have a pipe in it ( | grep )
  if we don't set unsafe shell, it will return error on execution.

- strip new line characters at the end of WWNs.

* fix pep8 , E225 missing whitespace around operator

* use module.get_bin_path() instead of hardcoded values

* move module.get_bin_path() out of for loop

* use python string parsing instead of calling external grep

* use in operator instead of find() for simplicity and readability

* add changelog fragment
2019-04-11 00:13:33 +02:00
..
hardware facts: correctly detect xen paravirt vs hvm cpuinfo (#49320) 2019-04-10 00:17:30 -04:00
network Add support of facts gathering WWNs on AIX OS (#51704) 2019-04-11 00:13:33 +02:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Force pkg_mgr yum for rhel < 8, dnf for rhel > 8 (#54010) 2019-04-09 14:32:00 -05:00
virtual facts: set virtualization_role for KVM hosts (#50770) 2019-01-17 09:47:16 +01:00
__init__.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
ansible_collector.py Fix fact deps when 'filter=ansible_fact' is used. (#33441) 2018-01-20 15:07:27 -05:00
collector.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
compat.py Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
default_collectors.py Add network fact to obtain FC WWN initiator ports (#37043) 2019-01-31 21:59:38 +00:00
namespace.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
packages.py scan_packages: made adding package managers easier (#49079) 2019-03-06 12:29:51 -05:00
sysctl.py Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
timeout.py Make the timeout decorator raise an exception out of the function's scope (#49921) 2018-12-18 18:01:46 -08:00
utils.py made missing cli tools non fatal (#37194) 2018-04-10 17:23:29 -04:00