Reply

Create A record and associated PTR record

Authority
Posts: 21
3418     0

Hi All

 

I have this below POST call which is creating a A record for me

https://grid-master/wapi/v2.9/record:a?_return_fields%2B=name,ipv4addr&_return_as_object=1" -d '{"name":"server.info.com","ipv4addr":"10.10.10.2"}'

But i want to have to associated PTR record also to be created. In GUI for which we just check the PTR checkbox for that..

Is there any request you can help me with which will do it in a single request.

Re: Create A record and associated PTR record

New Member
Posts: 2
3418     0

Hi,

Well I have added a similar question using create fixed address but am waiting for a reply. Here is a copy of my post:

 

Hi,

Happy to find this undocumented use of PUT (at least in "Infoblox REST API, NIOS 8.6 pdf) to re-IP a fixedaddress to a different IP. 

However it seems to limit you to another IP in the same subnet:

 

     RuntimeError: {'Error': 'AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:The IP '
     'address 10.102.91.177 is not valid for the network 10.102.80.0/21.)',
     'code': 'Client.Ibap.Data.Conflict',
     'text': 'The IP address 10.102.91.177 is not valid for the network '
     '10.102.80.0/21.'}

 

The fixedaddress' current IP is 10.102.80.23 (10.102.80.0/21) and am attempting to change the IP to 10.102.91.177 (10.102.88.0/22).

 

What would be the proper sequence of wapi call for my scenario in that case?

The current snippet for the error above is:

 

     URL = f'{GRID_MASTER}/{FixedAddrRef}'

     params = {"ipv4addr":f"{NextIP}","mac":f"{MAC}"}

     headers={"Content-Type": 'application/json'}

     resp = requests.put(URL, headers=headers, cookies=session.cookies, params=params, verify=False)

 

Where MAC is the MAC for the fixedaddress and NextIP is the next available IP in 10.102.88.0/22

 

Also if there if a more complete wapi document that shows the exitsing PUT tidbit please share that.

Thanks in advance!

Paul

Re: Create A record and associated PTR record

New Member
Posts: 1
3418     0

Just create the new fixed address in the new network and then delete the old one. You cannot move a fixed address from one network to another as they are build inside of the network container.

 

You can have the same mac address fixed to an IP in every network in the grid if you wanted to make sure a specific host got a specific IP per network.

Re: Create A record and associated PTR record

Moderator
Moderator
Posts: 321
3418     0

Yes, you can move a fixed address to a different network.  I answered this question in the original thread:

https://community.infoblox.com/t5/api-integration-devops-netops/editing-changing-a-fixed-address-wit...

 

Re: Create A record and associated PTR record

New Member
Posts: 1
3418     0

Hello,

Did anyone get a reply for the original question ?

Creating the associated PTR record to an "A" via WAPI ?

Re: Create A record and associated PTR record

Moderator
Moderator
Posts: 321
3418     0

There is not an option in the API, it would need to be two separate calls.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You