-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow TXT records #142
Merged
Merged
Allow TXT records #142
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
23551a5
Output TXT records in pj2zones
creideiki 9fdb1af
Raise RuboCop metrics limits exceeded by pj2zones
creideiki 9266f2c
Add TXT records and documentation to example warehouse
creideiki 03de584
Allow omitting label for domain-attached TXT records
creideiki 664eea4
Raise more RuboCop metrics limits exceeded by pj2zones
creideiki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,15 @@ def process_forward_zone(domain) | |
end | ||
end | ||
|
||
if domain['net.dns.txt'] | ||
domain['net.dns.txt'].each do |record| | ||
txt = DNS::Zone::RR::TXT.new | ||
txt.label = record['label'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
txt.text = record['text'] | ||
zone.records << txt | ||
end | ||
end | ||
|
||
domain.children(kind: 'ipv4_interface') do |interface| | ||
a = DNS::Zone::RR::A.new | ||
a.label = interface['net.dns.name'] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Repeating the domain FQDN as label is not DRY, i think we should use explicit YAML
~
or leave the label unspecified to specify a "null" label.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.
A
~
shows up as an empty string (which is probably yet another part of #135), but leaving the label unspecified works.