Weaver CLI and Client
Once Weaver package is installed (see Installation), it provides a command line interface (CLI)
as well as a Python weaver.cli.WeaverClient
to allow simplified interactions through shell calls or
Python scripts.
This offers to the user methods to use file references (e.g.: local CWL Application Package definition) to rapidly operate with functionalities such as Deploy, Describe, Execute and any other operation described in Managing processes included in Weaver ADES/EMS section.
Please refer to following sections for more details.
Python Client Commands
For details about using the Python weaver.cli.WeaverClient
, please refer directly to its class
documentation and its underlying methods.
Shell CLI Commands
Following are the detail for the shell CLI which provides the same features.
Run Weaver operations.
usage: weaver [-h] [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[--version]
{deploy,undeploy,capabilities,processes,describe,execute,jobs,monitor,dismiss,status,results,upload}
...
Optional Arguments
- --version, -V
Display the version of the package.
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Operations
Name of the operation to run.
- operation
Possible choices: deploy, undeploy, capabilities, processes, describe, execute, jobs, monitor, dismiss, status, results, upload
Sub-commands:
deploy
Deploy a process.
weaver deploy [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
[-p PROCESS_ID] [-b BODY] [--cwl CWL | --wps WPS] [-t TOKEN]
[-U USERNAME] [-P PASSWORD] [-D]
Optional Arguments
- -U, --username
Username to compute the authentication token for Docker image retrieval from a private registry.
- -P, --password
Password to compute the authentication token for Docker image retrieval from a private registry.
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -p, --id, --process
Process identifier for deployment. If no
--body
is provided, this is required. Otherwise, provided value overrides the corresponding ID in the body.- -b, --body
Deployment body directly provided. Allows both JSON and YAML format when using file reference. If provided in combination with process ID or CWL, they will override the corresponding content. Can be provided either with a local file, an URL or literal string contents formatted as JSON.
- --cwl
Application Package of the process defined using Common Workflow Language (CWL) as JSON or YAML format when provided by file reference. File reference can be a local file or URL location. Can also be provided as literal string contents formatted as JSON. Provided contents will be inserted into an automatically generated request deploy body if none was specified with
--body
option (note:--process
must be specified instead in that case). Otherwise, it will override the appropriate execution unit section within the provided deploy body.- --wps
Reference URL to a specific process under a Web Processing Service (WPS) to package as OGC-API Process.
- -t, --token
Authentication token to retrieve a Docker image reference from a private registry during execution.
- -D, --delete, --undeploy
Perform undeploy step as applicable prior to deployment to avoid conflict with exiting process.
Default: False
undeploy
Undeploy an existing process.
weaver undeploy [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
-p PROCESS_ID
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
- -p, --id, --process
Identifier of the process to run undeploy operation.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
capabilities (processes)
List available processes.
weaver capabilities [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
describe
Obtain an existing process description.
weaver describe [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
-p PROCESS_ID [-S {OGC,OLD}]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
- -p, --id, --process
Identifier of the process to run describe operation.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -S, --schema
Possible choices: OGC, OLD
Representation schema of the returned process description.
Default: “OGC”
execute
Submit a job execution for an existing process.
weaver execute [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
-p PROCESS_ID -I INPUTS [-R REFERENCE] [-M] [-T TIMEOUT]
[-W INTERVAL]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
- -p, --id, --process
Identifier of the process to run execute operation.
- -I, --inputs
Literal input definitions, or a file path or URL reference to JSON or YAML contents defining job inputs with OGC-API or CWL schema. This parameter is required.
To provide inputs using a file reference, refer to relevant CWL Job schema or API request schema for selected format. Both mapping and listing formats are supported.
To execute a process without any inputs (e.g.: using its defaults), supply an explicit empty input (i.e.:
-I ""
or loaded from JSON/YAML file as{}
).To provide inputs using literal command-line definitions, inputs should be specified using
<id>=<value>
convention, with distinct-I
options for each applicable input value.Values that require other type than string to be converted for job submission can include the data type following the ID using a colon separator (i.e.:
<id>:<type>=<value>
). For example, an integer could be specified as follows:number:int=1
while a floating point number would be:number:float=1.23
.File references (
href
) should be specified usingFile
as the type (i.e.:input:File=http://...
). Note thatFile
in this case is expected to be an URL location where the file can be download from. When a local file is supplied, Weaver will automatically convert it to a remote Vault File in order to upload it at the specified URL location and make it available for the remote process.Array input (
maxOccurs > 1
) can be specified using semicolon (;) separated values after the input ID. The type of an element-wise item of this array can also be provided (i.e.:arrayInput:int=1;2;3
). Alternatively, the same input ID can be repeated over many-I
options each providing an element of the multi-value array to be formed.Additional parameters can be specified following any
<value>
using any amount of@<param>=<info>
specifiers. Those will be added to the inputs body submitted for execution. This can be used, amongst other things, to provide a file’smediaType
orencoding
details. When using array values, each value in the array can take@
parameters independently.Any value that contains special separator characters (:;@) must URL-encoded (%XX) to avoid invalid parsing.
Example:
-I message='Hello Weaver' -I value:int=1234 -I file:File=data.xml@mediaType=text/xml
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -R, --ref, --reference
Indicates which outputs by ID to be returned as HTTP Link header reference instead of body content value. This defines the output transmission mode when submitting the execution request.
With reference transmission mode, outputs that contain literal data will be linked by
text/plain
file containing the data. Outputs that refer to a file reference will simply contain that URL reference as link.With value transmission mode (default behavior when outputs are not specified in this list), outputs are returned as direct values (literal or href) within the response content body.
When requesting any output to be returned by reference, option
-H/--headers
should be considered as well to return the providedLink
headers for these outputs on the command line.Example:
-R output-one -R output-two
- -M, --monitor
Automatically perform the monitoring operation following job submission to retrieve final results. If not requested, the created job status location is directly returned.
Default: False
- -T, --timeout
Wait timeout (seconds) of the maximum monitoring duration of the job execution (default: 60s). If this timeout is reached but job is still running, another call directly to the monitoring operation can be done to resume monitoring. The job execution itself will not stop in case of timeout.
Default: 60
- -W, --wait, --interval
Wait interval (seconds) between each job status polling during monitoring (default: 5s).
Default: 5
jobs
Obtain listing of registered jobs.
weaver jobs [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
[-P PAGE] [-N LIMIT]
[-S {failed,unknown,accepted,successful,succeeded,exception,running,paused,started,dismissed}]
[-D] [-G]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -P, --page
Specify the paging index for listing jobs.
- -N, --number, --limit
Specify the amount of jobs to list per page.
- -S, --status
Possible choices: failed, unknown, accepted, successful, succeeded, exception, running, paused, started, dismissed
Filter job listing only to matching status.
- -D, --detail
Obtain detailed job descriptions.
Default: False
- -G, --groups
Obtain grouped representation of jobs per provider and process categories.
Default: False
monitor
Monitor a pending or running job execution until completion or up to a maximum wait time.
weaver monitor [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] [-u URL] -j JOB_REFERENCE [-T TIMEOUT] [-W INTERVAL] [-L]
[-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
Required Arguments
- -j, --job
Job URL or UUID to run monitor operation. If full Job URL is provided, the instance
--url
parameter can be omitted.
Optional Arguments
- -u, --url
URL of the instance to run operations.
- -T, --timeout
Wait timeout (seconds) of the maximum monitoring duration of the job execution (default: 60s). If this timeout is reached but job is still running, another call directly to the monitoring operation can be done to resume monitoring. The job execution itself will not stop in case of timeout.
Default: 60
- -W, --wait, --interval
Wait interval (seconds) between each job status polling during monitoring (default: 5s).
Default: 5
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
dismiss
Dismiss a pending or running job, or wipe any finished job results.
weaver dismiss [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] [-u URL] -j JOB_REFERENCE [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -j, --job
Job URL or UUID to run dismiss operation. If full Job URL is provided, the instance
--url
parameter can be omitted.
Optional Arguments
- -u, --url
URL of the instance to run operations.
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
status
Obtain the status of a job using a reference UUID or URL. This is equivalent to doing a single-shot ‘monitor’ operation without any pooling or retries.
weaver status [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] [-u URL] -j JOB_REFERENCE [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -j, --job
Job URL or UUID to run status operation. If full Job URL is provided, the instance
--url
parameter can be omitted.
Optional Arguments
- -u, --url
URL of the instance to run operations.
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
results
Obtain the output results from a job successfully executed. This operation can also download them from the remote server if requested.
weaver results [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] [-u URL] -j JOB_REFERENCE [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
[-D] [-O OUT_DIR]
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -j, --job
Job URL or UUID to run results operation. If full Job URL is provided, the instance
--url
parameter can be omitted.
Optional Arguments
- -u, --url
URL of the instance to run operations.
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -D, --download
Download all found job results file references to output location. If not requested, the operation simply displays the job results (default: False).
Default: False
- -O, --outdir
Output directory where to store downloaded files from job results if requested (default: ${CURDIR}/{JobID}/<outputs.files>).
upload
Upload a local file to the remote server vault for reference in process execution inputs. This operation is accomplished automatically for all execution inputs submitted using local files. [note: feature only available for Weaver instances]
weaver upload [--stdout] [--log LOG]
[--quiet | --debug | --verbose | --log-level {DEBUG,ERROR,INFO,WARN,debug,error,info,warn}]
[-h] -u URL [-L] [-H]
[-F {json,json+raw,json+str,text,txt,xml,xml+raw,xml+str,yaml,yml}]
[-c CONTENT_TYPE] -f FILE
Logging Options
Options that configure output logging.
- --stdout
Enforce logging to stdout for display in console.
Default: False
- --log, --log-file
Output file to write generated logs.
- --quiet, -q
Do not output anything else than error.
Default: False
- --debug, -d
Enable extra debug logging.
Default: False
- --verbose, -v
Output informative logging details.
Default: False
- --log-level, -l
Possible choices: DEBUG, ERROR, INFO, WARN, debug, error, info, warn
Explicit log level to employ (default: None).
Required Arguments
- -u, --url
URL of the instance to run operations.
- -f, --file
Local file path to upload to the vault.
Optional Arguments
- -L, --no-links
Remove “links” section from returned result body.
Default: True
- -H, --headers
Return response headers additionally to the result body.
Default: False
- -F, --format
Possible choices: json, json+raw, json+str, text, txt, xml, xml+raw, xml+str, yaml, yml
Select an alternative output representation (default: json+str).
json: Representation as JSON (object), which can still be manipulated in code.
json+raw: Representation as JSON content formatted as raw string without any indentation or newlines.
json+str: Representation as JSON content formatted as string with indentation and newlines.
text: Representation as plain text content without any specific reformatting or validation.
txt: Representation as plain text content without any specific reformatting or validation.
xml: Representation as XML content formatted as serialized string.
xml+raw: Representation as XML content formatted as raw string without indentation or newlines.
xml+str: Representation as XML content formatted as string with indentation and newlines.
yaml: Representation as YAML content formatted as string with indentation and newlines.
yml: Alias to YAML.
- -c, --content-type
Content-Type of the file to apply. This should be an IANA Media-Type, optionally with additional parameters such as charset. If not provided, attempts to guess it based on the file extension.
CLI and Client Examples
Following sections present different typical usage of the Shell CLI Commands and Python Client Commands. Operations are equivalent between the CLI and Python client.
Note that more operations and option parameters are available, and are not all necessarily represented in below examples.
For each of the following examples, the client is created as follows:
client = WeaverClient(url="{WEAVER_URL}")
Deploy Example
Todo
example
Undeploy Example
Todo
example
GetCapabilities Example
Accomplishes the GetCapabilities request to obtain a list of available Process.
weaver capabilities -u {WEAVER_URL}
client.capabilities()
Sample Output:
{
"description": "Listing of available processes successful.",
"processes": [
"docker-demo-cat",
"docker-python-script",
"Echo",
"file_index_selector",
"file2string_array",
"image-utils",
"jsonarray2netcdf",
"las2tif",
"metalink2netcdf",
"sleep"
],
"page": 0,
"total": 25
}
DescribeProcess Example
Accomplishes the DescribeProcess request to obtain the Process definition.
weaver describe -u {WEAVER_URL} -p jsonarray2netcdf
client.describe("jsonarray2netcdf")
Sample Output:
{
"id": "jsonarray2netcdf",
"title": "JSON array to NetCDF",
"version": "1.1",
"abstract": "Extracts and fetches NetCDF files from a JSON file containing an URL string array, and provides them on the output directory.",
"keywords": [],
"metadata": [],
"inputs": {
"input": {
"title": "input",
"formats": [
{
"mimeType": "application/json",
"default": true
}
],
"minOccurs": "1",
"maxOccurs": "1"
}
},
"outputs": {
"output": {
"title": "output",
"formats": [
{
"mimeType": "application/x-netcdf",
"default": true
}
]
}
},
"visibility": "public",
"processEndpointWPS1": "http://localhost:4002/wps",
"processDescriptionURL": "http://localhost:4002/processes/jsonarray2netcdf/jobs",
"executeEndpoint": "http://localhost:4002/processes/jsonarray2netcdf/jobs",
"links": [
{
"type": "application/json",
"title": "Process description.",
"hreflang": "en-CA",
"href": "http://localhost:4002/processes/jsonarray2netcdf",
"rel": "self"
},
{
"type": "application/json",
"title": "Process description.",
"hreflang": "en-CA",
"href": "http://localhost:4002/processes/jsonarray2netcdf",
"rel": "process-desc"
},
{
"type": "application/json",
"title": "Process execution endpoint for job submission.",
"hreflang": "en-CA",
"href": "http://localhost:4002/processes/jsonarray2netcdf/execution",
"rel": "execute"
},
{
"type": "application/json",
"title": "List of registered processes.",
"hreflang": "en-CA",
"href": "http://localhost:4002/processes",
"rel": "collection"
},
{
"type": "application/xml",
"title": "Service definition.",
"hreflang": "en-CA",
"href": "http://localhost:4002/ows/wps?service=WPS&request=GetCapabilities",
"rel": "service-desc"
}
]
}
Execute Example
Accomplishes the Execute request to obtain launch a Job with the specified Process and provided inputs.
Todo
example
Dismiss Example
Todo
example
GetStatus Example
Todo
example
Monitor Example
Todo
example
Results Example
Todo
example
Upload Example
This operation allows manual upload of a local file to the Vault.
Note
When running the execute operation, any detected local file reference will be automatically uploaded as Vault file in order to make it available for the remote Weaver server for Process execution.
See also
File Vault Inputs and Uploading File to the Vault provide more details about this feature.
weaver upload -u {WEAVER_URL} -f /path/to/file.txt
client.upload("/path/to/file.txt")
Sample Output:
{
"description": "File successfully uploaded to vault.",
"access_token": "<ACCESS_TOKEN>",
"file_id": "e337a830-dbd6-4915-90ef-bfd46e237a3e",
"file_href": "vault://e337a830-dbd6-4915-90ef-bfd46e237a3e"
}