2
# vi: syntax=python ts=4
5
# return a list of mime-types that are handled by this module
6
return(["text/plain", "text/go-cubs-go"])
8
def handle_part(data,ctype,filename,payload):
9
# data: the cloudinit object
10
# ctype: '__begin__', '__end__', or the specific mime-type of the part
11
# filename: the filename for the part, or dynamically generated part if
12
# no filename is given attribute is present
13
# payload: the content of the part (empty for begin or end)
14
if ctype == "__begin__":
15
print "my handler is beginning"
17
if ctype == "__end__":
18
print "my handler is ending"
21
print "==== received ctype=%s filename=%s ====" % (ctype,filename)
23
print "==== end ctype=%s filename=%s" % (ctype, filename)