Code Monkey home page Code Monkey logo

ipams's Introduction

ipams - Query multiple IPAMs

Install

Pip

pip -U install ipams

Pipx

pipx install ipams

Update

pipx upgrade ipams

Supported IPAMs

Planned

Configuration

Save the configuration under $HOME/.config/ipams/config.yml or use the --config flag to specify a different location.

---
netboxes:
  - name: NetBox Demo
    url: https://demo.netbox.dev/
    token: 75d956ee746641e844f7fa26b63c6741d287c776

phpipams:
  - name: phpIPAM Demo
    url: https://demo.phpipam.net/
    app_id: ipams
    token: 75d956ee746641e844f7fa26b63c6741d287c776
    # Token OR username/password can be used
    # username: admin
    # password: admin

Use the example config

mkdir -p $HOME/.config/ipams
cp config.yml $HOME/.config/ipams/config.yml

Usage

IP

❯ ipams ip 10.0.0.133
NetBox Demo
┏━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Address       ┃ Tenant ┃ VRF   ┃ Description ┃ Link                                           ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 10.0.0.133/27 │        │       │ test        │ https://demo.netbox.dev/ipam/ip-addresses/184/ │
├───────────────┼────────┼───────┼─────────────┼────────────────────────────────────────────────┤
│ 10.0.0.133/27 │        │ Alpha │             │ https://demo.netbox.dev/ipam/ip-addresses/191/ │
└───────────────┴────────┴───────┴─────────────┴────────────────────────────────────────────────┘

Host

By name

❯ ipams host dmi01-akron
NetBox Demo
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Device            ┃ Site                 ┃ Tenant   ┃ Address ┃ Link                                     ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dmi01-akron-pdu01 │ Dunder-Mifflin, Inc. │ DM-Akron │         │ https://demo.netbox.dev/dcim/devices/27/ │
├───────────────────┼──────────────────────┼──────────┼─────────┼──────────────────────────────────────────┤
│ dmi01-akron-rtr01 │ Dunder-Mifflin, Inc. │ DM-Akron │         │ https://demo.netbox.dev/dcim/devices/1/  │
├───────────────────┼──────────────────────┼──────────┼─────────┼──────────────────────────────────────────┤
│ dmi01-akron-sw01  │ Dunder-Mifflin, Inc. │ DM-Akron │         │ https://demo.netbox.dev/dcim/devices/14/ │
└───────────────────┴──────────────────────┴──────────┴─────────┴──────────────────────────────────────────┘

By IP

❯ ipams host 10.0.0.133
NetBox Demo
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Device             ┃ Site                 ┃ Tenant    ┃ Address       ┃ Link                                    ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dmi01-nashua-rtr01 │ Dunder-Mifflin, Inc. │ DM-Nashua │ 10.0.0.133/27 │ https://demo.netbox.dev/dcim/devices/6/ │
└────────────────────┴──────────────────────┴───────────┴───────────────┴─────────────────────────────────────────┘

Network

By description

❯ ipams network "Shared"
NetBox Demo
┏━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Network        ┃ Tenant ┃ VRF    ┃ Description     ┃ Link                                      ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 192.168.0.0/20 │        │ Shared │ Shared services │ https://demo.netbox.dev/ipam/prefixes/95/ │
└────────────────┴────────┴────────┴─────────────────┴───────────────────────────────────────────┘

By IP

❯ ipams network 192.168.0.0/22
NetBox Demo
┏━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Network        ┃ Tenant ┃ VRF    ┃ Description     ┃ Link                                      ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 192.168.0.0/22 │        │        │                 │ https://demo.netbox.dev/ipam/prefixes/73/ │
├────────────────┼────────┼────────┼─────────────────┼───────────────────────────────────────────┤
│ 192.168.0.0/20 │        │ Shared │ Shared services │ https://demo.netbox.dev/ipam/prefixes/95/ │
└────────────────┴────────┴────────┴─────────────────┴───────────────────────────────────────────┘

ipams's People

Contributors

dependabot[bot] avatar renovate[bot] avatar rwxd avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.