Manage Panels¶
Data Type¶
You can manage panels by specifying panel
as <dataType>
in the SEAL OP-CLI call:
opcli panel <command> <option>
Display the Options and Parameters¶
By specifying the --help
option, you get the available options and parameters for the panel
data type:
opcli panel --help
Create a Panel¶
With the create
command, you create a panel:
opcli panel create <name> --service-id <serviceId> [--metadata <metadata>] [--owner <owner>] [--task-id <taskId>] [--type <type>]
-
<name>
: Name of the panel; mandatory -
--metadata <metadata>
: Metadata in JSON syntax, for example, `'{"metadata1":"value1"}'`` -
--owner <owner>
: Account name of the user who is to be the owner of the task -
--service-id <serviceId>
: Type of the panel to be created; available values:operator-p4
and other connectors possibly configured in SEAL Operator; mandatory -
--task-id <taskId>
: ID of the task to be add to the created panel -
--type <type>
: Panel type; mandatory if the connector supports multiple types, for example, theoperator-dpf
connector
Example - create an empty panel named panel1
for the operator-p4
connector
opcli panel create panel1 --service-id operator-p4
Example - create an panel named panel2
for the operator-p4
connector containing the specified task
opcli panel create panel2 --service-id operator-p4 --task-id 412a4a42-c48b-4d66-a3b6-8fecb13f38dc
Example - create an empty panel named Convert
for the convert
type of the operator-dpf
connector
opcli panel create Convert --service-id operator-dpf --type convert
Get the Data of a Panel¶
With the get
command, you get the metadata of a panel. The metadata are output as JSON object on STDOUT.
opcli panel get <panelId>
-
<panelId>
: ID of the panel; mandatoryHint - pid
The panel ID is the value of the
pid
setting and output when the panel is created, for example,"pid":"a2b9bb1b-9b8c-4df2-9b8b-0550aa16770e"
.
Example - get the metadata of the panel with the ID a2b9bb1b-9b8c-4df2-9b8b-0550aa16770e
opcli panel get a2b9bb1b-9b8c-4df2-9b8b-0550aa16770e
Get the Metadata of All Panels¶
With the list
command, you get the metadata of all panels. You can filter the panels by arbitrary metadata. The metadata are output as JSON object on STDOUT.
opcli panel list [-q,--queue <key>=<value>]*
-q,--queue <key>=<value>
: Arbitrary filter parameter; regular expressions are supported; the option can be specified several times; default: none
Example - get the metadata of all panels
opcli panel list
Example - get the metadata of all panels with serviceId
=operator-p5
and name
starting with Hoho
opcli panel list -q "serviceId=operator-p5" -q name=/^Hoho/
Replace or Delete the Metadata of a Panel¶
With the replace-meta
command, you replace the metadata of a panel. The existent metadata are deleted and the specified metadata are set. For deleting the existent metadata, specify an empty JSON object as metadata. However, name
has to be specified at least.
opcli panel replace-meta <panelId> --file <file>|--metadata <metadata>
-
<panelId>
: ID of the panel; mandatory -
--file <file>
: Path and name of a file containing the new data as JSON object -
--metadata <metadata>
: New data in JSON syntax, for example, `'{"name":"new_name"}'``
Example - rename the panel
opcli panel replace-meta a2b9bb1b-9b8c-4df2-9b8b-0550aa16770e --metadata '{"name":"<new_name>"}'
Example - replace the data of the panel by the metadata specified in the metadata.json
file
opcli panel replace-meta a2b9bb1b-9b8c-4df2-9b8b-0550aa16770e --file metadata.json