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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
064054c425eda4dd7b34ce5c44c932abc64c649418de29560a899a7ac05d21c8
|
|
| MD5 |
293e5d696b4bdb369f2c105e70e145e1
|
|
| BLAKE2b-256 |
f5905249d0d822a5adfe82671d3c1e854b236c927af06b5ce4c83ac6c9621497
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b375bf59ccfe3cff9a4bc2c8734765e3915194033aa1df018212de7cf3300520
|
|
| MD5 |
305753be7462c2e3e92d4f6b616e9dec
|
|
| BLAKE2b-256 |
5b016ccfa24e0bef80c61c239bd33273a70f4cd96cab3c7682593ad091d41540
|