{% extends "generic/object.html" %} {% load form_helpers %} {% block content %}
Import DHCPv{{ dhcp_version }} Reservations

Select YAML or JSON. Then paste a document or upload one UTF-8 file. NetBox Kea validates the complete document before it contacts Kea.

Scope and identity rules
  • Use a subnet CIDR. The import resolves its current Kea subnet ID from the live Subnet Catalogue.
  • Each record needs exactly one native Kea identity.
  • Global scope is valid in exports, but import currently supports only in-subnet.
  • Any validation error stops the complete import. A Kea write failure stops the remaining records.
Show a minimal YAML example
version: 1
reservations:
  - family: {{ dhcp_version }}
    scope:
      type: in-subnet
      subnet:
        cidr: {% if dhcp_version == 4 %}198.18.0.0/24{% else %}2001:db8::/64{% endif %}
    identity:
      type: {% if dhcp_version == 4 %}hw-address
      value: "aa:bb:cc:dd:ee:ff"{% else %}duid
      value: "00:01:02:03:04:05"{% endif %}
    addresses: [{% if dhcp_version == 4 %}198.18.0.20{% else %}2001:db8::20{% endif %}]
    delegated_prefixes: []
    hostname: host.example.invalid
    options: []
{% csrf_token %} {% render_form form %}
Cancel
{% if result is not None %}
Import result
{% if result.diagnostics %} {% for diagnostic in result.diagnostics %} {% endfor %}
PositionCodeProblem
{{ diagnostic.source_position }} {{ diagnostic.code }} {{ diagnostic.message }}
{% else %}
{{ result.created }}
Created
{{ result.failed }}
Failed
{{ result.not_attempted }}
Not attempted
{{ result.total }}
Total
{% if result.failure %} {% else %}
All Reservations were created.
{% endif %} {% endif %}
{% endif %}
{% endblock %}