salt.modules.omapi

This module interacts with an ISC DHCP Server via OMAPI. server_ip and server_port params may be set in the minion config or pillar:

omapi.server_ip: 127.0.0.1
omapi.server_port: 7991
depends

pypureomapi Python module

salt.modules.omapi.add_host(mac, name=None, ip=None, ddns=False, group=None, supersede_host=False)

Add a host object for the given mac.

CLI Example:

salt dhcp-server omapi.add_host ab:ab:ab:ab:ab:ab name=host1

Add ddns-hostname and a fixed-ip statements:

salt dhcp-server omapi.add_host ab:ab:ab:ab:ab:ab name=host1 ip=10.1.1.1 ddns=true
salt.modules.omapi.delete_host(mac=None, name=None)

Delete the host with the given mac or name.

CLI Examples:

salt dhcp-server omapi.delete_host name=host1
salt dhcp-server omapi.delete_host mac=ab:ab:ab:ab:ab:ab