THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Enable DNS service on member via API

[ Edited ]
New Member
Posts: 2
5065     2

Hello All,

 

I'm currently trying to automate the deployment of my Infoblox virtual appliances in Azure.  I've had fairly good success up until the last step which is to enable the DNS service on the member.  I'm using the command:

 

curl -k -u <User>:<Password> -H 'content-type: application/json' -X PUT "https://<GMIP>/wapi/v2.11/member:dns/<MemberReference>:<MemberFQDN>?_return_as_object=1" -d '{"enable_dns":true}'

 

I receive the following error:

 

{ "Error": "AdmConDataError: .com.infoblox.one.virtual_node has no member enable_service",
"code": "Client.Ibap.Data",
"text": ".com.infoblox.one.virtual_node has no member enable_service"
}

 

I have not been able to figure out what is going wrong, any help you can provide is very much appreciated!

Re: Enable DNS service on member via API

Moderator
Moderator
Posts: 315
5065     2

Here's a multibody request to:

1: retrieve a reference to an appliance's DNS properties, given the appliance's name

  (and store that in the member_ref variable)

2: enable the DNS service for that appliance

 

Note that you may need to separately configure the DNS server to llisten on IPv6 and/or additional interfaces, depending on your needs.  It's pretty common to configure an IPv6 address on an appliance but forget to enable DNS on IPv6.

 

curl -k -u admin:infoblox -H "Content-Type: application/json" \
-X POST  'https://gm.example.org/wapi/v2.11/request' -d \
'[{
    "method": "GET",
    "object": "member:dns",
    "data": {"host_name": "ns1.example.org"},
    "assign_state": {"member_ref": "_ref" },
    "enable_substitution": true
  },
  {
    "enable_substitution": true,
    "method": "PUT",
    "object": "##STATE:member_ref:##",
    "data": {"enable_dns": true},
    "discard": true
}]'

Re: Enable DNS service on member via API

New Member
Posts: 2
5066     2

This works perfectly!  Thank you so much I appreciate you taking the time to help me out.

Re: Enable DNS service on member via API

New Member
Posts: 2
5066     2

i would ike to do the same but with Ansible. Can you give me a hand?

Showing results for 
Search instead for 
Did you mean: 

Recommended for You