GithubHelp home page GithubHelp logo

Comments (3)

cimnine avatar cimnine commented on August 15, 2024

To work with the pagination, you can do:

NetboxClientRuby.ipam.ip_addresses.limit(100).offset(100) # addresses 101 - 200
# or
NetboxClientRuby.ipam.ip_addresses.page(0) # first page

limit and offset work just like documented in netbox. page is a convenience method, which just calculates the offset from the current (default) limit.

from netbox-client-ruby.

cimnine avatar cimnine commented on August 15, 2024

As for this one:

I tried NetboxClientRuby.ipam.ip_addresses.filter(address: '192.168.4.40/24') but it doesn't work for me.

You're using the API wrong.

In you browser, go to http://YOUR_NETBOX/api/ipam/ip-addresses/?address=192.168.4.40/24. You'll see that all IPs you have in there are returned.

But if you go to http://YOUR_NETBOX/api/ipam/ip-addresses/?q=192.168.4.40/24 instead, you'll see that only the one IP is returned.

from netbox-client-ruby.

cimnine avatar cimnine commented on August 15, 2024

Btw, I'm sorry for the long response time. I did not see that someone opened an issue.

from netbox-client-ruby.

Related Issues (14)

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.