Skip to main content

A CLI for knotapi.

Project description

knotctl

This is a commandline tool for knotapi: https://gitlab.nic.cz/knot/knot-dns-rest

Build and install

To install using pip, run the following command in a virtual envrionment.

python -m pip install "knotctl @ git+https://code.smolnet.org/micke/knotctl

To build and install as a deb-package

sudo apt install python3-stdeb
git clone https://code.smolnet.org/micke/knotctl
cd knotctl
python3 setup.py --command-packages=stdeb.command bdist_deb
sudo dpkg -i deb_dist/knotctl_*_all.deb

A prebuilt deb-package is also available from the release page: https://code.smolnet.org/micke/knotctl/releases/

Shell completion

For bash: add this to .bashrc

source <(knotctl completion)

For fish, run:

knotctl completion --shell fish > ~/.config/fish/completions/knotctl.fish

For tcsh: add this to .cshrc

complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ;

For zsh: add this to .zshrc

autoload -U bashcompinit
bashcompinit
source <(knotctl completion)

Usage

usage: knotctl [-h] [--json | --no-json]
               {add,completion,config,delete,list,update} ...

positional arguments:
  {add,completion,config,delete,list,update}

options:
  -h, --help            show this help message and exit
  --json, --no-json

ADD

usage: knotctl add [-h] -d DATA -n NAME -r RTYPE [-t TTL] -z ZONE

options:
  -h, --help            show this help message and exit
  -d DATA, --data DATA
  -n NAME, --name NAME
  -r RTYPE, --rtype RTYPE
  -t TTL, --ttl TTL
  -z ZONE, --zone ZONE

COMPLETION

usage: knotctl completion [-h] [-s SHELL]

options:
  -h, --help            show this help message and exit
  -s SHELL, --shell SHELL

CONFIG

usage: knotctl config [-h] [-c CONTEXT] [-b BASEURL] [-p PASSWORD] [-u USERNAME]

options:
  -h, --help            show this help message and exit
  -c CONTEXT, --context CONTEXT
  -b BASEURL, --baseurl BASEURL
  -p PASSWORD, --password PASSWORD
  -u USERNAME, --username USERNAME

DELETE

usage: knotctl delete [-h] [-d DATA] [-n NAME] [-r RTYPE] -z ZONE

options:
  -h, --help            show this help message and exit
  -d DATA, --data DATA
  -n NAME, --name NAME
  -r RTYPE, --rtype RTYPE
  -z ZONE, --zone ZONE

LIST

usage: knotctl list [-h] [-d DATA] [-n NAME] [-r RTYPE] [-z ZONE]

options:
  -h, --help            show this help message and exit
  -d DATA, --data DATA
  -n NAME, --name NAME
  -r RTYPE, --rtype RTYPE
  -z ZONE, --zone ZONE

UPDATE

usage: knotctl update [-h] -a [ARGUMENT ...] -d DATA -n NAME -r RTYPE [-t TTL]
                      -z ZONE

options:
  -h, --help            show this help message and exit
  -a [ARGUMENT ...], --argument [ARGUMENT ...]
                        Specify key - value pairs to be updated:
                        name=dns1.example.com.
  -d DATA, --data DATA
  -n NAME, --name NAME
  -r RTYPE, --rtype RTYPE
  -t TTL, --ttl TTL
  -z ZONE, --zone ZONE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knotctl-0.0.7.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knotctl-0.0.7-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file knotctl-0.0.7.tar.gz.

File metadata

  • Download URL: knotctl-0.0.7.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for knotctl-0.0.7.tar.gz
Algorithm Hash digest
SHA256 064054c425eda4dd7b34ce5c44c932abc64c649418de29560a899a7ac05d21c8
MD5 293e5d696b4bdb369f2c105e70e145e1
BLAKE2b-256 f5905249d0d822a5adfe82671d3c1e854b236c927af06b5ce4c83ac6c9621497

See more details on using hashes here.

File details

Details for the file knotctl-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: knotctl-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for knotctl-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b375bf59ccfe3cff9a4bc2c8734765e3915194033aa1df018212de7cf3300520
MD5 305753be7462c2e3e92d4f6b616e9dec
BLAKE2b-256 5b016ccfa24e0bef80c61c239bd33273a70f4cd96cab3c7682593ad091d41540

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page