ó 'KXc@sœddlZddlZddlmZmZmZddlmZddlmZ ddlm Z ddlm Z e j e ƒZdZdZd Zd ZeegZd gZd Zd Zi dd6dd6dd6dd6dd6d d6dd6dd6dd6Zeeejƒƒdd „ƒZd!efd"„ƒYZd#„Zd$„Zd%„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-jsonptkeycCsdt|ƒS(Ni(tlen(te((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pytFstHandlercBsJeZejZdd„Zd„Zejd„ƒZejd„ƒZ RS(icCs||_||_dS(N(thandler_versiont frequency(tselfRtversion((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt__init__Ls cCsdtj|ƒ|jƒfS(Ns%s: [%s](Rtobj_namet list_types(R((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt__repr__PscCs tƒ‚dS(N(tNotImplementedError(R((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyRSscOs tƒ‚dS(N(R(Rtargstkwargs((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt handle_partWs( t__name__t __module__tabctABCMetat __metaclass__RRtabstractmethodRR(((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyR Is    c CsL|j}|tkp*|tko*|tks1dSy|j}t|ƒ}Wn tttfk rld}nX|d}y¨tj d|||||ƒ|dkrÁ|j ||||||ƒn]|dkré|j |||||ƒn5|dkr|j ||||ƒntd|ƒ‚Wn&t 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 ValueErrortAttributeErrortLOGtdebugRRtlogexc( tmodtdatatfilenametpayloadRtheaderstmod_freqtmod_vert content_type((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pytrun_part\s4            cCs*itd6}t||dd||ƒdS(Ns Content-Type(t CONTENT_STARTR/tNone(R'R(RR+((sH/opt/freeware/lib/python2.7/site-packages/cloudinit/handlers/__init__.pyt call_begin~s cCs*itd6}t||dd||ƒdS(Ns Content-Type(t CONTENT_ENDR/R1(R'R(RR+((sH/opt/freeware/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 |dsL       "