Reply

How do I search based on EA value and list all values for an EA for a specific network.

Techie
Posts: 4
2866     0

 

Hi, 

 

I've been looking at both the WAPI and pyhton infoblox-client librairies but I cannot work out how to search based on a certain Host EA matching a certain value in a particular network. 

 

I'm also trying to work out how to list all of the values set for a particuate EA within a network.

 

For example.

 

If I have a network of 192.168.1.0/24 and within it I have hosts with the Extensible attribute "VLAN"

 

192.168.1.1 -  VLAN= 10

192.168.1.2 -  VLAN= 11

192.168.1.3 -  VLAN= 12

192.168.1.4 -  VLAN= 13

 

 

I would want to be able to return the 192.168.1.4 entry when searching for VLAN=13 within the network 192.168.1.0/24

 

Also I would like to return a list of all of the VLANs assign to the hosts within the network 192.168.1.0/24 

 

 

Is this something that can be done via the API? or the infoblox-client library?

 

Many thanks.

 

 

 

 

 

 

 

 

 

 

 

 

 

Re: How do I search based on EA value and list all values for an EA for a specific network.

Authority
Posts: 18
2866     0

Hello,

 

Since the WAPI modules for the "Host" objects (record:host or record:host_ipv4addr) does not provide a searchable "network" field, alternatively, I belive it would be effective to use the "ipv4address" field for the search instead.

 

The "host" object in DHCP naturally hold a place in IPAM as well (as the ipv4address object), and we can leverage this to our advantage.

 

We could either pull all Host-address objects that belong to a VLAN (extensible attribute), like so:

 

GET   "https://infoblox.localdomain/wapi/v2.7/record:host?*VLAN=2"

 

Or, pull IP addresses that belong to a particular VLAN, from a specific Network:

 

GET   "https://infoblox.localdomain/wapi/v2.7/ipv4address?network=1.1.1.0\&*VLAN=2"

 

 

The Infoblox WAPI module does not currently feature a module to provide the list of all VLANs used by Host objects within a Network. The external way would be to use a filter to the uniquely sort the output from:

 

GET   "https://1infoblox.localdomain/wapi/v2.7/ipv4address?network=1.1.1.0\&_return_fields=extattrs"

 

 

I hope this helps.

 

Best regards

Re: How do I search based on EA value and list all values for an EA for a specific network.

Techie
Posts: 4
2866     0
Thanks nedward that’s just what I was after!
Showing results for 
Search instead for 
Did you mean: 

Recommended for You