Support NodeBalancer API #7

Closed
rata opened this Issue May 28, 2012 · 5 comments

Projects

None yet

2 participants

@rata
rata commented May 28, 2012

Hi!

As far as I see, there is no support to NodeBalancer actions. Are you planning to add support for it in the near future or willing to accept patches for it ? =)

Thanks a lot,
Rodrigo

@tjfontaine
Owner

FWIW the api currently handles unknown methods just fine, so you could call api.nodebalancer_create and things would work as expected. However there's no method documentation or required argument verification for such calls.

I plan to add nodebalancer methods, and also a mechanism to check with the api of the api to handle unknown methods more sanely. There just isn't an ETA of when that will happen.

I will of course happily review any patches or pull requests. Though, I'm more in mind to have a script to auto-generate the bindings than to continue to maintain methods manually.

@rata
rata commented May 30, 2012

Yeah, I started playing today and realised that "it just works". Great! :-D

Also, been looking at the code and it seems it should be scriptable as you say to me too, at least api.py (the one I was looking). I might give it a try later on. But there's no single file containing the API actions and required arguments that Linode updates, right ? Or I just didn't find it ?

Also, one silly question. The code says it is for Linode API v2, although current one is v3 1. And the URL seems a bit different on 1 too: https://api.linode.com/ instead of https://api.linode.com/api/ (note the missing "/api/" at the end). Also, I didn't see the "api_responseFormat" parameter on Linode documentation. Perhaps this uses Linode API v2, which is currently available, and has been dropped on Linode API v3 ? Or have you verified with Linode that it is correct to use all this (the slightly different URL and that parameter) ?

Thanks a lot!

Rodrigo

@rata
rata commented May 30, 2012

Sorry, ignore the "api_responseFormat", I've just seen it :S (this happens when I do a lot of things at the same time :-D)

@tjfontaine
Owner

Right, responseFormat better still be there.

https://api.linode.com/?api_key=abc123&api_action=test.echo&foo=bar is the canonical way to access the api, only the documentation site is under http://www.linode.com/api/

As far as building the bindings with a script the ideal mechanism would be utilizing http://www.linode.com/api/utility/api.spec

The version is still at 2 because it hasn't been updated in a while to match, and there hasn't been a significant change in the behavior on the consumer end. There was a complete rewrite of the api by Linode between v1 and v2.

@rata
rata commented May 30, 2012

So, a simple patch changing the LINODE_API_URL to https://api.linode.com/ is correct, right ? Do you want me to send it or you do it yourself ? (I've just tested it and the API seems to work okay too)

Cool, it sounds nice to create them automatically with that api method. Didn't know about it. If I have time will look into it during the weekend :-)

Ohh, is good to know it is not updated. If something fails (not the case yet), I'll consider this possibility :-)

Thanks a lot!

Rodrigo

@rtucker rtucker closed this in #11 May 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment