o x[hÈã@s€ddlZddlmZmZmZmZddlmZdddddd d œZd ee ee e fffd d „Z d e fdd„Z d ee fdd„Z dS)éN)ÚAnyÚDictÚOptionalÚUnion)ÚdmiÚallow_local_stageÚallow_init_stageÚ allow_dhcpÚ allow_ipv4Ú allow_ipv6Úpreferred_mac_prefixes)ÚalsÚaisÚdhcpÚv4Úv6ÚpmpÚreturncCsnt d¡}i}|s |St d|¡D]#\}}}|tvr4|dvr%tt|ƒƒ}n |dkr.| d¡}||t|<q|S)zH Parses flags from dmi data and updates self.ds_cfg accordingly zbaseboard-serial-numberz([a-z0-9]+)=(.*?)(;|$)Ú01rú,)rÚ read_dmi_dataÚreÚfindallÚDMI_OVERRIDE_MAPÚboolÚintÚsplit)Ú dmi_flagsÚretÚkeyÚvalueÚ_©r"úB/usr/lib/python3/dist-packages/cloudinit/sources/helpers/akamai.pyÚget_dmi_configs   €r$cCst d¡}|dvS)zo Reads the BIOS vendor from dmi data to determine if we are running in the Akamai Connected Cloud. zsystem-manufacturer)ÚLinodeÚAkamai©rr)Úvendorr"r"r#Ú is_on_akamai(s r)cCs t d¡S)zo Returns the instance id read from dmi data without requiring the metadata service to be reachable zsystem-serial-numberr'r"r"r"r#Úget_local_instance_id1s r*)rÚtypingrrrrÚ cloudinitrrÚstrrr$r)r*r"r"r"r#Ús ú