Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-06 Thread Joshua Harlow
Instead of using requests directly can u use the nice helper we provide via url_helper. That should save you from recreating some of the same code. -- https://code.launchpad.net/~jablonskis/cloud-init/add-gce-datasource/+merge/204464 Your team cloud init development team is requested to review th

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-06 Thread Vaidas Jablonskis
Sure. I will use the helper. Another question I have is about user-data. GCE does not have such metadata item, instead every metadata item is the same. Should I still assume that people create user-data metadata item and put cloud-config data inside? --- Vaidas On 7 Feb 2014 01:45, "Joshua Harlow

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-07 Thread Vaidas Jablonskis
Just to let you know, I pushed suggested changes, could you please review it and let me know if any issues. Thanks. On 7 February 2014 01:45, Joshua Harlow wrote: > Instead of using requests directly can u use the nice helper we provide > via url_helper. That should save you from recreating som

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-08 Thread Joshua Harlow
Seems ok, one change. resp = url_helper.readurl(url=url_map[mkey], headers=headers) Can u wrap this with a try: except IOError: block. Thanks -- https://code.launchpad.net/~jablonskis/cloud-init/add-gce-datasource/+merge/204464 Your team cloud init development team is requested to review the pr

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-08 Thread Vaidas Jablonskis
Yep. I will push my changes tonight. Thanks! On 8 February 2014 20:35, Joshua Harlow wrote: > Seems ok, one change. > > resp = url_helper.readurl(url=url_map[mkey], headers=headers) > > Can u wrap this with a try: except IOError: block. > > Thanks > -- > > https://code.launchpad.net/~jablonskis

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-08 Thread Vaidas Jablonskis
Just to let you know, I have pushed the suggested changes already. On 8 February 2014 20:39, Vaidas Jablonskis wrote: > Yep. I will push my changes tonight. Thanks! > > > On 8 February 2014 20:35, Joshua Harlow wrote: > > > Seems ok, one change. > > > > resp = url_helper.readurl(url=url_map[mk

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-08 Thread Joshua Harlow
Thanks, Can we also have some tests :) U should be able to use httpretty to simulate the gce datasource like is being used in: https://code.launchpad.net/~harlowja/cloud-init/ds-openstack/+merge/204390 (search for 'test_openstack.py' and for '_register_uris' for the mocking part). -- https:

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-08 Thread Vaidas Jablonskis
I will work on that. Thanks for the guidance! On 8 February 2014 21:19, Joshua Harlow wrote: > Thanks, > > Can we also have some tests :) > > U should be able to use httpretty to simulate the gce datasource like is > being used in: > > https://code.launchpad.net/~harlowja/cloud-init/ds-openstac

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-10 Thread Scott Moser
Vaidas, Hi, and thanks for the merge proposal. Some things I see: * https://launchpad.net/bugs/1040200 raised that 'instance-data' in ec2 datasource, should be 'instance-data.' so that dns lookups cannot be affected by dns search path insertion attack. ie, we want: http://metadata./compute

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-10 Thread Vaidas Jablonskis
Thanks Scott for your feedback. Great, I will implement your suggestion and will update my branch. Thanks, Vaidas On 10 February 2014 21:25, Scott Moser wrote: > Vaidas, > Hi, and thanks for the merge proposal. > > Some things I see: > * https://launchpad.net/bugs/1040200 raised that 'insta

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-12 Thread Scott Moser
OK, for reference: === gce == $ host metadata. Host metadata. not found: 3(NXDOMAIN) $ host metadata metadata.google.internal has address 169.254.169.254 Host metadata.google.internal not found: 3(NXDOMAIN) Host metadata.google.internal not found: 3(NXDOMAIN) $ host metadata.google.internal. metad

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-12 Thread Scott Moser
Vaidas, I just proposed a merge into this branch at https://code.launchpad.net/~smoser/cloud-init/add-gce-datasource/+merge/206070 . That seems reasonable to me on how to configure the metadata_url and get out early if there i sno datasource. So the 2 things we're waiting on are: a.) tests

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-12 Thread Vaidas Jablonskis
Cool, I'll look into your changes. I am almost done with mine actually. Got tests, better handling of non-existing metadata endpoints and metadata vs IP address issue is solved. I will try to incorporate your changes/suggestion and will update my branch. Thanks a lot for your help! On 13 Februar

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-13 Thread Scott Moser
OK. I just merged this into trunk. I did some little changes, hopefully not breaking anything. I still expect some tests on this, and any other clenaups you can do, but I wanted to get it pulled in. Just do additional changes as another merge proposal. Thank you very much Vaidas. -- https

Re: [Cloud-init-dev] [Merge] lp:~jablonskis/cloud-init/add-gce-datasource into lp:cloud-init

2014-02-13 Thread Vaidas Jablonskis
Sounds great. Thanks for helping me out with this, especially the Python bit (I am still learning it..) On 13 February 2014 16:03, Scott Moser wrote: > OK. I just merged this into trunk. > > I did some little changes, hopefully not breaking anything. > > I still expect some tests on this, and