manage_dhcp
Manage DHCP configuration with CRUD operations for HA groups, option codes, hardware filters, DHCP servers, and global settings.
Instructions
Manage DHCP configuration: HA groups, option codes, hardware filters, option filters, hardware, DHCP servers, option groups/spaces, MAC address items, DHCP hosts, global config, and config profiles. USE THIS for DHCP-specific CRUD. For IP reservations use manage_ip_reservation(). For network topology use manage_network().
Args: resource_type: Type of DHCP resource to manage action: Operation to perform (bulk_create for mac_item; link/delink for config_profile) name: Resource name resource_id: Resource ID for get/update/delete mode: HA group mode (e.g., "active-active", "active-passive") — for ha_group create hosts: HA group hosts list — for ha_group create code: DHCP option code number — for option_code create option_type: Option code type (e.g., "string", "uint8") — for option_code create protocol: Protocol for hardware filters (e.g., "dhcpv4") — for hardware_filter create mac_address: MAC address — for hardware/mac_item create comment: Description items: List of MAC item dicts for bulk_create (each: {"mac": "AA:BB:CC:DD:EE:FF"}) object_id: Object ID for config_profile list/link/delink (e.g., subnet ID) tags: Resource tags dry_run: If True (default), delete shows resource only. Set False to execute.
Returns: DHCP operation result
Examples: - manage_dhcp(resource_type="ha_group", action="list") - manage_dhcp(resource_type="dhcp_server", action="list") - manage_dhcp(resource_type="option_group", action="create", name="my-group") - manage_dhcp(resource_type="mac_item", action="bulk_create", items=[{"mac": "AA:BB:CC:DD:EE:FF"}]) - manage_dhcp(resource_type="config_profile", action="link", resource_id="dhcp/config_profile/abc", object_id="ipam/subnet/xyz") - manage_dhcp(resource_type="dhcp_global", action="get") - manage_dhcp(resource_type="option_code", action="delete", resource_id="dhcp/option_code/123", dry_run=False)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| mode | No | ||
| name | No | ||
| tags | No | ||
| hosts | No | ||
| items | No | ||
| action | Yes | ||
| comment | No | ||
| dry_run | No | ||
| protocol | No | ||
| object_id | No | ||
| mac_address | No | ||
| option_type | No | ||
| resource_id | No | ||
| resource_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||