diff --git a/gso/services/infoblox.py b/gso/services/infoblox.py index c414aae59d89b8347a53a75aa0f0d4310b6da798..d340ce979f14a8c4d767f0f0e9ccf10331174387 100644 --- a/gso/services/infoblox.py +++ b/gso/services/infoblox.py @@ -250,9 +250,8 @@ def create_host_by_ip( :term:`GSO`. """ if not hostname_available(hostname): - msg = f"FQDN {hostname} already taken, nothing to be done." - logger.warning(msg) - return + msg = f"FQDN '{hostname}' is already in use, allocation aborted." + raise AllocationError(msg) conn, oss = _setup_connection() ipv6_object = objects.IP.create(ip=str(ipv6_address), mac=NULL_MAC, configure_for_dhcp=False)