summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/kea-types@2019-08-12.yang
blob: a19c18f9e8b04e64633e74e5785370735cbb01f9 (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
module kea-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:kea-types";
  prefix "kea-types";

  organization "Internet Systems Consortium";
  contact "kea-dev@lists.isc.org";
  description "This file defines some commonly used Kea types and groupings.";

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

  /*
  * Typedef
  */
  typedef user-context {
    type string;
    description "User context (JSON map).";
  }

  /*
  * Grouping
  */
  grouping user-context {
    description "User context grouping.";
    leaf user-context {
      type user-context;
      description "User context entry.";
    }
  }

  grouping control-socket-info {
    description "Control socket parameters.";
    leaf socket-name {
      type string;
      mandatory true;
      description "Path to the UNIX socket.";
    }
    leaf socket-type {
      type enumeration {
        enum "unix" {
          description "Unix socket type.";
        }
      }
      mandatory true;
      description "Socket type.";
    }
    leaf user-context {
      type user-context;
      description "Control socket user context.";
    }
  }

  grouping control-socket {
    description "Control socket grouping.";
    container control-socket {
      presence "Have control socket.";
      description "Control socket container.";
      uses control-socket-info;
    }
  }

  grouping hooks-libraries {
    description "Hooks libraries grouping.";
    list hook-library {
      key library;
      description "List of hook library.";
      leaf library {
        type string;
        mandatory true;
        description "Path to the DSO.";
      }
      leaf parameters {
        type string;
        description "Parameters (JSON value).";
      }
    }
  }

  grouping loggers {
    description "Loggers.";
    list logger {
      key name;
      description "List of loggers.";
      leaf name {
        type string;
        mandatory true;
        description "Name of the logger.";
      }
      list output-option {
        key output;
        description "List of output options.";
        leaf output {
          type string;
          description "Type of output. Special values are stdout (standard
            output), stderr (standard error), syslog (syslog using default
            name), syslog:name (syslog using specified name). Any other
            value is interpreted as a filename.";
        }
        leaf flush {
          type boolean;
          description "When true flush buffers after each message.";
        }
        leaf maxsize {
          type uint32;
          description "Maximum size of output file before rotation.
            Values below 204800 including 0 disable rotation.";
        }
        leaf maxver {
          type uint32 {
            range 1..max;
          }
          description "Maximum version to keep a rotated output file.";
        }
        leaf pattern {
          type string;
          description "Custom log layout.";
        }
      }
      leaf debuglevel {
        type uint8 {
          range 0..99;
        }
        description "What level of debug messages should be printed.";
      }
      leaf severity {
        type enumeration {
          enum "FATAL" {
            description "Condition is so serious that the server cannot
              continue executing";
          }
          enum "ERROR" {
            description "Error condition. The server will continue
              executing, but the results may not be as expected.";
          }
          enum "WARN" {
            description "Out of the ordinary condition. However, the server
              will continue executing normally.";
          }
          enum "INFO" {
            description "Information message marking some event.";
          }
          enum "DEBUG" {
            description "For debugging purposes.";
          }
          enum "NONE" {
            description "All messages are inhibited.";
          }
        }
        description "Category of messages logged.";
      }
      leaf user-context {
        type user-context;
        description "Logger user context.";
      }
    }
  }
}