Reply

record:host_ipv4addr and record:host won't return network

[ Edited ]
aziule
Techie
Posts: 8
1246     0

Hi,

 

I would like to fetch the "network" value when fetching a host record (record:host_ipv4addr or record:host) but it is not returned:

 

Screenshot from 2018-09-07 10-16-09.png

 

However the schema states that we can return it:

 

Screenshot from 2018-09-07 10-16-20.png

 

I assume this is a bug, as even the API is not throwing an error saying the "network" field can't be returned..

 

Anybody had this issue as well? The bug appears in v2.7 as well.

 

Cheers,

 

Will

Re: record:host_ipv4addr and record:host won't return network

[ Edited ]
aziule
Techie
Posts: 8
1246     0

Bumping the post - can anyone confirm if this is a bug that needs to be raised to the dev team or an actual feature?

Re: record:host_ipv4addr and record:host won't return network

Adviser
Posts: 100
1246     0

Hi,

 

There is no "network" field in my record:host schema.

 

curl -k -u admin:infoblox "https://grid-master/wapi/v2.4/record:host?_schema"
{
    "cloud_additional_restrictions": [
        "function call"
    ],
    "fields": [
        {
            "is_array": true,
            "name": "aliases",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "allow_telnet",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": true,
            "name": "cli_credentials",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "discovery:clicredential"
            ]
        },
        {
            "is_array": false,
            "name": "cloud_info",
            "standard_field": false,
            "supports": "r",
            "type": [
                "grid:cloudapi:info"
            ]
        },
        {
            "is_array": false,
            "name": "comment",
            "searchable_by": ":=~",
            "standard_field": false,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "configure_for_dns",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "ddns_protected",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "device_description",
            "searchable_by": ":=~",
            "standard_field": false,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "device_location",
            "searchable_by": ":=~",
            "standard_field": false,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "device_type",
            "searchable_by": ":=~",
            "standard_field": false,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "device_vendor",
            "searchable_by": ":=~",
            "standard_field": false,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "disable",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "disable_discovery",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": true,
            "name": "dns_aliases",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "dns_name",
            "standard_field": false,
            "supports": "r",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "enable_immediate_discovery",
            "standard_field": false,
            "supports": "wu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "extattrs",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "extattr"
            ]
        },
        {
            "is_array": true,
            "name": "ipv4addrs",
            "standard_field": true,
            "supports": "rwu",
            "type": [
                "record:host_ipv4addr"
            ]
        },
        {
            "is_array": true,
            "name": "ipv6addrs",
            "standard_field": true,
            "supports": "rwu",
            "type": [
                "record:host_ipv6addr"
            ]
        },
        {
            "is_array": false,
            "name": "ms_ad_user_data",
            "standard_field": false,
            "supports": "r",
            "type": [
                "msserver:aduser:data"
            ]
        },
        {
            "is_array": false,
            "name": "name",
            "searchable_by": ":=~",
            "standard_field": true,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "network_view",
            "searchable_by": "=",
            "standard_field": false,
            "supports": "rs",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "restart_if_needed",
            "standard_field": false,
            "supports": "wu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "rrset_order",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "snmp3_credential",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "discovery:snmp3credential"
            ]
        },
        {
            "is_array": false,
            "name": "snmp_credential",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "discovery:snmpcredential"
            ]
        },
        {
            "is_array": false,
            "name": "ttl",
            "overridden_by": "use_ttl",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "uint"
            ]
        },
        {
            "is_array": false,
            "name": "use_cli_credentials",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "use_snmp3_credential",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "use_snmp_credential",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "use_ttl",
            "standard_field": false,
            "supports": "rwu",
            "type": [
                "bool"
            ]
        },
        {
            "is_array": false,
            "name": "view",
            "searchable_by": "=",
            "standard_field": true,
            "supports": "rwus",
            "type": [
                "string"
            ]
        },
        {
            "is_array": false,
            "name": "zone",
            "searchable_by": "=",
            "standard_field": false,
            "supports": "rs",
            "type": [
                "string"
            ]
        }
    ],
    "restrictions": [],
    "type": "record:host",
    "version": "2.4"
}

Could you please re-post the images in your first post? I cannot see them for some reason.

 

Thanks,

Krishna

Re: record:host_ipv4addr and record:host won't return network

MRichard Community Manager
Community Manager
Posts: 99
1246     0

Requests for a record:host_ipv4addr will only return a network value if it is configured for DHCP.

 

If a host address is not configured for DHCP, it isn't linked to a network, so no network would be returned.

Re: record:host_ipv4addr and record:host won't return network

aziule
Techie
Posts: 8
1246     0

Hi Krishna, thank you for your answer.

 

I double checked and indeed, record:host does not have "network" in its schema. However, record:host_ipv4addr does:

 

image.png

 

As you can see, "network" is never returned:

image.png

 

Re: record:host_ipv4addr and record:host won't return network

aziule
Techie
Posts: 8
1246     0

Hi MRichard, thank you for your answer

 

I tried to check the DHCP issue you mentionned and I could not get "network" from my record:host_ipv4addr even with a DHCP network. I also tried with a network with disabled DHCP (by checking "Disable DHCP" when creating it) as well, but it does not work.

Re: record:host_ipv4addr and record:host won't return network

MRichard Community Manager
Community Manager
Posts: 99
1246     0

If you could, kindly post the query and response you're using.  Below is my query and response, with DHCP not checked (and therefore no network attribute/value)

 

curl -k1 -u admin:infoblox -X GET 'https://10.9.16.6/wapi/v2.0/record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQubmV0d29yay5yaWNoYXJkLndpZmkxLjEwLjkuMTYuMi4:10.9.16.2/wifi1.richard.network/Internal' -d '_return_fields%2b=network'


{
    "_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQubmV0d29yay5yaWNoYXJkLndpZmkxLjEwLjkuMTYuMi4:10.9.16.2/wifi1.richard.network/Internal",
    "configure_for_dhcp": false,
    "host": "wifi1.richard.network",
    "ipv4addr": "10.9.16.2",
    "mac": "e4:8d:8c:ea:7f:e3"
}

 

And here is the response with DHCP checked (with network attribute/value) and screenshot below:

 

curl -k1 -u admin:infoblox -X GET 'https://10.9.16.6/wapi/v2.0/record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQubmV0d29yay5yaWNoYXJkLndpZmkxLjEwLjkuMTYuMi4:10.9.16.2/wifi1.richard.network/Internal' -d '_return_fields%2b=network'

{
    "_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQubmV0d29yay5yaWNoYXJkLndpZmkxLjEwLjkuMTYuMi4:10.9.16.2/wifi1.richard.network/Internal",
    "configure_for_dhcp": true,
    "host": "wifi1.richard.network",
    "ipv4addr": "10.9.16.2",
    "mac": "e4:8d:8c:ea:7f:e3",
    "network": "10.9.16.0/24"
}

 

Screen Shot 2018-09-19 at 7.41.50 AM.png

 

Highlighted

Re: record:host_ipv4addr and record:host won't return network

MRichard Community Manager
Community Manager
Posts: 99
1246     0

Please upload any images directly to the portal here, I cannot view these images on that external server. If you have a text response, please paste it directly, as "code" to preserve formatting.

Showing results for 
Search instead for 
Do you mean 

Recommended for You