New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route53 fully implemented (no more XML blobs in the API) #89
Conversation
Added a simple test file :) |
Thanks for pulling (pun!) this together Mitchell. Pulling it into my local now as I want to start using Route 53. |
Great, if everything looks good and this merge gets in, I have more changes I'd like to make, but since this is my first contribution to this project, I wanted to make sure I did things right before I attempted to add those to a pull request. Specifically, its still a bit clunky to have to create a ChangeBatch in order to create a record, so some simplified helpers on that would be nice. But it can wait until this gets through. Thanks :) |
Before this pull request even appeared, I had already begun implementing this. I'll see what I can do about merging the two versions. |
After looking at this change, it looks like you've made these changes on an older version of the Route53 module. The latest from trunk appears to have all of this functionality, plus some. The only exception is the zoneinfo, which we have not implemented since it comes out in JSON. Mitch has, in the past, expressed reluctance to build objects around things like this since they're just simple dictionary objects which are already easy to manipulate. The only other change is that you use "ChangeBatch" instead of "ResourceRecordSets", where you do:
I have
Other then naming changes, this pull also ignores that you may have multiple values within a single record. This is highly important in cloud-based environments, so I'm going to close this change since these features are already implemented. |
Kopertop, I'm sorry, I may be blind, I've been browsing around the "boto/boto" master branch and I simply can't see where this is already implemented. There are a few things I don't see:
And what do you mean something comes out in JSON? As far as I know, none of the API endpoints return JSON, and my code definitely does not do any JSON parsing, so where is that? Additionally, the Route53 API still returns "python data structures," in place of real models. This is unlike the rest (or majority) of the boto API. I don't want to make an API call to get "get_all_hosted_zone" and get some dict out of it, since there are actual operations on a zone I may want to make, and when I do The only thing that I generally agree with in your response is I ignored the ability to have multiple values for a record, since I didn't see anywhere in the Route 53 documentation to indicate this was even possible. I'm sorry about this. I'm sorry if what I'm saying here is all wrong, I'd just like some clarification, since I have been using boto master branch in production and the route53 module is definitely not sufficient to be a comfortable API to use. Thanks, |
Taking a closer look, I can see how you can get the name servers, and how you can get the change status, but it requires a lot of manually parsing a dict data structure, and is something I feel the model should take care of. So my points I made previously still stand. |
So, given the discussion on boto-users, I think this pull request should be re-opened. Or do we need another one? Does your fork work with the latest route53 code in master? I'd like to get this sorted today, if possible. |
BTW, vagrant is very cool. Nice job with that mitchellh! |
I'll open another pull request today. There are enough improvements/changes made to the code to make up for Chris's points and your points that I'll just get those in. Expect a pull request today. And thanks about Vagrant :) Mitchell |
Where do we stand with this? |
Mitch, Sorry I've been super busy lately from work. I've just been using my local lib up to this point but I still completely plan on integrating it with boto. I'm still working on the pull request. Mitchell |
Cool. Just wanted to make sure you weren't waiting on me. |
Hi!
I've implemented a complete set of objects for Route53. The previous API was complete but only allowed for creating and modify records using raw XML blobs, which was a bit rough. I was careful to follow the style of the rest of the codebase and API-style of the rest of the library, but please let me know if I messed up anywhere. Additionally it is all fully documented. :)
Some example usage is shown below (omitting imports for brevity):
I use Route53 heavily and manually creating XML blobs was just not fun for me. I hope this helps!
Please let me know if I got anything wrong, I did my best to maintain previous code style and interfacing. I also documented the new classes.
Best,
Mitchell