This repository contains a command-line client to the Resource Allocator project. Main features:
- user creation and logging in with token caching
- create, list, get, update, delete all object types
Install using build and pip:
pip install build
pip install .
The application can be executed as a Python runnable module or as a standalone command-line application:
usage: resource_allocator_client [-h] -s SERVER -e EMAIL [-p PASSWORD] [-a]
{register,login,list,get,create,delete,update,query}
...
Command-line client to query the Resource-Allocator API application
options:
-h, --help show this help message and exit
-s SERVER, --server SERVER
Server address
-e EMAIL, --email EMAIL
User email
-p PASSWORD, --password PASSWORD
User password. Leave blank for interactive entry
-a, --azure-login Log-in via Azure AD
subcommands:
{register,login,list,get,create,delete,update,query}
Each subcommand - register, login ,list, get, create, update, query has its own additional arguments such as id or KEY=VALUE pairs.
usage: resource_allocator_client register [-h] [KEY=VALUE ...]
positional arguments:
KEY=VALUE Key-value pairs to create, update or query
options:
-h, --help show this help message and exit
usage: resource_allocator_client list [-h]
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
positional arguments:
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
options:
-h, --help show this help message and exit
usage: resource_allocator_client get [-h]
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id
positional arguments:
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id ID of the item
options:
-h, --help show this help message and exit
usage: resource_allocator_client create [-h]
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
[KEY=VALUE ...]
positional arguments:
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
KEY=VALUE Key-value pairs to create, update or query
options:
-h, --help show this help message and exit
usage: resource_allocator_client delete [-h]
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id
positional arguments:
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id ID of the item
options:
-h, --help show this help message and exit
usage: resource_allocator_client update [-h]
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id [KEY=VALUE ...]
positional arguments:
{resources,resource_groups,resource_to_group,iterations,requests,allocation}
id ID of the item
KEY=VALUE Key-value pairs to create, update or query
options:
-h, --help show this help message and exit
Some attributes are handled in a different way depending on the key used. The keys are not limited to an action or to a resource type:
- image - the input is a path to an image file. It is read and encoded in base64 before being sent to the server
New functionality should be added via creating feature or bug fix branches and issuing a pull
request. Any new functionality should come with unit tests written with the built-in unittest
library.
- Planning
- Prototype
- In Development
- In Production
- Unsupported
- Retired
README based on https://www.makeareadme.com/