Server IP : 184.154.167.98 / Your IP : 3.149.230.208 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/cloudinit/net/__pycache__/ |
Upload File : |
3 \�me� � @ sb d dl Z d dlZd dlmZ d dlmZ d dlmZ dd� Zdd� Z ed �Z G d d� de j�ZdS )� N)�Optional)�NetworkState)�generate_udev_rulec s � fdd�S )Nc s � | d kS )N�type� )�iface)� match_typer �/usr/lib/python3.6/renderer.py�<lambda> s z filter_by_type.<locals>.<lambda>r )r r )r r �filter_by_type s r c s � fdd�S )Nc s � | ko| � S )Nr )r )� match_namer r r s z filter_by_attr.<locals>.<lambda>r )r r )r r �filter_by_attr s r Zphysicalc @ sF e Zd Zd dd�Zeed�dd��Zejdee e dd�dd ��ZdS )�RendererNc C s d S )Nr )�self�configr r r �__init__ s zRenderer.__init__)� network_statec C s^ t j� }xL| jt�D ]>}d|kr|jd�r|jdd�}|jt|d |d |d�� qW |j� S )z2Given state, emit udev rules to map mac to ifname.�nameZmac_address�driverN)r )�io�StringIOZiter_interfaces�filter_by_physical�get�writer �getvalue)r Zcontentr r r r r �_render_persistent_net s zRenderer._render_persistent_net)r � templates�returnc C s dS )zRender network state.Nr )r r r �targetr r r �render_network_state0 s zRenderer.render_network_state)N)NN)�__name__� __module__�__qualname__r �staticmethodr r �abc�abstractmethodr �dictr r r r r r s r ) r$ r Ztypingr Zcloudinit.net.network_stater Zcloudinit.net.udevr r r r �ABCr r r r r �<module> s