JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr fEddlZddlZddlZddlmZddlmZddlmZmZm Z dddZ eje Z ddZd Zdd Zd Zdd Zd Zy)N)dmi)net)subp url_helperutileth0eth1)publicprivatec>|s!t|}tjd||s tddj t j ddt j dd}dd d |d |g}dd d d |dg}tjds td tj|tjd||tj|tjd||S#t$rtjtd||wxYw)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}/16ripaddradddevlinksetupz4No 'ip' command available to configure ip4LL addressz#assigned ip4LL address '%s' to '%s'zbrought device '%s' upzRip4LL address assignment of '%s' to '%s' failed. Droplet networking will be broken) get_link_local_nicLOGdebug RuntimeErrorformatrandomrandintrwhich Exceptionrlogexc)distronicr ip_addr_cmd ip_link_cmds H/usr/lib/python3/dist-packages/cloudinit/sources/helpers/digitalocean.pyassign_ipv4_link_localr&s  ( @#F  8  & &q#q# 6 DeS9KsD9K ::d  B    + 7sC + *C0 J   1     s AC55'DctjDcgc]}|jj|r|!}}|syt |dScc}w)Nc.tj|dS)Nifindex)cloudnetread_sys_net_int)ds r%z$get_link_local_nic..Is8#<#| | d<|j| tjd| | 1|r*tjd||jd|dd|dS)a}Convert the DigitalOcean Network description into Cloud-init's netconfig format. Example JSON: {'public': [ {'mac': '04:01:58:27:7f:01', 'ipv4': {'gateway': '45.55.32.1', 'netmask': '255.255.224.0', 'ip_address': '45.55.50.93'}, 'anchor_ipv4': { 'gateway': '10.17.0.1', 'netmask': '255.255.0.0', 'ip_address': '10.17.0.9'}, 'type': 'public', 'ipv6': {'gateway': '....', 'ip_address': '....', 'cidr': 64}} ], 'private': [ {'mac': '04:01:58:27:7f:02', 'ipv4': {'gateway': '10.132.0.1', 'netmask': '255.255.0.0', 'ip_address': '10.132.75.35'}, 'type': 'private'} ] } cdd|jd|jdd}d|jdvr5dj|jd|jd|d <|S|jd |d <|S) Nstaticauto ip_addressgateway)typecontroladdressr?:z{0}/{1}cidrrBnetmask)getr)pcfgsubparts r%_get_subnet_partz7convert_network_configuration.._get_subnet_partsxx -xx *   $((<( (!*!1!1&(8"GI  "&)!4GI r.znic mapping: %srzconsidering %smacz3Did not find network interface on system with mac 'z'. Cannot apply configuration: r@unknownz6Found %s interface '%s' on '%s', assigned name of '%s'zfFound interface '%s' on '%s', which is not a public or private interface. Using default system naming.physical)r@ mac_addressname)ipv4ipv6 anchor_ipv4 anchor_ipv6Nr anchorr?subnetsznic '%s' configuration: %szadded dns servers: %s nameserver)r@rBr )versionconfig)r*get_interfaces_by_macrrrFrNIC_MAPappend)rW dns_serversrI nic_configs macs_to_nicsnr"rM sysfs_namenic_typeif_namemsgncfgrTnetdef raw_subnetsub_parts r%convert_network_configurationrgcs:"K113LII. 3?Qil "C(ggen l *%  "%%k2 7769-++h 3 j IIH  E  IIc; 3&  D %F.J' 3H8#x6'9Y' NN8 $ %"Y4  .>g3?j );7L[IJK 00r.ctj||||}|jstd|zt j |j jS)N)timeout sec_betweenretrieszunable to read metadata at %s)rreadurlokrjsonloadscontentsdecode)urlrirjrkresponses r% read_metadatartsU!! W+wH ;;=:S@AA ::h''..0 11r.ctjd}|dk7rytjd}|rtjd|d|fSd}tj |t |)Nzsystem-manufacturer DigitalOcean)FNzsystem-serial-numberz8system identified via SMBIOS as DigitalOcean Droplet: %szsystem identified via SMBIOS as a DigitalOcean Droplet, but did not provide an ID. Please file a support ticket at: https://cloud.digitalocean.com/support/tickets/newT)r read_dmi_datarrcriticalr) vendor_name droplet_idrbs r% read_sysinfor{sw ##$9:Kn$""#9:J F   *  A S3r.)N)r|)rnloggingr cloudinitrrr*rrrrY getLogger__name__rr&rr9rgrtr{r.r%rs[   %,, /g!,^LN.k1\2r.