{"action":"created","issue":{"url":"https://api.github.com/repos/digitalocean/netbox/issues/398","repository_url":"https://api.github.com/repos/digitalocean/netbox","labels_url":"https://api.github.com/repos/digitalocean/netbox/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/digitalocean/netbox/issues/398/comments","events_url":"https://api.github.com/repos/digitalocean/netbox/issues/398/events","html_url":"https://github.com/digitalocean/netbox/pull/398","id":168129717,"number":398,"title":"Fix #166 : DNS Support","user":{"login":"rdujardin","id":12211070,"avatar_url":"https://avatars.githubusercontent.com/u/12211070?v=3","gravatar_id":"","url":"https://api.github.com/users/rdujardin","html_url":"https://github.com/rdujardin","followers_url":"https://api.github.com/users/rdujardin/followers","following_url":"https://api.github.com/users/rdujardin/following{/other_user}","gists_url":"https://api.github.com/users/rdujardin/gists{/gist_id}","starred_url":"https://api.github.com/users/rdujardin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdujardin/subscriptions","organizations_url":"https://api.github.com/users/rdujardin/orgs","repos_url":"https://api.github.com/users/rdujardin/repos","events_url":"https://api.github.com/users/rdujardin/events{/privacy}","received_events_url":"https://api.github.com/users/rdujardin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/digitalocean/netbox/labels/pr/hold","name":"pr/hold","color":"b60205"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-28T15:47:15Z","updated_at":"2016-10-09T14:30:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/digitalocean/netbox/pulls/398","html_url":"https://github.com/digitalocean/netbox/pull/398","diff_url":"https://github.com/digitalocean/netbox/pull/398.diff","patch_url":"https://github.com/digitalocean/netbox/pull/398.patch"},"body":"Hello,\r\n\r\nI created a new DNS application, with its own menu and its two new objects Zone and Record. It handles DNS and Reverse DNS. It's essentially things added, but there are some modifications in IPAM too, in order to handle reverse DNS : I added an optional PTR field to IPAddress, and several optional fields to Prefix : ttl, soa_name, soa_contact, soa_serial, soa_refresh, soa_retry, soa_expire and soa_minimum, and I added a function to_bind() for reverse DNS exporting, and some triggers to update serials automatically.\r\n\r\nIt seems my fork isn't passing the build test, but when I forked the develop branch wasn't either, and I checked that errors didn't come from my code. So if you merge, no problem is expected as develop branch is now passing.\r\n\r\nI have described my work in the issue #166 , and here is the doc page I wrote for the application : \r\n\r\n# Zones\r\n\r\nA zone corresponds to a zone file in a DNS server, it stores the SOA (Start Of Authority) record and other records that are stored as Record objects.\r\n\r\nZone objects handle only forward DNS, reverse DNS is handled by Prefixes (in IPAM section), which also store a SOA record.\r\n\r\nNetbox provides two views in the DNS menu to get the exports in BIND format, which is compatible with every DNS server, directly or by import. Those\r\nexports are also accessible as JSON through the REST API. One of these views is the export of all the forward zones in the database,\r\nthe second is the export of all the reverse zones.\r\n\r\nThe reverse zones are correctly merged and/or divided to meet the requirements of a DNS server (for instance, IPv4 reverse zones must be /16 or /24), and\r\nnot to duplicate records (for instance if you have in database the prefixes 192.168.0.0/16 and 192.168.1.0/24, only the biggest will be exported) ; however,\r\nonly IP addresses which are in an active prefix will be taken into account. Obviously, reverse DNS is supported for both IPv4 and IPv6.\r\n\r\nThe SOA Serial field is not editable : it's automatically created and managed by Netbox. Each time a zone (forward or reverse) is exported,\r\nif there are changes since the last export or if it's the first export, the serial will be incremented. It's in the following format :\r\nYYYYMMDDNN with Y the year, M the month, D the day and N a two-digit counter.\r\n\r\nAs zones and their BIND exports are readable through the REST API, it is possible to write some external script to automatically update\r\nyour DNS server configuration from Netbox's database.\r\n\r\n---\r\n\r\n# Record\r\n\r\nEach Record object represents a DNS record, i.e. a link between a hostname and a resource, which can be either an IP address or a text value,\r\nfor instance another name if the record is of CNAME type.\r\n\r\nRecords must be linked to an existing zone, and hold either an IP address link or a text value. The \"Address\" field points to an IP address\r\nin database, but if you want to put an IP in your record but not in your database (if you don't own the IP for instance), it's possible\r\nby putting the IP as text value instead.\r\n\r\nYou can create, edit or import records with IPs not existing yet in the database. They will be automatically created (but not the prefixes !).\r\nHowever, the zones must be created first, they won't be so automatically.\r\n\r\nReverse DNS is not supported by Record objects, but by the \"PTR\" field in IP addresses. If this field is modified and not empty, a corresponding\r\nA/AAAA record is automatically created if the corresponding zone is found in the database. Be careful, if there was A/AAAA records\r\nfor the old PTR value, they are not deleted.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/digitalocean/netbox/issues/comments/252489689","html_url":"https://github.com/digitalocean/netbox/pull/398#issuecomment-252489689","issue_url":"https://api.github.com/repos/digitalocean/netbox/issues/398","id":252489689,"user":{"login":"marc-us","id":1804654,"avatar_url":"https://avatars.githubusercontent.com/u/1804654?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-us","html_url":"https://github.com/marc-us","followers_url":"https://api.github.com/users/marc-us/followers","following_url":"https://api.github.com/users/marc-us/following{/other_user}","gists_url":"https://api.github.com/users/marc-us/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-us/subscriptions","organizations_url":"https://api.github.com/users/marc-us/orgs","repos_url":"https://api.github.com/users/marc-us/repos","events_url":"https://api.github.com/users/marc-us/events{/privacy}","received_events_url":"https://api.github.com/users/marc-us/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T14:30:47Z","updated_at":"2016-10-09T14:30:47Z","body":"Please merge this into master. It is a necessary feature."}}
{"actor":{"display_login":"marc-us"}}