Now Available - Forrester's Total Economic Impact study. Discover millions in cost savings, unlock IT efficiency gains, and explore why NIOS DDI is a game changer. Get Your Copy here.

API & Integration, DevOps,NetOps,SecOps


Ansible nios call

New Member
Posts: 1
577     0

Hi everyone,


I'm trying to filter out some 'UNMANAGED' ip records as they are clogging our customers dhcp scopes. when i run:


hosts: "{{ lookup('nios', 'search', filter={'address': ''},provider=nios_provider) }}"


I get below object back


ok: [CUSTOMER_HOST] => {
    "hosts": [
            "_ref": "ipv4address/whatever:",
            "ip_address": "",
            "is_conflict": false,
            "mac_address": "",
            "names": [],
            "network": "",
            "network_view": "default",
            "objects": [],
            "status": "USED",
            "types": [
            "usage": []
            "comment": "",
            "network": "",
            "network_view": "default"


Now i want to try and search for all records matching "types" : "UNMANAGED"  however this doesn't seem to exist as a filter..


Failed on object search with url https://CUSTOMER_HOST/wapi/v2.11.2/search?types=unmanaged&_max_results=1000: b'{ "Error": "AdmConProtoError: Unknown argument/field: \'types\'", \n  "code": "Client.Ibap.Proto", \n  "text": "Unknown argument/field: \'types\'"\n}'
Failed on object search with url https://CUSTOMER_HOST/wapi/v2.11.2/search?types=unmanaged&_max_results=1000&_proxy_search=GM: b'{ "Error": "AdmConProtoError: Unknown argument/field: \'types\'", \n  "code": "Client.Ibap.Proto", \n  "text": "Unknown argument/field: \'types\'"\n}'

i'm using WAPI version 2.11.2. Does someone know how to achieve this ?


Thank you,




Showing results for 
Search instead for 
Did you mean: 

Recommended for You