Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/landscape/sysinfo/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/landscape/sysinfo/__pycache__/network.cpython-310.pyc
o

���c��@sTddlmZddlmZddlmZmZddlmZddl	m
Z
Gdd�de�ZdS)	�)�partial)�
itemgetter)�AF_INET�AF_INET6)�succeed)�get_active_device_infoc@s*eZdZdZd	dd�Zdd�Zdd�ZdS)
�Networkz�Show information about active network interfaces.

    @param get_device_info: Optionally, a function that returns information
        about network interfaces.  Defaults to L{get_active_device_info}.
    NcCs |durttddd�}||_dS)NT)�extended�default_only)rr�_get_device_info)�self�get_device_info�r�;/usr/lib/python3/dist-packages/landscape/sysinfo/network.py�__init__s
�
zNetwork.__init__cCs
||_dS)zeRegister this plugin with the sysinfo system.

        @param sysinfo: The sysinfo registry.
        N)�_sysinfo)r�sysinforrr�registers
zNetwork.registercCs�|��}t|td�d�D]6}|d}|d�tg�}|d�tg�}|D]
}|j�d||d�q$|D]
}|j�d||d�q4qtd�S)z�
        Gather information about network interfaces and write it to the
        sysinfo output.

        @return: A succeeded C{Deferred}.
        �	interface)�key�ip_addresseszIPv4 address for %s�addrzIPv6 address for %sN)	r�sortedr�getrrr�
add_headerr)r�device_info�infor�ipv4_addresses�ipv6_addressesrrrr�runs���zNetwork.run)N)�__name__�
__module__�__qualname__�__doc__rrrrrrrr
s

rN)
�	functoolsr�operatorr�	netifacesrr�twisted.internet.deferr�landscape.lib.networkr�objectrrrrr�<module>s

Spamworldpro Mini