https://github.com/kernelci/kernelci-admin
KernelCI admin tools
https://github.com/kernelci/kernelci-admin
Last synced: about 1 year ago
JSON representation
KernelCI admin tools
- Host: GitHub
- URL: https://github.com/kernelci/kernelci-admin
- Owner: kernelci
- License: lgpl-2.1
- Created: 2018-05-09T08:23:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T15:50:56.000Z (about 7 years ago)
- Last Synced: 2025-01-27T10:11:31.490Z (over 1 year ago)
- Language: Python
- Size: 24.4 KB
- Stars: 2
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# KernelCI Admin Tools
This Python 3 tool can be used to perform various KernelCI admin operations,
such as managing API tokens.
## Settings
A `_settings.py` module needs to be created with settings for various hosts
running KernelCI back-end or front-end instances. You can copy
`_sample_settings.py` as `_settings.py` and adjust it as required.
## Usage
The `kci` tool has a number of available commands to perform various operations
with a KernelCI backend API. It provides a help message with the list of all
these commands when simply running `kci`:
```
Usage:
kci COMMAND
To get command-specific command help:
kci COMMAND --help
Available commands:
add_lab Create a lab entry
list_labs List all the existing labs
remove_lab Remove lab entry
add_token Create a user API token
list_tokens List all the existing tokens
remove_token Remove user API token
```
Each command will also require some options. Typically, commands need at least
a `--host=HOSTNAME` option to specify which KernelCI API you want to be
interacting with. The name passed to the `--host` option is used to look up
information in the `_settings.py` module.
To get detailed help for any command, use the `--help` option:
```
$ ./kci add_lab --help
usage: kci [-h] --host {localhost} [--dry] --lab-name LAB_NAME --first-name
FIRST_NAME --last-name LAST_NAME --email EMAIL
Create a lab entry
optional arguments:
-h, --help show this help message and exit
--host {localhost} Hostname of the API server
--dry Dry run, do not send any request
--lab-name LAB_NAME Name of the lab i.e. lab-something
--first-name FIRST_NAME
First name of the contact person
--last-name LAST_NAME
Last name of the contact person
--email EMAIL Email address of the contact person
```