Reply

RECORD: HOST

New Member
Posts: 6
983     0

from infoblox_client import connector

credenciales= {
'host': 'XXX.XXX.XXX',
'username': 'XXXX',
'password': 'XXXX',
'verify_ssl':'False',
'wapi_version':'2.11'
}

#CREAR CONEXION CON SERVIDOR DE INFOBLOX
conn = connector.Connector(credenciales)

params = {
"name":"hostname2",
'view':'XBS-Internal corp & reverse',
'ipv4addrs': [{'ipv4addr':'169.254.200.2'}],
'zone':'nso.atos-nao.net',
'disable':True,
'network_view':'default'
}

try:
# Crear el registro tipo host en Infoblox
response = conn.create_object('record:host', params)
print('Registro tipo host creado exitosamente.')
print(response) # Imprimir la respuesta JSON (opcional)
except Exception as e:
print('Error al crear el registro tipo host:', e)

 

Im trying to create a record:host but i recieve a next error:

Error al crear el registro tipo host: Cannot create 'record:host' object(s): b'{ "Error": "AdmConProtoError: Field is not writable: zone", \n "code": "Client.Ibap.Proto", \n "text": "Field is not writable: zone"\n}' [code 400]

 

Somebody have a suggestion

Re: RECORD: HOST

Moderator
Moderator
Posts: 321
984     0

You can't give the zone name.  The system will figure out which zone will get the record.   Instead, give the full FQDN as the hostname, for example hostname2.nso.atos-nao.net.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You