ó oBú]c@sÁddlZddlZddlZddlmZmZmZddlmZddlm Z ddlm Z ddlm Z e j eƒZdZdZd Zd ZeegZd gZd Zd Zi dd6dd6dd6dd6dd6d d6dd6dd6dd6dd 6Zeeejƒƒd!d"„ƒZejejƒd#efd$„ƒYƒZ d%„Z!d&„Z"d'„Z#d(„Z$d)„Z%d*„Z&d+„Z'd,„Z(ed-„Z)dd.„Z+dS(/iÿÿÿÿN(t PER_ALWAYSt PER_INSTANCEt FREQUENCIES(timporter(tlog(t type_utils(tutilstext/x-not-multipartsapplication/octet-streamt__end__t __begin__stext/part-handlerspart-handler-%03ds part-%03dstext/x-include-urls#includestext/x-include-once-urls #include-oncestext/x-shellscripts#!stext/cloud-configs #cloud-configstext/upstart-jobs #upstart-jobs #part-handlerstext/cloud-boothooks#cloud-boothookstext/cloud-config-archives#cloud-config-archivestext/cloud-config-jsonps#cloud-config-jsonps text/jinja2s## template: jinjatkeycCsdt|ƒS(Ni(tlen(te((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt<stHandlercBs8eZdd„Zd„Zd„Zejd„ƒZRS(icCs||_||_dS(N(thandler_versiont frequency(tselfRtversion((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt__init__Bs cCsdtj|ƒ|jƒfS(Ns%s: [%s](Rtobj_namet list_types(R((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt__repr__FscCsFt|dƒstdƒ‚n$gt|dƒD]}t|^q.SdS(Ntprefixess#Missing prefixes subclass attribute(thasattrtNotImplementedErrortgetattrtINCLUSION_TYPES_MAP(Rtprefix((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyRIscOs tƒ‚dS(N(R(Rtargstkwargs((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt handle_partQs(t__name__t __module__RRRtabctabstractmethodR(((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyR ?s   c CsV|j}|tkp*|tko*|tks1dSy|j}t|ƒ}Wn tttfk rld}nX|d}y¨tj d|||||ƒ|dkrÁ|j ||||||ƒn]|dkré|j |||||ƒn5|dkr|j ||||ƒntd|ƒ‚Wn0t k rQt j td|||||ƒnXdS(Nis Content-Types1Calling handler %s (%s, %s, %s) with frequency %siisUnknown module version %ss8Failed calling handler %s (%s, %s, %s) with frequency %s(RRRRtintt TypeErrort ValueErrortAttributeErrortLOGtdebugRt ExceptionRtlogexc( tmodtdatatfilenametpayloadRtheaderstmod_freqtmod_vert content_type((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pytrun_partVs4             cCs*itd6}t||dd||ƒdS(Ns Content-Type(t CONTENT_STARTR3tNone(R+R,RR/((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt call_beginxs cCs*itd6}t||dd||ƒdS(Ns Content-Type(t CONTENT_ENDR3R5(R+R,RR/((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pytcall_end€s c Csð|d}t|}|d}tjj|dd|ƒ}|jdƒsWd|}ntj||dƒ|d}yNttj |ƒƒ} t | |d |ƒ|j | d t ƒ|d |dRQtcloudinit.settingsRRRt cloudinitRRtloggingRRt getLoggerRR'RcRkR7R4tCONTENT_SIGNALSRbR=RmRtsortedtlisttkeysR{t add_metaclasstABCMetatobjectR R3R6R8RMRYR_RfRhRCR5R(((s?/usr/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt sR        "