[12:37] <holser_> smoser: Hi
[15:05] <smoser> holser_, hey.
[15:06] <holser_> I’ve submitted 2 reviews for mcollective https://code.launchpad.net/~sgolovatiuk
[15:06] <holser_> smoser: your feedback is welcomed
[15:10] <smoser> six doesn't cover BytesIO ?
[15:11] <smoser> holser_,
[15:11] <smoser> $ for p in python2 python3; do echo $p; $p -c 'from six import BytesIO; print(BytesIO)'; done
[15:11] <smoser> python2
[15:11] <smoser> StringIO.StringIO
[15:11] <smoser> python3
[15:11] <smoser> <class '_io.BytesIO'>
[15:11] <smoser> smoser@milhouse:~/src/cirros/trunk$
[15:11] <smoser> seems to work
[15:11] <smoser> but i'm guessin gyou tried that
[15:12] <holser_> yeah I tried
[15:12] <smoser> must be older version of six
[15:12] <smoser> that you have
[15:12] <smoser> what a pita
[15:12] <holser_> I use the default version in 16.04
[15:12] <smoser> its got to be in there.
[15:12] <holser_> fresh 16.04
[15:12] <holser_> anyway, I gave the exact steps in bug
[15:13] <holser_> so you can try them with your six
[15:14] <smoser> python3 on 16.04 most certainly can do: from six import BytesIO
[15:14] <holser_> I can do that way
[15:14] <holser_> without try:
[15:14] <holser_> just from six import BytesIO
[15:16] <smoser> see if that works on python2 though
[15:16] <smoser> its posisble configobj in python2 will not like that it gets bytes
[15:17] <waldi> possible. why do you want that?
[15:18] <smoser> why do i want python2?
[15:18] <waldi> wait. python2 does not have bytes
[15:18] <smoser> well, some pytho2 do
[15:18] <waldi> >>> bytes
[15:18] <waldi> <type 'str'>
[15:18] <waldi> so no, no bytes, only str
[15:18] <smoser> right. ok.
[15:19] <smoser> could you add unit test for this ?
[15:19] <smoser> you can rip the section out of 'handle' that does:
[15:19] <smoser>  if 'conf' in mcollective_cfg:
[15:19] <smoser>  ....
[15:20] <smoser> and just put that in a fuction that has 2 inputs.
[15:20] <smoser>  config and output file
[15:20] <smoser> then unit test that the file gets what you expected
[15:20] <smoser> or even that just returns a string (which you can pass to util.write_file())
[15:23] <smoser> i think if you re-factor that code a bit, it will be more easy for you do do the other mp too.
[15:23] <smoser> oh. i see that the method i mentioned would have other htings too PUBCERT_FILE, and such.
[19:11] <Wulf> Hoping to get a more satisfying answer today:  I'm using cloud-init on aws ec2. I've seen in the source code, that retrieving ec2 meta data is supported. I would like to access the meta data from a userdata script written in python. Is it possible to access it without having to reinvent the wheel?
[19:17] <smoser> Wulf,
[19:17] <smoser>  from cloudinit import ec2_utils
[19:17] <smoser> ec2_utils.get_instance_metadata()
[19:18] <Wulf> smoser: and that is considered a public interface?
[19:19] <smoser> that will work for 14.04 and 16.04
[19:19] <Wulf> Good enough for me, thank you!
[19:19] <Wulf> Now I only need to find out why I'm getting wrong data from AWS :-)
[19:25] <Wulf> Odd_Bloke: and thanks to you too
[22:37] <harlowja> btw, how far along is the networkd stuff for supporting systems?
[22:39] <holser_> smoser: I’ve updated review, added unit test
[22:45] <copumpkin> does cloud-init ignore everything before #cloud-config in ec2 userdata?
[22:45] <copumpkin> I see a lot of people describe it as #cloud-config needs to be on the first line
[23:37] <harlowja> arg, why do when i go to rebuild a cloud-init rpm and look at what redhat rpm has in it do i always find little surprises that never seemed toget upstreamed
[23:38] <harlowja> (where surprises == patches)