o i©¹dÕã@s ddlmZGdd„deƒZdS)é)Ú SoSPrepperc@seZdZdZdZdd„ZdS)ÚHostnamePrepperaw Prepper for providing domain and hostname information to the hostname mapping. The items from hostname sources are handled manually via the _get_items method, rather than passing the file directly, as the parser does not know what hostnames or domains to match on initially. This will also populate the regex_items list with local short names. Úhostnamec Cs6g}d}|jr d}n|jrd}| |¡}|rS|dkrS| d¡}t|ƒdkr6| |d¡|jd |d¡t|ƒdkrLd |d d…¡}| |  ¡¡| |  ¡¡| d ¡}|  ¡D]0}|  d ¡sgd|vrhq\| ¡dd…} | D]} t|  d¡ƒdkr†|jd | ¡qr| | ¡qrq\|j j D]} | | ¡q‘|S) Nrzsos_commands/host/hostnamez"data/insights_commands/hostname_-fÚ localhostÚ.érééþÿÿÿz etc/hostsú#)Úis_sosÚ is_insightsÚget_file_contentÚsplitÚlenÚappendÚ regex_itemsÚaddÚjoinÚstripÚ splitlinesÚ startswithÚoptsÚdomains) ÚselfÚarchiveÚitemsÚ_fileÚcontentrÚ top_domainÚ_hostsÚlineÚhostlnÚhostÚdomain©r$ú?/usr/lib/python3/dist-packages/sos/cleaner/preppers/hostname.pyÚ_get_items_for_hostnames:        ü  z'HostnamePrepper._get_items_for_hostnameN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Únamer&r$r$r$r%rs rN)Úsos.cleaner.preppersrrr$r$r$r%Ús