Added YANG module for DNS zone state data

parent d6434132
module dns-zones-state {
yang-version "1.1";
namespace "http://www.nic.cz/ns/yang/dns-zones-state";
prefix "dnszs";
/* Imports */
import ietf-inet-types {
prefix "inet";
}
import iana-dns-parameters {
prefix "ianadns";
}
import dns-zone-common {
prefix "dnszc";
}
/* Metadata */
organization
"CZ.NIC, z. s. p. o.";
contact
"Editor:   Ladislav Lhotka
          <mailto:lhotka@nic.cz>";
description
"This module defines a DNS zone content as state data.";
reference
"RFC 1035: Domain Names - Implementation and Specification.";
revision 2017-01-12 {
description
"Initial revision.";
}
/* State data */
list zone {
key "name class";
config "false";
description
"Data for a DNS zone.";
leaf name {
type inet:domain-name;
description
"Zone name.";
}
leaf class {
type ianadns:class;
description
"RR Class";
}
list rrset {
key "owner type";
description
"RRSet";
uses dnszc:common-rr-data;
uses dnszc:rrsig-data {
refine "RRSIG" {
presence "Signed RRSet";
}
}
list rdata {
uses dnszc:rdata-fields {
refine "rdata-content" {
mandatory "true";
}
refine "rdata-content/SOA/SOA" {
must "derived-from-or-self(../../type, 'ianadns:SOA')";
}
refine "rdata-content/A/A" {
must "derived-from-or-self(../../type, 'ianadns:A')";
}
refine "rdata-content/CNAME/CNAME" {
must
"derived-from-or-self(../../type, 'ianadns:CNAME')";
}
refine "rdata-content/HINFO/HINFO" {
must
"derived-from-or-self(../../type, 'ianadns:HINFO')";
}
refine "rdata-content/MB/MB" {
must "derived-from-or-self(../../type, 'ianadns:MB')";
}
refine "rdata-content/MD/MD" {
must "derived-from-or-self(../../type, 'ianadns:MD')";
}
refine "rdata-content/MF/MF" {
must "derived-from-or-self(../../type, 'ianadns:MF')";
}
refine "rdata-content/MG/MG" {
must "derived-from-or-self(../../type, 'ianadns:MG')";
}
refine "rdata-content/MINFO/MINFO" {
must
"derived-from-or-self(../../type, 'ianadns:MINFO')";
}
refine "rdata-content/MR/MR" {
must "derived-from-or-self(../../type, 'ianadns:MR')";
}
refine "rdata-content/MX/MX" {
must "derived-from-or-self(../../type, 'ianadns:MX')";
}
refine "rdata-content/NS/NS" {
must "derived-from-or-self(../../type, 'ianadns:NS')";
}
refine "rdata-content/NULL/NULL" {
must "derived-from-or-self(../../type, 'ianadns:NULL')";
}
refine "rdata-content/PTR/PTR" {
must "derived-from-or-self(../../type, 'ianadns:PTR')";
}
refine "rdata-content/TXT/TXT" {
must "derived-from-or-self(../../type, 'ianadns:TXT')";
}
refine "rdata-content/WKS/WKS" {
must "derived-from-or-self(../../type, 'ianadns:WKS')";
}
refine "rdata-content/AAAA/AAAA" {
must "derived-from-or-self(../../type, 'ianadns:AAAA')";
}
refine "rdata-content/DNSKEY/DNSKEY" {
must
"derived-from-or-self(../../type, 'ianadns:DNSKEY')";
}
refine "rdata-content/NSEC/NSEC" {
must "derived-from-or-self(../../type, 'ianadns:NSEC')";
}
refine "rdata-content/DS/DS" {
must "derived-from-or-self(../../type, 'ianadns:DS')";
}
refine "rdata-content/NSEC3/NSEC3" {
must
"derived-from-or-self(../../type, 'ianadns:NSEC3')";
}
refine "rdata-content/NSEC3PARAM/NSEC3PARAM" {
must "derived-from-or-self(../../type, "
+ "'ianadns:NSEC3PARAM')";
}
refine "rdata-content/TLSA/TLSA" {
must "derived-from-or-self(../../type, 'ianadns:TLSA')";
}
refine "rdata-content/IPSECKEY/IPSECKEY" {
must "derived-from-or-self(../../type, "
+ "'ianadns:IPSECKEY')";
}
refine "rdata-content/DNAME/DNAME" {
must
"derived-from-or-self(../../type, 'ianadns:DNAME')";
}
refine "rdata-content/SSHFP/SSHFP" {
must
"derived-from-or-self(../../type, 'ianadns:SSHFP')";
}
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment