ó oBú]c @s†ddlZddlZddlmZddlmZddlmZddlm Z ddlm Z ddlm Z ej e ƒZdZied 6Zd5Zd ZdZidd6Zdefd„ƒYZde jfd„ƒYZd„Zd„Zdd„Zded„Zd„Zee j e j!ffgZ"d„Z#e dkr‚ddl$Z$ddl%Z%ddlm&Z&e$j'ddƒZ(e(j)dd d!d"d#d$eƒe(j)d%d&d'd"d(d)d*d$eƒe(j*ƒZ+ed+e+j,d'e+j-ƒZ.d,e.kr_ye.d,j/ƒe.d,§st:iit cloudinit(tallRLtlenRptappend(RFR(t public_keysRitsplit_public_keytuserRI((sC/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceGCE.pyREžs  c Cs5|dkrt}nidd6dd6td6dd6}tƒ|d<|rc|d rcd|d<|Stj|ƒs”tjd|ƒd||d<|Sd d"tttfd d#tttfd d$tttfdd%tttfdd&tttfg}t |ƒ}i}x’|D]Š\}}}} } d} x8|D]0} |j | | | ƒ} | dk r/| } q/q/W|r| dkrd}|||d<|S| ||(R8tplatform_checkRAturl_maptmetadata_fetchertmdtmkeyR3trequiredRRRRt new_valueRt instance_datat project_datat valid_keyst block_projectRIRFtudtencoding((sC/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceGCE.pyR=²sh        (      cCsdtjdƒpd}|dkr%tStjdƒp7d}|jdƒrMtStjd||ƒtS(Nssystem-product-namesN/AsGoogle Compute Enginessystem-serial-numbers GoogleCloud-s6Not running on google cloud. product-name=%s serial=%s(Rt read_dmi_dataR@t startswithRRR#(tpnametserial((sC/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceGCE.pyR:ús   cCstj|tƒS(N(Rtlist_from_dependst datasources(tdepends((sC/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceGCE.pytget_datasource_listst__main__(t b64encodet descriptionsQuery GCE Metadata Services --endpointtmetavartURLthelps The url of the metadata service.tdefaults--no-platform-checktdestR‡sIgnore smbios platform checktactiont store_falseR8s user-datas/User-data cannot be decoded. Writing as base64 s user-data-b64tindentit sort_keyst separatorst,s: (s instance-idsavailability-zoneslocal-hostname(R©s: (4RfRdR€Rtcloudinit.distrosRRuRtloggingRRRt getLoggerR!RRR/tREQUIRED_FIELDSR[R\RtobjectR R'R$RHRpRRER@R=R:tDEP_FILESYSTEMt DEP_NETWORKR™R›targparsetsysRtArgumentParsertparsert add_argumentt parse_argstargstendpointR‡RWRtUnicodeDecodeErrortstderrtwritetdumps(((sC/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceGCE.pytsX    < " H         !