cli_argument
drunc.process_manager.interface.cli_argument
Functions:
add_query_options(at_least_one, all_processes_by_default=False)
Decorator to add query options to a click command, including session selection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
at_least_one
|
bool
|
If True, at least one query option must be provided. |
required |
all_processes_by_default
|
bool
|
If True, all processes will be selected by default if no query options are provided. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
Callable[[FC], FC]
|
A decorator function that adds query options to a click command. |
Source code in drunc/process_manager/interface/cli_argument.py
add_query_options_no_session(at_least_one, all_processes_by_default=False)
Decorator to add query options to a click command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
at_least_one
|
bool
|
If True, at least one query option must be provided. |
required |
all_processes_by_default
|
bool
|
If True, all processes will be selected by default if no query options are provided. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
Callable[[FC], FC]
|
A decorator function that adds query options to a click command. |
Source code in drunc/process_manager/interface/cli_argument.py
validate_conf_string(ctx, param, boot_configuration)
Validate the boot configuration string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
Context
|
The Click context. |
required |
param
|
Parameter
|
The Click parameter. |
required |
boot_configuration
|
str
|
The boot configuration string to validate. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The validated boot configuration string. |