<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/doc/examples/part-handler.txt, branch circinus-public-unmaintained</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=circinus-public-unmaintained'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-03-08T18:13:37+00:00</updated>
<entry>
<title>Remove the vi comment from the part-handler example (#835)</title>
<updated>2021-03-08T18:13:37+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2021-03-08T18:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6fe99157876f83ae2249d44c1b456a24cc70e258'/>
<id>urn:sha1:6fe99157876f83ae2249d44c1b456a24cc70e258</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add better comments to the part-handler example</title>
<updated>2010-07-21T14:06:34+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2010-07-21T14:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1dfeedecd8018705cd43e35afa1b767372d6b8cd'/>
<id>urn:sha1:1dfeedecd8018705cd43e35afa1b767372d6b8cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add the part-handler plugin</title>
<updated>2010-01-28T22:16:11+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2010-01-28T22:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=e6e30d8c8f72b904b34e93d2b9c4aef39b965b59'/>
<id>urn:sha1:e6e30d8c8f72b904b34e93d2b9c4aef39b965b59</id>
<content type='text'>
If a part of a multipart file is 'text/part-handler' then it is 
expected to be python code that implements 2 methods

- list_types()
  list the types that this part-handler supports, return
  a list.  ie: return(['text/plain'])

- handle_parts(data,ctype,filename,payload)
  this method will be called:
     once, when loaded, with ctype == '__begin__'
     once per part
     once, at the end, with ctype == '__end__'

   - ctype is the content type ('text/plain')
   - filename is the filename portion of the mime data
   - payload is the content of the part
   - data is currently the cloud object, but this could change
</content>
</entry>
</feed>
