Skip to content
Snippets Groups Projects

raise exception in case there is already taken host in infoblox

Merged Mohammad Torkashvand requested to merge fix/infoblox-create-host-by-ip into develop
All threads resolved!
1 file
+ 2
3
Compare changes
  • Side-by-side
  • Inline
+ 2
3
@@ -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)
Loading