//lib/python2.7/site-packages/cloudinit/sources/helpers/

OS : Linux

PHP Version : 7.4.33

Software : Apache/2.4.6 (CentOS) PHP/7.4.33

Information System : ó oBú]c@sÄddlZddlZddlmZddlmZddlmZddlmZidd6dd 6Z ej e ƒZ dd „Zd „Zdd „Zd „Zdddd„Zd„ZdS(iÿÿÿÿN(tlog(tnet(t url_helper(tutilteth0tpublicteth1tprivatecCs!|s"tƒ}tjd|ƒn|s7tdƒ‚ndjtjddƒtjddƒƒ}dd d |d |g}dd d d |dg}tjdƒs¯tdƒ‚nyAtj |ƒtjd||ƒtj |ƒtjd|ƒWn*t k rtj td||ƒ‚nX|S(síBring 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. s,selected interface '%s' for reading metadatasPunable to find interfaces to access themeta-data server. This droplet is broken.s169.254.{0}.{1}/16ii¨iiÿtiptaddrtaddtdevtlinktsettups4No 'ip' command available to configure ip4LL addresss#assigned ip4LL address '%s' to '%s'sbrought device '%s' upsRip4LL address assignment of '%s' to '%s' failed. Droplet networking will be broken( tget_link_local_nictLOGtdebugt RuntimeErrortformattrandomtrandintRtwhichtsubpt Exceptiontlogexc(tnicR t ip_addr_cmdt ip_link_cmd((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pytassign_ipv4_link_locals*      cCsKgtjƒD]}tj|ƒr |^q }|s8dSt|dd„ƒS(NtkeycSstj|dƒS(Ntifindex(tcloudnettread_sys_net_int(td((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pyt<s(R tget_devicelistt is_physicaltNonetmin(tftnics((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pyR8s.cCsŠ|stjdƒdStjdƒdddd|g}y!tj|ƒtjd|ƒWn)tk r…}tjtd ||ƒnXdS( szRemove the ip4LL address. While this is not necessary, the ip4LL address is extraneous and confusing to users. sLno link_local address interface defined, skipping link local address cleanupNscleaning up ipv4LL addressRR tflushR sremoved ip4LL addresses from %ss)failed to remove ip4LL address from '%s'.(RRRRRR(RRte((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pytdel_ipv4_link_local?s   cCsýd„}g}tjƒ}tjd|ƒx‰|D]}||d}tjd|ƒ|jdƒ}||krŠtd||fƒ‚n|j|ƒ}|jddƒ} tj| |ƒ} | |kråtjd | ||| ƒnd } tj| ||ƒid d6|d 6| d 6} g} xgdD]_}|j|dƒ}|sJq&n||ƒ}| dksnd|krx|d=n| j|ƒq&W| | d<|j| ƒtjd| | ƒq2W|rëtjd|ƒ|jidd6|d6ƒnidd6|d6S(sÅ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'} ] } cSs‹idd6dd6|jdƒd6|jdƒd6}d|jdƒkrtd j|jdƒ|jd ƒƒ|dt sysfs_nametnic_typetif_nametmsgtncfgREtnetdeft raw_subnettsub_part((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pytconvert_network_configurationTsL             iicCsVtj|d|d|d|ƒ}|jƒs@td|ƒ‚ntj|jjƒƒS(Nttimeoutt sec_betweentretriessunable to read metadata at %s(RtreadurltokRtjsontloadstcontentstdecode(turlRYRZR[tresponse((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pyt read_metadata´s  cCsvtjdƒ}|dkr%tdfStjdƒ}|rMtjd|ƒnd}tj|ƒt|ƒ‚t|fS(Nssystem-manufacturert DigitalOceanssystem-serial-numbers8system identified via SMBIOS as DigitalOcean Droplet: %ss¦system 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/new( Rt read_dmi_datatFalseR&RRtcriticalRtTrue(t vendor_namet droplet_idRS((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pyt read_sysinfo¼s      (R^Rt cloudinitRtloggingRR RRRJt getLoggert__name__RR&RRR,RXRdRl(((sJ/usr/lib/python2.7/site-packages/cloudinit/sources/helpers/digitalocean.pyts   &   `