summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/kea-dhcp-ddns@2022-07-27.yang
blob: bafa6a3de12957525d53dd7d98f6b86741cadec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
module kea-dhcp-ddns {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:kea-dhcp-ddns";
  prefix "kea-dhcp-ddns";

  import ietf-inet-types {
    prefix inet;
  }
  import kea-types {
    prefix kea;
    revision-date 2019-08-12;
  }

  organization "Internet Systems Consortium";
  contact "kea-dev@lists.isc.org";
  description "This model defines a YANG data model that can be
    used to configure and manage a Kea DHCP-DDNS server.";

  revision 2022-07-27 {
    description "Added GSS-TSIG key-name configration parameter for DNS
                 servers";
  }

  revision 2019-08-12 {
    description "Initial revision";
    reference "";
  }

  /*
  * Groupings
  */

  grouping managed-domains {
    description "Contains parameters for forward or reverse DDNS managed
      domains.";

    container ddns-domains {
      description "DDNS domains.";
      list ddns-domain {
        key name;
        description "List of DDNS domains.";
        leaf name {
          type string;
          mandatory true;
          description "DDNS domain name.";
        }
        leaf key-name {
          type string;
          description "TSIG key to use. Blank means no TSIG.";
        }
        container dns-servers {
          description "DNS servers.";
          list server {
            key ip-address;
            description "List of DNS servers.";
            leaf hostname {
              type string;
              description "DNS server hostname.";
            }
            leaf ip-address {
              type inet:ip-address;
              mandatory true;
              description "DNS server IP address.";
            }
            leaf port {
              type uint16;
              description "DNS server port.";
            }
            leaf key-name {
              type string;
              description "Name of the TSIG key used to protect DNS updates for
                           this server.";
            }
            leaf user-context {
              type kea:user-context;
              description "DNS server user context.";
            }
          }
        }
        leaf user-context {
          type kea:user-context;
          description "DDNS domain user context.";
        }
      }
    }
  }

  /*
  * Data Nodes
  */

  container config {
    // config true;
    description "Contains DHCP-DDNS server configuration.";

    leaf ip-address {
      type inet:ip-address;
      description "IP address on which the server listens for requests.";
    }

    leaf port {
      type uint16;
      description "Port on which the server listens for requests.";
    }

    leaf dns-server-timeout {
      type uint32;
      units "milliseconds";
      description "Maximum amount of time that the server will wait for
        a response from a DNS server to a single DNS update message.";
    }

    leaf ncr-protocol {
      type enumeration {
        enum "UDP" {
          description "UDP transport";
        }
        enum "TCP" {
          description "TCP transport";
        }
      }
      description "Protocol to use when sending requests to the server.";
    }

    leaf ncr-format {
      type enumeration {
        enum "JSON" {
          description "JSON format";
        }
      }
      description "Packet format to use when sending requests to the server.";
    }

    uses kea:control-socket;

    container forward-ddns {
      description "Forward DNS zones.";
      uses managed-domains;
    }

    container reverse-ddns {
      description "Reverse DNS zones.";
      uses managed-domains;
    }

    container tsig-keys {
      description "Keys to use with TSIG.";
      list key {
        key name;
        description "List of TSIG keys.";
        leaf name {
          type string;
          mandatory true;
          description "Key name.";
        }
        leaf algorithm {
          type string;
          mandatory true;
          description "Hashing algorithm to use with the key.";
        }
        leaf digest-bits {
           type uint16;
           units "bits";
           description "Minimum truncated length. 0 means no truncation.";
        }
        leaf secret {
          type string;
          mandatory true;
          description "Shared secret for the key.";
        }
        leaf user-context {
          type kea:user-context;
          description "Key user context.";
        }
      }
    }
    leaf user-context {
      type kea:user-context;
      description "DHCP-DDNS server user context.";
    }

    uses kea:loggers;
  }
}