/usr/lib/python3/dist-packages/cloudinit/sources/helpers/__pycache__
Edit: /usr/lib/python3/dist-packages/cloudinit/sources/helpers/__pycache__/digitalocean.cpython-310.pyc (5955B)
o
th @ s d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZmZ dddZ e
eZddd Z
d
d Zddd
Zdd ZdddZdd ZdS ) N)dmi)net)
url_helperutileth0eth1)publicprivatec C s |st | }td| |stddtddtdd}z| j|| | j | td|| W |S t
yG ttd || w )
zBring up NIC using an address using link-local (ip4LL) IPs.
On DigitalOcean, the link-local domain is per-droplet routed, so there
is no risk of collisions. However, to be more safe, the ip4LL
address is random.
z,selected interface '%s' for reading metadatazPunable to find interfaces to access themeta-data server. This droplet is broken.z169.254.{0}.{1}/16 r z&brought device '%s' up with address %szRip4LL address assignment of '%s' to '%s' failed. Droplet networking will be broken)
get_link_local_nicLOGdebugRuntimeErrorformatrandomrandintnet_opsadd_addrlink_up Exceptionr logexc)distronicaddr r H/usr/lib/python3/dist-packages/cloudinit/sources/helpers/digitalocean.pyassign_ipv4_link_local s0 r c s. fddt D }|sd S t|dd dS )Nc s g | ]
} j |r|qS r )
networkingis_physical).0fr r r
9 s
z&get_link_local_nic..c S s t | dS )Nifindex)cloudnetread_sys_net_int)dr r r @ s z$get_link_local_nic..)key)r&