Skip to content

Instantly share code, notes, and snippets.

@denismakogon
Last active December 23, 2015 22:49
Show Gist options
  • Save denismakogon/6705456 to your computer and use it in GitHub Desktop.
Save denismakogon/6705456 to your computer and use it in GitHub Desktop.
DNS workflow for Trove
1. Trove would only supports Designate, nothing else.
2. Factory methods should be more detailed and not relay already formed objects.
3. Using before formed object is bad way, user could make object with None's in it.
DNS workflow:
Config values: support, factory, driver implementation
Workflow:
1. Check dns support.
2. Check floating ips supoort
3. Reserve/Allocate-and-Reserve floating ip for instance before it gets provisioned.
4. Create domain (or use specific strategy for domain) and map it to Trove DB.
5. Grap, name, domain, ip and create dns record.
Idea with using create_instance_entry(self, instance_id, content) would not work, because, as i said, instance id is UUID, name is better.
And content, terminalogicaly, doesn't mean a set of DNS needed parameters.
So, better to use meaningful paramters to not let user pass some stinky object to workflow.
If you still need that weired 'content' parameter, factory method should provide attrs
check for existance and attr correctness, but it not (i'll add this to the make this review full).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment