Giter Club home page Giter Club logo

Comments (10)

jkraj avatar jkraj commented on September 3, 2024

@eest Yes it is modified intentionally. Present structure represents actual wapi object representation. So you should use Ipv4Addrs slice.

from infoblox-go-client.

eest avatar eest commented on September 3, 2024

@jkraj Thanks for the input. I have tried using a slice instead like so:

recordHostObj := ibclient.NewHostRecord(ibclient.HostRecord{
    Ipv4Addrs: []ibclient.HostRecordIpv4Addr{
        *ibclient.NewHostRecordIpv4Addr(ibclient.HostRecordIpv4Addr{
            Ipv4Addr: address,
        }),
    },
})
err = conn.GetObject(recordHostObj, "", &hostResult)

... which compiles, but the search fails because the field is not searchable:

2018/05/17 09:16:19 GetObject request error: 'WAPI request error: 400('400 Bad Request')
Contents:
{ "Error": "AdmConProtoError: Field is not searchable: ipv4addrs", 
  "code": "Client.Ibap.Proto", 
  "text": "Field is not searchable: ipv4addrs"
}

Am I doing something wrong or is the Ipv4Addrs field searchable in later WAPI versions?

from infoblox-go-client.

chinmayb avatar chinmayb commented on September 3, 2024

Looks like we need to keep "Ipv4addr" field along with "Ipv4addrs" as well @jkraj . If you see the doc "wapidoc/objects/record.host.html#ipv4addr" Ipv4addr of string type is searchable, while ipv4addrs is not.

from infoblox-go-client.

chinmayb avatar chinmayb commented on September 3, 2024

The below PR has a fix. Will that work for you @eest ?
#70

from infoblox-go-client.

eest avatar eest commented on September 3, 2024

@chinmayb: I applied the diff to my 0.6.0 branch and it made my search work, thanks!

from infoblox-go-client.

eest avatar eest commented on September 3, 2024

I noticed #69 has been merged, it would be great if you could create a new tag when this is also solved so i have a version that supports both host searching by ip address and the FixedAddress name addition from 0.5.0 :).

from infoblox-go-client.

chinmayb avatar chinmayb commented on September 3, 2024

@eest you can use 0.7.0 version.

from infoblox-go-client.

eest avatar eest commented on September 3, 2024

@chinmayb: I can not, because 0.7.0 does not include the fix for FixedAddress added in #69.

from infoblox-go-client.

chinmayb avatar chinmayb commented on September 3, 2024

I had updated the tag by force pushing. It didnt seem to work. I created a new release v0.7.1. Please use that

from infoblox-go-client.

eest avatar eest commented on September 3, 2024

@chinmayb the 0.7.1 tag seems to work as expected, thanks!

from infoblox-go-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.