nbictl tool

nbictl tool

nbictl is a command-line tool provided by Aalyria to interact with Spacetime.

It allows users to manage entities like antennas, network nodes, and telemetry data by performing actions such as creating, editing, updating, listing, or deleting entities.

It also allows to create Private/Public keys, and authentication-tokens that can be used to manually interact with Spacetime APIs.

Installation

Download the precompiled nbictl tool from the Aalyria Github Repository - Releases Page, based on your Operating System and computer architecture.

Unzip the file, then launch it via the terminal. The following command invokes the help command:

 ./nbictl --help

Configuration

nbictl can be configured with the credentials you used for authenticating to Aalyria’s API (see Obtaining API Credentials).

You can do it like so:

./nbictl config set --url "nbi.$DOMAIN"
./nbictl config set --key_id "$KEY_ID"
./nbictl config set --user_id "$USER_ID"
./nbictl config set --priv_key "$PRIVATE_KEY_FILE_PATH"

Usage

The complete README with all sub-commands and options is available in the GitHub Repository under tools/nbictl/README.md.

You can also explore the features using ./nbictl --help and
./nbictl [command] --help commands.

Here we will describe the most common uses of the tool.

generate generate-keys

To generate a Public/Private keypair, you can use nbictl as follows:

./nbictl generate-keys --org "my-organization.com"

generate auth-token

After configuring nbictl, you can use it to create a JWT token for authentication purposes as follows:

./nbictl generate-auth-token --audience="..."

Note: audience must be the full HTTPS url of the gRPC method, like https://nbi.$DOMAIN/aalyria.spacetime.api.nbi.v1alpha.NetOps/VersionInfo

Interacting with NBI Entities

  • Get an entity: Use this command to retrieve details of a specific entity by its ID and type. For example, you can fetch a network node:
./nbictl get --id="1234" --type="NETWORK_NODE"

This command retrieves the configuration or details of the network node with ID 1234.

  • Create Entities from Textproto: This command creates one or more entities using .textproto files that define the entity’s properties:
./nbictl create --files="path/to/entity_file.textproto"

For example, if you have a textproto file describing an antenna pattern, this command would create that entity in the system.

  • List all antenna patterns: Use this to list all entities of a specific type, like antenna patterns, which are commonly used in satellite communications:
./nbictl list --type="ANTENNA_PATTERN"

This will return a list of all antenna patterns stored in the system.

  • Edit an entity: This command opens a specified entity in your default text editor (as a .textproto file) for editing. Once you save the file, the changes are applied:
./nbictl edit --id="5678" --type="SERVICE_REQUEST"

This will let you modify a service request with ID 5678.