Skip to content

infra-rdc/nbctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

nbctl

Client for NetBox written in Go.
Explore the docs »

View Demo · Report Bug · Request Feature

nbctl is a command line for interacting with Netbox. For the moment, it only lists items.

Getting started

# For insecure usage (dev only)
export NETBOX_HTTP_SCHEME="http"
export NETBOX_HOST="netbox.example.org"
export NETBOX_TOKEN="....."
nbctl help

----
Uncomplicated CLI interaction with Netbox.

Usage:
  nbctl [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  dcim        Interact with dcim.
  help        Help about any command
  version     Shows the current nbctl version

Flags:
  -h, --help     help for nbctl
  -t, --toggle   Help message for toggle

Use "nbctl [command] --help" for more information about a command.

Usage

List devices

List the various items of equipment, filtering by equipment, bay, location, type, site, status, etc.

nbctl dcim devices list [--json|--raw]

Example:

nbctl dcim devices list -k "rack 1"
+---------------+--------------------------------+----------------+--------+----------------+--------------------+----------------+---------+
|     NAME      |              TYPE              |     TENANT     | SERIAL |    LOCATION    |        SITE        |      RACK      | STATUS  |
+---------------+--------------------------------+----------------+--------+----------------+--------------------+----------------+---------+
| Server1       | PowerEdge R430                 | Restos du Cœur |        | Salle serveurs | Data Center        | rack 1         | active  |
| Server2       | PowerEdge R430                 | Restos du Cœur |        | Salle serveurs | Data Center        | rack 1         | active  |
| Web1          | PowerEdge R630                 | Restos du Cœur |        | Salle serveurs | Data Center        | rack 1         | active  |
| Web2          | PowerEdge R630                 | Restos du Cœur |        | Salle serveurs | Data Center        | rack 1         | active  |

License

Distributed under the GPLv3 License. See LICENSE for more information.

Contact

Julien Briault - @ju_hnny5