+ dhcpv6 server; rewrite dhcpv4 server; changed API

This commit is contained in:
Simon Zolin
2020-07-03 18:20:01 +03:00
parent c3123473cf
commit a3317c08c4
27 changed files with 2384 additions and 1280 deletions

View File

@@ -348,8 +348,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/DhcpConfig"
description: DHCP configuration JSON
required: true
responses:
"200":
description: OK
@@ -965,6 +963,8 @@ components:
maximum: 65535
protection_enabled:
type: boolean
dhcp_available:
type: boolean
querylog_enabled:
type: boolean
running:
@@ -999,6 +999,8 @@ components:
- tls://1.0.0.1
protection_enabled:
type: boolean
dhcp_available:
type: boolean
ratelimit:
type: integer
blocking_mode:
@@ -1259,17 +1261,18 @@ components:
description: Time period to keep data (1 | 7 | 30 | 90)
DhcpConfig:
type: object
description: Built-in DHCP server configuration
required:
- enabled
- gateway_ip
- subnet_mask
- range_start
- range_end
- lease_duration
properties:
enabled:
type: boolean
interface_name:
type: string
v4:
$ref: "#/components/schemas/DhcpConfigV4"
v6:
$ref: "#/components/schemas/DhcpConfigV6"
DhcpConfigV4:
type: object
properties:
gateway_ip:
type: string
example: 192.168.1.1
@@ -1283,8 +1286,14 @@ components:
type: string
example: 192.168.10.50
lease_duration:
type: integer
DhcpConfigV6:
type: object
properties:
range_start:
type: string
example: 12h
lease_duration:
type: integer
DhcpLease:
type: object
description: DHCP lease information
@@ -1305,8 +1314,7 @@ components:
example: dell
expires:
type: string
format: date-time
example: 2017-07-21T17:32:28Z
example: "2017-07-21T17:32:28Z"
DhcpStaticLease:
type: object
description: DHCP static lease information
@@ -1332,8 +1340,14 @@ components:
- config
- leases
properties:
config:
$ref: "#/components/schemas/DhcpConfig"
enabled:
type: boolean
interface_name:
type: string
v4:
$ref: "#/components/schemas/DhcpConfigV4"
v6:
$ref: "#/components/schemas/DhcpConfigV6"
leases:
type: array
items: