Skip to content
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 useful fields for Authoritative Zone resource #186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bsmithtm
Copy link

Fixes #185.

This adds the following fields for the ZoneAuth resource, so users can set a Nameserver Group or SOA TTLs when creating a new zone.

  • ns_group
  • restart_if_needed
  • comment
  • soa_default_ttl
  • soa_expire
  • soa_negative_ttl
  • soa_refresh
  • soa_retry

These are already present in the Infoblox NIOS API; this change exposes them here in the Go Client.

Copy link
Collaborator

@hemanthKa677 hemanthKa677 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

object_manager.go Outdated Show resolved Hide resolved
object_manager_zone_auth.go Show resolved Hide resolved
Ref string `json:"_ref,omitempty"`
Fqdn string `json:"fqdn,omitempty"`
View string `json:"view,omitempty"`
NsGroup string `json:"ns_group,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about setting no NS groups for this zone (in UI: 'None' for 'Name Servers')? 'omitempty' option can prevent this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, you mean a case where the end user would like to send empty string "" as the ns_group to explicitly set this field to nothing; if we omit this from marshaling when it is empty, on the Infoblox side it will attempt to set the default NS Group instead. Is that correct?

@bsmithtm
Copy link
Author

Hi @skudriavtsev thanks for the review and feedback! I've made most of the requested changes:

  • Make the case of the parameter names in object_manager consistent (all start lower case now)
  • Add view and zone_format to the ZoneAuth object and applicable functions
  • Make an UpdateZoneAuth() function to allow updating fields that are allowed in the WAPI (this is a request from the PR for the Terraform Provider)

If we can resolve the last question about omitempty on ns_group, I think all requests will be handled. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add useful fields for Authoritative Zone resource
3 participants