a ì)gã@slddlmZmZmZeZddlZddlZddlm m m Z ddl mZddlmZGdd„deƒZdS)é)Úabsolute_importÚdivisionÚprint_functionN)Úget_file_content)ÚNetworkCollectorc@s eZdZdZeƒZddd„ZdS)ÚNvmeInitiatorNetworkCollectorZnvmeNcCshi}d|d<tj d¡rdtddƒ ¡D]<}| d¡s&| d¡s&| ¡dkrLq&| d¡r&||d<qdq&|S)a¦ Currently NVMe is only supported in some Linux distributions. If NVMe is configured on the host then a file will have been created during the NVMe driver installation. This file holds the unique NQN of the host. Example of contents of /etc/nvme/hostnqn: # cat /etc/nvme/hostnqn nqn.2014-08.org.nvmexpress:fc_lif:uuid:2cd61a74-17f9-4c22-b350-3020020c458d ÚZhostnqnZlinuxz/etc/nvme/hostnqnú#ú;znqn.)ÚsysÚplatformÚ startswithrÚ splitlinesÚstrip)ÚselfÚmoduleZcollected_factsZ nvme_factsÚline©rúK/usr/lib/python3.9/site-packages/ansible/module_utils/facts/network/nvme.pyÚcollect"s   z%NvmeInitiatorNetworkCollector.collect)NN)Ú__name__Ú __module__Ú __qualname__ÚnameÚsetZ _fact_idsrrrrrrsr)Z __future__rrrÚtypeZ __metaclass__r Ú subprocessZ"ansible.module_utils.compat.typingZ module_utilsÚcompatÚtypingÚtZ ansible.module_utils.facts.utilsrZ'ansible.module_utils.facts.network.baserrrrrrÚs