#!/usr/share/ucs-test/runner python3
## desc: Create dhcp/host
## tags: [udm]
## roles: [domaincontroller_master]
## exposure: careful
## packages:
##   - univention-config
##   - univention-directory-manager-tools


import univention.testing.utils as utils
import univention.testing.udm as udm_test
import univention.testing.strings as uts

if __name__ == '__main__':
	with udm_test.UCSTestUDM() as udm:
		dhcp_service = udm.create_object('dhcp/service', service=uts.random_name())

		mac = 'ethernet 01:ff:78:38:ab:24'
		dhcp_host = udm.create_object('dhcp/host', host=uts.random_name(), hwaddress=mac, superordinate=dhcp_service)

		utils.verify_ldap_object(dhcp_host, {'dhcpHWAddress': [mac]})
