MOS Command-Line Interface
Installation
Install the MOS command-line interface mosctl
by executing:
pip install mos-cli
Usage
usage: mosctl [-h] [--url URL] [--token TOKEN] {user,model} ...
Named Arguments
- --url
backend url (defaults to using env vars MOS_BACKEND_HOST and MOS_BACKEND_PORT)
- --token
user token (defaults to using env var MOS_BACKEND_TOKEN
Sub-commands:
user
user commands
mosctl user [-h] {get-token} ...
Sub-commands:
get-token
get user token
mosctl user get-token [-h] username password
Positional Arguments
- username
- password
model
model commands
mosctl model [-h] [--name NAME] [--id ID]
{delete,get-execution-log,get-source,get-status,get-variable-state,get-function-state,get-constraint-state,get-interface-file,get-interface-object,list,list-components,list-inputs,list-outputs,list-variables,list-functions,list-constraints,new,run,set-interface-file,set-interface-object}
...
Named Arguments
- --name
model name
- --id
model id
Sub-commands:
delete
delete model
mosctl model delete [-h]
get-execution-log
get model run execution log
mosctl model get-execution-log [-h]
get-source
get model source code
mosctl model get-source [-h]
get-status
get model status
mosctl model get-status [-h]
get-variable-state
get variable state
mosctl model get-variable-state [-h] var_name
Positional Arguments
- var_name
variable name
get-function-state
get function state
mosctl model get-function-state [-h] func_name
Positional Arguments
- func_name
function name
get-constraint-state
get constraint state
mosctl model get-constraint-state [-h] constr_name
Positional Arguments
- constr_name
constraint name
get-interface-file
get interface file
mosctl model get-interface-file [-h] file_name
Positional Arguments
- file_name
name of interface file
get-interface-object
get interface object
mosctl model get-interface-object [-h] obj_name
Positional Arguments
- obj_name
name of interface object
list
list models
mosctl model list [-h]
list-components
list all model components
mosctl model list-components [-h]
list-inputs
list model inputs
mosctl model list-inputs [-h]
list-outputs
list model outputs
mosctl model list-outputs [-h]
list-variables
list model variables
mosctl model list-variables [-h]
list-functions
list model functions
mosctl model list-functions [-h]
list-constraints
list model constraints
mosctl model list-constraints [-h]
new
create new model from file
mosctl model new [-h] model_file_path
Positional Arguments
- model_file_path
path to model file
run
run model
mosctl model run [-h] [--non-blocking] [--poll_time POLL_TIME]
Named Arguments
- --non-blocking
model run without blocking command execution
Default: False
- --poll_time
polling time in seconds when blocking
Default: 1
set-interface-file
set model interface file
mosctl model set-interface-file [-h] file_name file_path
Positional Arguments
- file_name
name of interface file
- file_path
path to interface file
set-interface-object
set model interface object
mosctl model set-interface-object [-h] obj_name obj_data
Positional Arguments
- obj_name
name of interface object
- obj_data
interface object data