dhcp4.spec 8.6 KB
Newer Older
1 2
{
  "module_spec": {
3
    "module_name": "Dhcp4",
4
    "module_description": "DHCPv4 server daemon",
5
    "config_data": [
6 7 8 9 10 11 12 13 14
      {
        "item_name": "hooks-libraries",
        "item_type": "list",
        "item_optional": true,
        "item_default": [],
        "list_item_spec":
        {
          "item_name": "hooks-library",
          "item_type": "string",
15 16
          "item_optional": false,
          "item_default": ""
17 18
        }
      },
19

20
      { "item_name": "interfaces",
21
        "item_type": "list",
22
        "item_optional": false,
23
        "item_default": [ "*" ],
24 25 26 27 28
        "list_item_spec":
        {
          "item_name": "interface_name",
          "item_type": "string",
          "item_optional": false,
29
          "item_default": "*"
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
        }
      } ,

      { "item_name": "renew-timer",
        "item_type": "integer",
        "item_optional": false,
        "item_default": 1000
      },

      { "item_name": "rebind-timer",
        "item_type": "integer",
        "item_optional": false,
        "item_default": 2000
      },

      { "item_name": "valid-lifetime",
        "item_type": "integer",
        "item_optional": false,
        "item_default": 4000
      },

51 52 53 54 55 56
      { "item_name": "next-server",
        "item_type": "string",
        "item_optional": true,
        "item_default": "0.0.0.0"
      },

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
      { "item_name": "option-def",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
          "item_name": "single-option-def",
          "item_type": "map",
          "item_optional": false,
          "item_default": {},
          "map_item_spec": [
          {
            "item_name": "name",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
          },

          { "item_name": "code",
            "item_type": "integer",
            "item_optional": false,
78
            "item_default": 0
79 80 81 82 83
          },

          { "item_name": "type",
            "item_type": "string",
            "item_optional": false,
84
            "item_default": ""
85 86 87 88 89 90 91 92
          },

          { "item_name": "array",
            "item_type": "boolean",
            "item_optional": false,
            "item_default": False
          },

93
          { "item_name": "record-types",
94
            "item_type": "string",
95
            "item_optional": false,
96
            "item_default": ""
97 98 99 100 101 102
          },

          { "item_name": "space",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
103 104 105 106 107 108
          },

          { "item_name": "encapsulate",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
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
      { "item_name": "option-data",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
          "item_name": "single-option-data",
          "item_type": "map",
          "item_optional": false,
          "item_default": {},
          "map_item_spec": [
          {
            "item_name": "name",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
          },

          { "item_name": "code",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 0
          },
          { "item_name": "data",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
140 141 142 143 144
          },
          { "item_name": "csv-format",
            "item_type": "boolean",
            "item_optional": false,
            "item_default": False
145 146 147 148 149
          },
          { "item_name": "space",
            "item_type": "string",
            "item_optional": false,
            "item_default": "dhcp4"
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 185 186 187 188 189 190 191
      { "item_name": "lease-database",
        "item_type": "map",
        "item_optional": false,
        "item_default": {"type": "memfile"},
        "map_item_spec": [
            {
                "item_name": "type",
                "item_type": "string",
                "item_optional": false,
                "item_default": ""
            },
            {
                "item_name": "name",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "user",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "host",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "password",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            }
        ]
      },

192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
      { "item_name": "subnet4",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
            "item_name": "single-subnet4",
            "item_type": "map",
            "item_optional": false,
            "item_default": {},
            "map_item_spec": [

                { "item_name": "subnet",
                  "item_type": "string",
                  "item_optional": false,
                  "item_default": ""
                },

                { "item_name": "renew-timer",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 1000
                },

                { "item_name": "rebind-timer",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 2000
                },

                { "item_name": "valid-lifetime",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 7200
                },
227 228 229 230 231 232 233

                { "item_name": "next-server",
                    "item_type": "string",
                    "item_optional": true,
                    "item_default": "0.0.0.0"
                },

234 235 236 237 238 239 240 241 242 243 244
                { "item_name": "pool",
                  "item_type": "list",
                  "item_optional": false,
                  "item_default": [],
                    "list_item_spec":
                    {
                        "item_name": "type",
                        "item_type": "string",
                        "item_optional": false,
                        "item_default": ""
                    }
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
                },

                { "item_name": "option-data",
                  "item_type": "list",
                  "item_optional": false,
                  "item_default": [],
                  "list_item_spec":
                  {
                    "item_name": "single-option-data",
                    "item_type": "map",
                    "item_optional": false,
                    "item_default": {},
                    "map_item_spec": [
                    {
                      "item_name": "name",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
                    },
                    {
                      "item_name": "code",
                      "item_type": "integer",
                      "item_optional": false,
                      "item_default": 0
                    },
                    {
                      "item_name": "data",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
275 276
                    },
                    { "item_name": "csv-format",
277
                      "item_type": "boolean",
278 279
                      "item_optional": false,
                      "item_default": False
280 281 282 283 284
                      },
                    { "item_name": "space",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": "dhcp4"
285 286 287 288
                    } ]
                  }
                } ]
         }
289 290
      }
    ],
291 292 293
    "commands": [
        {
            "command_name": "shutdown",
294 295 296 297 298 299 300 301
            "command_description": "Shuts down DHCPv4 server.",
            "command_args": [
                {
                    "item_name": "pid",
                    "item_type": "integer",
                    "item_optional": true
                }
            ]
302 303 304 305
        },

        {
            "command_name": "libreload",
306
            "command_description": "Reloads the current hooks libraries.",
307
            "command_args": []
308
        }
309

310
    ]
311 312
  }
}