nbctl

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

README

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

Documentation

Overview

Copyright © 2024 Julien Briault <julien.briault@restosducoeur.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL