Current Dir: /snap/core22/2437/usr/lib/python3/dist-packages/cloudinit/distros/__pycache__/

[FILE] almalinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] alpine.cpython-310.pyc [ edit | delete | rename ]
[FILE] amazon.cpython-310.pyc [ edit | delete | rename ]
[FILE] aosc.cpython-310.pyc [ edit | delete | rename ]
[FILE] arch.cpython-310.pyc [ edit | delete | rename ]
[FILE] azurelinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] bsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] bsd_utils.cpython-310.pyc [ edit | delete | rename ]
[FILE] centos.cpython-310.pyc [ edit | delete | rename ]
[FILE] cloudlinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] cos.cpython-310.pyc [ edit | delete | rename ]
[FILE] debian.cpython-310.pyc [ edit | delete | rename ]
[FILE] dragonflybsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] eurolinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] fedora.cpython-310.pyc [ edit | delete | rename ]
[FILE] freebsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] gentoo.cpython-310.pyc [ edit | delete | rename ]
[FILE] mariner.cpython-310.pyc [ edit | delete | rename ]
[FILE] miraclelinux.cpython-310.pyc [ edit | delete | rename ]
[FILE] netbsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] networking.cpython-310.pyc [ edit | delete | rename ]
[FILE] openbsd.cpython-310.pyc [ edit | delete | rename ]
[FILE] OpenCloudOS.cpython-310.pyc [ edit | delete | rename ]
[FILE] openeuler.cpython-310.pyc [ edit | delete | rename ]
[FILE] openmandriva.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-leap.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-microos.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse-tumbleweed.cpython-310.pyc [ edit | delete | rename ]
[FILE] opensuse.cpython-310.pyc [ edit | delete | rename ]
[FILE] photon.cpython-310.pyc [ edit | delete | rename ]
[FILE] raspberry_pi_os.cpython-310.pyc [ edit | delete | rename ]
[FILE] rhel.cpython-310.pyc [ edit | delete | rename ]
[FILE] rhel_util.cpython-310.pyc [ edit | delete | rename ]
[FILE] rocky.cpython-310.pyc [ edit | delete | rename ]
[FILE] sle-micro.cpython-310.pyc [ edit | delete | rename ]
[FILE] sles.cpython-310.pyc [ edit | delete | rename ]
[FILE] sle_hpc.cpython-310.pyc [ edit | delete | rename ]
[FILE] suse.cpython-310.pyc [ edit | delete | rename ]
[FILE] TencentOS.cpython-310.pyc [ edit | delete | rename ]
[FILE] ubuntu.cpython-310.pyc [ edit | delete | rename ]
[FILE] ug_util.cpython-310.pyc [ edit | delete | rename ]
[FILE] virtuozzo.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2437/usr/lib/python3/dist-packages/cloudinit/distros/__pycache__/ubuntu.cpython-310.pyc

o

�t�hF	�@sdddlZddlZddlmZmZddlmZddlmZddl	m
Z
e�e�Z
Gdd�dej�ZdS)�N)�PREFERRED_NTP_CLIENTS�debian)�Snap)�
activators)�CLOUDINIT_NETPLAN_FILEcs@eZdZ�fdd�Zd�fdd�	Zedd��Zdd	d
�Z�ZS)
�Distrocsdt��|||�dtd�|_|jdtjd�|jdtjdd�d�|_t|j�|_	|j
�|j	�dS)Nz+/etc/network/interfaces.d/50-cloud-init.cfg)�eni�netplanr)�eni_path�
eni_headerr	T)�netplan_path�netplan_header�postcmds)�super�__init__r�network_conf_fnr�NETWORK_FILE_HEADER�renderer_configsr�_runner�snap�package_managers�append)�self�name�cfg�paths��	__class__��:/usr/lib/python3/dist-packages/cloudinit/distros/ubuntu.pyrs����zDistro.__init__Ncs,t��|||�|j��r|j��dSdS)N)r�package_commandr�	available�upgrade_packages)r�command�args�pkgsrrrr -s
�zDistro.package_commandcCs|js	t�t�|_|jS)z5The preferred ntp client is dependent on the version.)�_preferred_ntp_clients�copy�deepcopyr)rrrr�preferred_ntp_clients2szDistro.preferred_ntp_clients�returnc
Csbz|j��WdStjyt�d�YdSty0}z
t�d|�WYd}~dSd}~ww)zAEnsure that cloud-init's network service has network connectivityz6Failed to wait for network. No network activator foundzFailed to wait for network: %sN)�network_activator�wait_for_networkr�NoActivatorException�LOG�error�	Exception)r�errrr,9s��zDistro.wait_for_network)NN)r*N)	�__name__�
__module__�__qualname__rr �propertyr)r,�
__classcell__rrrrrs
r)r'�logging�cloudinit.distrosrr�)cloudinit.distros.package_management.snapr�
cloudinit.netr�cloudinit.net.netplanr�	getLoggerr2r.rrrrr�<module>s

Upload File: