Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps

Reply

Search fqdn for regex not working

Techie
Posts: 3
2560     0

Hi,

 

I'm trying to use a regular expression to search the fqdn, but the regular expression doesn't appear to be working.

 

A simple working example:

 

$ curl -n "https://ipam.domain/wapi/v2.11.1/search?fqdn~=test-device&_return_fields=name"                                                
[
    {
        "_ref": "record:host/......",
        "name": "test-device.domain"
    }
]

But, if I use ".est-device" instead of "test-device" (where the leading "." should match any single character, including "t") I get no results:

 

$ curl -n "https://ipam-uat.domain/wapi/v2.11.1/search?fqdn~=.est-device&_return_fields=name" 
[]

 

Why is this simple regular expression fqdn search not working?

Re: Search fqdn for regex not working

Superuser
Posts: 17
2561     0

Hi,

 

I tested this against my lab box which has WAPI version 2.10.5, and it appears to work correctly. Perhaps you could try to re-run the same curl command against your machine, but just change the version from 2.11.1 to 2.10.5 and see if it makes a difference? If it does, then you'd know it's a specific issue with 2.11.x.

 

Also, try use single quotes instead of double quotes around your URL, see if that makes a difference. (It did not make a difference on my system).

 

 

Re: Search fqdn for regex not working

Techie
Posts: 3
2561     0

Hi JKuo,

 

Thanks for your reply. Following your suggestion I tried with 2.10.5, single quotes (and various combinations), but I'm still not getting any results:

 

$ curl -n 'https://ipam-uat.domain/wapi/v2.10.5/search?fqdn~=.est-device&_return_fields=name'
[]

I originally encountered the problem accessing WAPI from python, and then reduced it back to the minimal curl example to which still demonstrates the problem.

 

Re: Search fqdn for regex not working

Superuser
Posts: 17
2561     0

I cannot think of any reason why it wouldn't work... perhaps re-write the single dot in URL encoding (%2E)? I am not showing this behavior on my lab Grid.

Re: Search fqdn for regex not working

Techie
Posts: 3
2561     0

Using %2E didn't work either.

 

Your confirmation that it works on your infoblox server is helpful in that my query is probably correct, and it may be a problem with my infoblox instance.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin