ODA Command Line Interface (CLI)
The ODA Command Line Interface package provides the user with a simple interface for accessing and querying different entities stored in the ODA.
Currently supported entity types (followed by the CLI abbreviation) are:
Scheduling Block Definitions (sbds)
Scheduling Block Instances (sbis)
Execution Blocks (ebs)
Projects (prjs)
Or run oda –help for a list of available entity types.
Configuration
ODA CLI is installed as part of the ska-db-oda package:
$ pip install ska-db-oda --extra-index-url=https://artefact.skao.int/repository/pypi-internal/simple
The CLI assumes ODA server is running at the address specified by ODA_URI environment variable. Set the variable, for example when deployed locally with k8s:
$ export ODA_URI=http://<minikube_ip>/<kube_namespace>/api/v1
Commands
ODA CLI command |
Parameters |
Description |
|
---|---|---|---|
get |
entity_id |
Get entity by ID, first specifying entity type. Example: oda sbis get sbi-mvp01-20200325-00001 |
|
query |
Query ODA for entity IDs. The query can be one of the folowing: |
||
user |
User query: Specify a name of the creator of the entity, set starts_with to True if only wanting to match the beginning of the user (False by default). |
||
starts_with |
|||
created_before |
Date created query: Specify a start and/or end date for when the entity was first created |
||
created_after |
|||
last_modified_before |
Date modified query: Specify a start and/or end date for when the entity was last modified. |
||
last_modified_after |