-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add 'domains' endpoint request. #74
Conversation
01f2c2a
to
5451089
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally good. A few header comment issues.
I'd like a second opinion for @jameinel about the int vs. *int issue.
domain.go
Outdated
name string | ||
} | ||
|
||
// implements Domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commend should start with the name of the function.
domain.go
Outdated
|
||
// ttl live is going to be the zero value if it is null. Thus the time | ||
// to live will be zero. Would rather user's check for zero or for nil? | ||
ttl, _ := valid["ttl"].(int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if we should just mirror the MAAS behaviour and have *int.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, TTL = 0 has a valid meaning in DNS (it means don't cache) rather than no TTL meaning use the default value for caching.
I don't think Juju is using the TTL right now, but we should track the data correctly.
domain.go
Outdated
@@ -0,0 +1,83 @@ | |||
// Copyright 2018 Canonical Ltd. | |||
// Licensed under the AGPLv3, see LICENCE file for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGPL
domain_test.go
Outdated
@@ -0,0 +1,46 @@ | |||
// Copyright 2016 Canonical Ltd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside from TTL, everything looks good (beyond Tim's comments on some of the copyright headers)
domain.go
Outdated
|
||
// ttl live is going to be the zero value if it is null. Thus the time | ||
// to live will be zero. Would rather user's check for zero or for nil? | ||
ttl, _ := valid["ttl"].(int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, TTL = 0 has a valid meaning in DNS (it means don't cache) rather than no TTL meaning use the default value for caching.
I don't think Juju is using the TTL right now, but we should track the data correctly.
|
This PR adds
MAAS 2.0
'sDomains
endpoint. The only thing one can do with aDomain
right now is query its name since this is allJuju
wants from it thus far.