Command line utility to view and test Tango

Published  . 0 views
↓ Download
Command line utility to view and test Tango
1 / 1
Command line utility to view and test Tango - slide 1 of 37 Command line utility to view and test Tango - slide 2 of 37 Command line utility to view and test Tango - slide 3 of 37 Command line utility to view and test Tango - slide 4 of 37 Command line utility to view and test Tango - slide 5 of 37 Command line utility to view and test Tango - slide 6 of 37 Command line utility to view and test Tango - slide 7 of 37 Command line utility to view and test Tango - slide 8 of 37 Command line utility to view and test Tango - slide 9 of 37 Command line utility to view and test Tango - slide 10 of 37 Command line utility to view and test Tango - slide 11 of 37 Command line utility to view and test Tango - slide 12 of 37 Command line utility to view and test Tango - slide 13 of 37 Command line utility to view and test Tango - slide 14 of 37 Command line utility to view and test Tango - slide 15 of 37 Command line utility to view and test Tango - slide 16 of 37 Command line utility to view and test Tango - slide 17 of 37 Command line utility to view and test Tango - slide 18 of 37 Command line utility to view and test Tango - slide 19 of 37 Command line utility to view and test Tango - slide 20 of 37 Command line utility to view and test Tango - slide 21 of 37 Command line utility to view and test Tango - slide 22 of 37 Command line utility to view and test Tango - slide 23 of 37 Command line utility to view and test Tango - slide 24 of 37 Command line utility to view and test Tango - slide 25 of 37 Command line utility to view and test Tango - slide 26 of 37 Command line utility to view and test Tango - slide 27 of 37 Command line utility to view and test Tango - slide 28 of 37 Command line utility to view and test Tango - slide 29 of 37 Command line utility to view and test Tango - slide 30 of 37 Command line utility to view and test Tango - slide 31 of 37 Command line utility to view and test Tango - slide 32 of 37 Command line utility to view and test Tango - slide 33 of 37 Command line utility to view and test Tango - slide 34 of 37 Command line utility to view and test Tango - slide 35 of 37 Command line utility to view and test Tango - slide 36 of 37 Command line utility to view and test Tango - slide 37 of 37
Description: Command line utility to view and test Tango devices 38th Tango Community Meeting Johan Coetzer May 2024 Johan.coetzertsolo.io Tango utilities What is currently available? Jive itango3 tangoadmin The Jive graphical tool Uses JDK Great for

Related Topics

Download Presentation

"Command line utility to view and test Tango" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Command line utility to view and test Tango devices 38th Tango Community Meeting Johan Coetzer May 2024
Johan.coetzer@tsolo.io<br>
slide2. Tango utilities What is currently available?
Jive
itango3
tango_admin<br>
slide3. The Jive graphical tool Uses JDK
Great for debugging
Very useful, with lots of info
Lots of things to click on as well<br>
slide4. The Jive graphical tool Uses JDK
Great for debugging
Very useful, with lots of info
Lots of things to click on as well<br>
slide5. Written in Python, part of distribution
Very useful, with the same info, if you know where to look
Requires some knowledge of Tango The interactive Tango client<br>
slide6. Written in Python, part of distribution
Intended for admin purposes, not obtaining information
Limited in scope (and usefulness as a general purpose tool)
Mostly intended for use in bash or other scripts
Does not always show the result of an operation, one has to check the return value Tango admin utility<br>
slide7. New command line utility Read all namespaces in Kubernetes cluster
Get FQDN or IP address of Tango database server
Read all Tango devices
Filter Tango devices by name
Find devices with a given attribute, command or property
Display information in the following formats
List with name and status for each device
Full description of device
Shortened description
Names of attribute, command or property only<br>
slide8. New command line utility Output
Markdown format
JSON format
YAML format
Filter by attribute, command and property
Partial or full match
Make it general purpose for the wider Tango community
No hard-coded attribute or command names<br>
slide9. Why? Uses:
High level troubleshooting
Jupyter Notebooks
Taranta dashboards
Unit and/or BDD testing<br>
slide10. How? Demo:
Help facility
Read Kubernetes namespaces
Read database server
Read device names
Filter by attribute, command and property
Display formats<br>
slide11. Display formats Plain text
In columns
JSON
YAML
Markdown
HTML
Experimental<br>
slide12. How? Install with pip:
pip install --user --extra-index-url=https://artefact.skao.int/repository/pypi-internal ska-tangoctl
Documentation:
https://developer.skao.int/projects/ska-tangoctl/en/latest/
Code is available from:
https://gitlab.com/ska-telescope/ska-tangoctl<br>
slide13. Configuration file Configuration file format:
{
"cluster_domain": "miditf.internal.skao.int",
"databaseds_name": "tango-databaseds",
"databaseds_port": 10000,
"device_port": 45450,
"run_commands": ["QueryClass", "QueryDevice", "QuerySubDevice", "GetVersionInfo", "State", "Status"],
"run_commands_name": ["DevLockStatus", "DevPollStatus", "GetLoggingTarget"],
"long_attributes": ["internalModel", "transformedInternalModel"],
"ignore_device": ["sys", "dserver"],
"min_str_len": 4,
"delimiter": ",",
"list_items" : {
"attributes" : [["adminMode", "10"], ["version", "10"]],
"commands": [["State", "10"], ["Status", 30]]
},
"list_values" : {
"attributes": ["adminMode", "versionId"],
"commands": ["Status", "State"]
}
}<br>
slide14. Read pods in Kubernetes namespace $ tangoctl -K integration -o
ds-archiver-cm-01-0
root 1 0 0 Feb28 ? 00:05:11 hdbppcm-srv 01 -ORBendPoint giop:tcp::45450 -ORBendPointPublish
giop:tcp:ds-archiver-cm-01.integration.svc.miditf.internal.skao.int:45450
ds-archiver-es-01-0
root 1 0 0 Feb28 ? 00:08:26 hdbppes-srv 01 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-archiver-es-01.integration.svc.miditf.internal.skao.int:45450
ds-cbfcontroller-controller-0
* tango 1 0 0 Feb28 ? 00:10:06 /usr/bin/python3.10 /usr/local/bin/CbfController controller -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-cbfcontroller-controller.integration.svc.miditf.internal.skao.int:45450
ds-cbfsubarray-cbfsubarray-01-0
* tango 1 0 0 Feb28 ? 00:04:49 /usr/bin/python3.10 /usr/local/bin/CbfSubarray cbfsubarray-01 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-cbfsubarray-cbfsubarray-01.integration.svc.miditf.internal.skao.int:45450
ds-cbfsubarray-cbfsubarray-02-0
* tango 1 0 0 Feb28 ? 00:05:16 /usr/bin/python3.10 /usr/local/bin/CbfSubarray cbfsubarray-02 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-cbfsubarray-cbfsubarray-02.integration.svc.miditf.internal.skao.int:45450
ds-cbfsubarray-cbfsubarray-03-0
* tango 1 0 0 Feb28 ? 00:03:14 /usr/bin/python3.10 /usr/local/bin/CbfSubarray cbfsubarray-03 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-cbfsubarray-cbfsubarray-03.integration.svc.miditf.internal.skao.int:45450
ds-centralnode-01-0
* tango 1 0 1 Feb28 ? 03:29:20 python3 /central_node_mid.py 01 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-centralnode-01.integration.svc.miditf.internal.skao.int:45450

...<br>
slide15. Read pods in Kubernetes namespace (JSON) $ tangoctl -K integration -oj
{
"ds-talonlru-talonlru-004-0": [
"tango 1 0 0 Feb28 ? 00:05:17 /usr/bin/python3.10 /usr/local/bin/TalonLRU talonlru-004 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-talonlru-talonlru-004.integration.svc.miditf.internal.skao.int:45450"
],
"ds-tangotest-test-0": [
"tango 1 0 0 Feb28 ? 02:17:33 /usr/local/bin/TangoTest test -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-tangotest-test.integration.svc.miditf.internal.skao.int:45450"
],
"ds-vcc-vcc-001-0": [
"tango 1 0 0 Feb28 ? 00:08:42 /usr/bin/python3.10 /usr/local/bin/VccMulti vcc-001 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-vcc-vcc-001.integration.svc.miditf.internal.skao.int:45450"
],
"ds-vcc-vcc-002-0": [
"tango 1 0 0 Feb28 ? 00:07:42 /usr/bin/python3.10 /usr/local/bin/VccMulti vcc-002 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-vcc-vcc-002.integration.svc.miditf.internal.skao.int:45450"
],
"ds-vcc-vcc-003-0": [
"tango 1 0 0 Feb28 ? 00:08:04 /usr/bin/python3.10 /usr/local/bin/VccMulti vcc-003 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-vcc-vcc-003.integration.svc.miditf.internal.skao.int:45450"
],
"ds-vcc-vcc-004-0": [
"tango 1 0 0 Feb28 ? 00:08:13 /usr/bin/python3.10 /usr/local/bin/VccMulti vcc-004 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-vcc-vcc-004.integration.svc.miditf.internal.skao.int:45450"
],
...<br>
slide16. Read pods in Kubernetes namespace (YAML) $ tangoctl -K integration -oy
ds-dishleafnode-036-0:
- tango 1 0 0 14:44 ? 00:00:12 python3 /dish_leaf_node.py 036
-ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-dishleafnode-036.integration.svc.miditf.internal.skao.int:45450
ds-dishleafnode-063-0:
- tango 1 0 0 14:44 ? 00:00:14 python3 /dish_leaf_node.py 063
-ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-dishleafnode-063.integration.svc.miditf.internal.skao.int:45450
ds-dishleafnode-100-0:
- tango 1 0 0 14:44 ? 00:00:12 python3 /dish_leaf_node.py 100
-ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-dishleafnode-100.integration.svc.miditf.internal.skao.int:45450
ds-fsp-fsp-01-0:
- tango 1 0 0 Feb28 ? 00:08:36 /usr/bin/python3.10 /usr/local/bin/FspMulti
fsp-01 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-fsp-fsp-01.integration.svc.miditf.internal.skao.int:45450
ds-fsp-fsp-02-0:
- tango 1 0 0 Feb28 ? 00:13:31 /usr/bin/python3.10 /usr/local/bin/FspMulti
fsp-02 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-fsp-fsp-02.integration.svc.miditf.internal.skao.int:45450
ds-fsp-fsp-03-0:
- tango 1 0 0 Feb28 ? 00:08:24 /usr/bin/python3.10 /usr/local/bin/FspMulti
fsp-03 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-fsp-fsp-03.integration.svc.miditf.internal.skao.int:45450
ds-fsp-fsp-04-0:
- tango 1 0 0 Feb28 ? 00:08:48 /usr/bin/python3.10 /usr/local/bin/FspMulti
fsp-04 -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-fsp-fsp-04.integration.svc.miditf.internal.skao.int:45450
ds-midcspcapabilityfsp01-capabilityfsp-0:
- tango 1 0 0 Feb28 ? 00:12:18 /usr/bin/python3.10 /usr/local/bin/MidCspCapabilityFsp
capabilityfsp -ORBendPoint giop:tcp::45450 -ORBendPointPublish giop:tcp:ds-midcspcapabilityfsp01-capabilityfsp.integration.svc.miditf.internal.skao.int:45450
...<br>
slide17. Read Tango devices in Kubernetes namespace $ tangoctl -K integration -l
DEVICE NAME STATE ADMIN VERSION CLASS
alarm/handler/01 RUNNING --- --- AlarmHandler
mid-csp/capability-fsp/0 ON ONLINE 0.18.2 MidCspCapabilityFsp
mid-csp/capability-vcc/0 ON ONLINE 0.18.2 MidCspCapabilityVcc
mid-csp/control/0 OFF ONLINE 0.18.2 MidCspController
mid-csp/subarray/01 OFF ONLINE 0.18.2 MidCspSubarray
mid-csp/subarray/02 OFF ONLINE 0.18.2 MidCspSubarray
mid-csp/subarray/03 OFF ONLINE 0.18.2 MidCspSubarray
mid-eda/cm/01 ON --- --- HdbConfigurationManager
mid-eda/es/01 ON --- --- HdbEventSubscriber
mid-sdp/control/0 (N/A) --- --- --- ---
mid-sdp/queueconnector/01 (N/A) --- --- --- ---
mid-sdp/queueconnector/02 (N/A) --- --- --- ---
mid-sdp/queueconnector/03 (N/A) --- --- --- ---
mid-sdp/subarray/01 (N/A) --- --- --- ---
mid-sdp/subarray/02 (N/A) --- --- --- ---
mid-sdp/subarray/03 (N/A) --- --- --- ---
mid_csp_cbf/fs_links/000 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/001 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/002 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/003 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/004 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/005 UNKNOWN ONLINE 0.11.4 SlimLink
...<br>
slide18. Read Tango devices in Kubernetes namespace $ tangoctl --k8s-ns=integration --list
DEVICE NAME STATE ADMIN VERSION CLASS
alarm/handler/01 RUNNING --- --- AlarmHandler
mid-csp/capability-fsp/0 ON ONLINE 0.18.2 MidCspCapabilityFsp
mid-csp/capability-vcc/0 ON ONLINE 0.18.2 MidCspCapabilityVcc
mid-csp/control/0 OFF ONLINE 0.18.2 MidCspController
mid-csp/subarray/01 OFF ONLINE 0.18.2 MidCspSubarray
mid-csp/subarray/02 OFF ONLINE 0.18.2 MidCspSubarray
mid-csp/subarray/03 OFF ONLINE 0.18.2 MidCspSubarray
mid-eda/cm/01 ON --- --- HdbConfigurationManager
mid-eda/es/01 ON --- --- HdbEventSubscriber
mid-sdp/control/0 (N/A) --- --- --- ---
mid-sdp/queueconnector/01 (N/A) --- --- --- ---
mid-sdp/queueconnector/02 (N/A) --- --- --- ---
mid-sdp/queueconnector/03 (N/A) --- --- --- ---
mid-sdp/subarray/01 (N/A) --- --- --- ---
mid-sdp/subarray/02 (N/A) --- --- --- ---
mid-sdp/subarray/03 (N/A) --- --- --- ---
mid_csp_cbf/fs_links/000 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/001 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/002 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/003 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/004 UNKNOWN ONLINE 0.11.4 SlimLink
mid_csp_cbf/fs_links/005 UNKNOWN ONLINE 0.11.4 SlimLink
...<br>
slide19. Read Tango devices in namespace (JSON) $ tangoctl -K integration -d --json -q
{
"AlarmHandler": [
"alarm/handler/01"
],
"CbfController": [
"mid_csp_cbf/sub_elt/controller"
],
"CbfSubarray": [
"mid_csp_cbf/sub_elt/subarray_01",
"mid_csp_cbf/sub_elt/subarray_02",
"mid_csp_cbf/sub_elt/subarray_03"
],
"CentralNodeMid": [
"ska_mid/tm_central/central_node"
],
"CspMasterLeafNode": [
"ska_mid/tm_leaf_node/csp_master"
],
"CspSubarrayLeafNodeMid": [
"ska_mid/tm_leaf_node/csp_subarray01"
],
"DishLeafNode": [
"ska_mid/tm_leaf_node/d0001",
"ska_mid/tm_leaf_node/d0036",
"ska_mid/tm_leaf_node/d0063",
"ska_mid/tm_leaf_node/d0100"
],
...<br>
slide20. Read Tango device $ tangoctl -K integration --device ska_mid/tm_leaf_node/d0001
name ska_mid/tm_leaf_node/d0001
version 0.9.0
green mode Synchronous
device access ACCESS_WRITE
info dev_class DishLeafNode
dev_type DishLeafNode
doc_url Doc URL = http://www.tango-controls.org
server_host ds-dishleafnode-001-0
server_id dish_leaf_node/001
server_version 5
attributes State value ON
type DevState
data_format SCALAR
description No description
root_attr_name Not specified
format Not specified
data_format SCALAR
disp_level OPERATOR
data_type 19
display_unit No display unit
standard_unit No standard unit
writable READ
writable_attr_name None
Status value The device is in ON state.
type DevString
data_format SCALAR
description No description

...<br>
slide21. Read Tango device (JSON) $ tangoctl --k8s-ns integration --device ska_mid/tm_leaf_node/d0001 --json
{
"ska_mid/tm_leaf_node/d0001": {
"name": "ska_mid/tm_leaf_node/d0001",
"errors": [],
"green_mode": "Synchronous",
"version": "0.9.0",
"device_access": "ACCESS_WRITE",
"acronyms": "Telescope Manager (TM)",
"info": {
"dev_class": "DishLeafNode",
"dev_type": "DishLeafNode",
"doc_url": "Doc URL = http://www.tango-controls.org",
"server_host": "ds-dishleafnode-001-0",
"server_id": "dish_leaf_node/001",
"server_version": 5
},
"attributes": {
"State": {
"data": {
"value": "ON",
"type": "DevState",
"data_format": "SCALAR"
},
"config": {
"description": "No description",
"root_attr_name": "Not specified",
"format": "Not specified",
"data_format": "SCALAR",
"disp_level": "OPERATOR",
"data_type": "19",
"display_unit": "No display unit",
"standard_unit": "No standard unit",
"writable": "READ",
"writable_attr_name": "None"
}
},
"Status": {
...
.<br>
slide22. Read Tango device (YAML) $ tangoctl --k8s-ns integration --device ska_mid/tm_leaf_node/d0001 --yaml
ska_mid/tm_leaf_node/d0001:
acronyms: Telescope Manager (TM)
aliases: N/A
attributes:
State:
config:
data_format: SCALAR
data_type: '19'
description: No description
disp_level: OPERATOR
display_unit: No display unit
format: Not specified
root_attr_name: Not specified
standard_unit: No standard unit
writable: READ
writable_attr_name: None
data:
data_format: SCALAR
type: DevState
value: 'ON'
Status:
config:
data_format: SCALAR
data_type: '8'
description: No description
disp_level: OPERATOR
display_unit: No display unit
...<br>
slide23. Search for Tango device $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --device talon --list
DEVICE NAME STATE ADMIN VERSION CLASS
mid_csp_cbf/talon_board/001 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/002 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/003 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/004 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/005 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/006 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/007 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/008 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_lru/001 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/002 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/003 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/004 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talondx_log_consumer/001 DISABLE OFFLINE 0.11.4 TalonDxLogConsumer<br>
slide24. Search for Tango device with attribute $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --device talon
DEVICE NAME STATE ADMIN VERSION CLASS
mid_csp_cbf/talon_board/001 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/002 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/003 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/004 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/005 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/006 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/007 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_board/008 DISABLE OFFLINE 0.11.4 TalonBoard
mid_csp_cbf/talon_lru/001 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/002 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/003 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talon_lru/004 DISABLE OFFLINE 0.11.4 TalonLRU
mid_csp_cbf/talondx_log_consumer/001 DISABLE OFFLINE 0.11.4 TalonDxLogConsumer<br>
slide25. Search for Tango device with attribute $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --attribute vccsSubarray0 --list
DEVICE NAME STATE ADMIN VERSION CLASS ATTRIBUTE
mid-csp/capability-vcc/0 --- --- 0.18.2 --- vccsSubarray01
vccsSubarray02
vccsSubarray03
vccsSubarray04
vccsSubarray05
vccsSubarray06
vccsSubarray07
vccsSubarray08
vccsSubarray09
mid-csp/control/0 --- --- 0.18.2 --- vccsSubarray01
vccsSubarray02
vccsSubarray03
vccsSubarray04
vccsSubarray05
vccsSubarray06
vccsSubarray07
vccsSubarray08
vccsSubarray09
mid-csp/subarray/01 --- --- 0.18.2 --- vccsSubarray01
vccsSubarray02
vccsSubarray03
vccsSubarray04

...<br>
slide26. Search for Tango device with attribute (JSON) $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --attribute vccsSubarray0 --json
{
"mid-csp/capability-vcc/0": {
"name": "mid-csp/capability-vcc/0",
"errors": [
"Could not read name of mid-sdp/control/0 : TRANSIENT CORBA system exception: TRANSIENT_CallTimedout",
...
],
"green_mode": "Synchronous",
"version": "0.18.2",
"device_access": "ACCESS_WRITE",
"acronyms": "Central Signal Processor (CSP), Very Coarse Channelizer (VCC)",
"info": {
"dev_class": "MidCspCapabilityVcc",
"dev_type": "MidCspCapabilityVcc",
"doc_url": "Doc URL = http://www.tango-controls.org",
"server_host": "ds-midcspcapabilityvcc01-capabilityvcc-0",
"server_id": "MidCspCapabilityVcc/capabilityvcc",
"server_version": 5
},
"attributes": {
"vccsSubarray01": {
"data": {
"type": "N/A",
"data_format": "N/A"
},
"error": "Failed to read_attribute on device ska_mid/tm_subarray_node/1, attribute vccsSubarray01",
"config": {
"description": "Json containing the aggregated data for all VCCs of subarray 1",
...<br>
slide27. Search for Tango device with attribute (YAML) $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --attribute vccsSubarray0 --yaml
mid-csp/capability-vcc/0:
acronyms: Central Signal Processor (CSP), Very Coarse Channelizer (VCC)
aliases: N/A
attributes:
vccsSubarray01:
config:
data_format: SCALAR
data_type: '8'
description: Json containing the aggregated data for all VCCs of subarray
1
disp_level: OPERATOR
display_unit: No display unit
format: '%s'
root_attr_name: Not specified
standard_unit: No standard unit
writable: READ
writable_attr_name: None
data:
data_format: N/A
type: N/A
error: Failed to read_attribute on device ska_mid/tm_subarray_node/1, attribute
vccsSubarray01

...<br>
slide28. Read Tango device $ tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 --device mid-csp/capability-fsp/0
name mid-csp/capability-fsp/0
version 0.18.2
green mode Synchronous
device access ACCESS_WRITE
info dev_class MidCspCapabilityFsp
dev_type MidCspCapabilityFsp
doc_url Doc URL = http://www.tango-controls.org
server_host ds-midcspcapabilityfsp01-capabilityfsp-0
server_id MidCspCapabilityFsp/capabilityfsp
server_version 5
attributes State value ON
type DevState
data_format SCALAR
description No description
root_attr_name Not specified
format Not specified
data_format SCALAR
disp_level OPERATOR
data_type 19
display_unit No display unit
standard_unit No standard unit
writable READ
writable_attr_name None
Status value The device is in DISABLE state.
type DevString
data_format SCALAR
description No description
...<br>
slide29. Read Tango device (markdown)<br>
slide30. Test file Configuration file format:
{
"description": "Turn admin mode on and check status",
"test_on": [
{
"attribute": "adminMode",
"read" : ""
},
{
"attribute": "adminMode",
"write": 1
},
{
"attribute": "adminMode",
"read": 1
},
{
"command": "State",
"return": "OFFLINE"
},
{
"command": "Status"
}
]
}<br>
slide31. Test file with environment variable Configuration file format:
{
"description": "Turn admin mode off and check status",
"test_on": [
{
"attribute": "adminMode",
"read": ""
},
{
"attribute": "adminMode",
"write": "${ADMIN_MODE}"
},
{
"attribute": "adminMode",
"read": "${ADMIN_MODE}"
},
{
"command": "State",
"return": "ONLINE"
},
{
"command": "Status"
}
]
}<br>
slide32. Test file use Run with debug output on
$ ADMIN_MODE=1 tangoctl --k8s-ns=ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2 -D mid_csp_cbf/talon_board/001 -f \
--in resources/dev_online.json -V
INFO:tangoctl:Use Tango host tango-databaseds.ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2.svc.miditf.internal.skao.int:10000
INFO:tangoctl:Set TANGO_HOST to tango-databaseds.ci-ska-mid-itf-at-1820-tmc-test-sdp-notebook-v2.svc.miditf.internal.skao.int:10000
INFO:tangoctl:Connect device mid_csp_cbf/talon_board/001
INFO:tangoctl:Read device name mid_csp_cbf/talon_board/001
WARNING:tangoctl:Read file resources/dev_online.json
INFO:tangoctl:Process : {'description': 'Turn admin mode off and check status', 'test_on': [{'attribute': 'adminMode', 'read': ''}, {'attribute': 'adminMode', 'write': '${ADMIN_MODE}'}, {'attribute': 'adminMode', 'read': '${ADMIN_MODE}'}, {'command': 'State', 'return': 'ONLINE'}, {'command': 'Status'}]}
INFO:tangoctl:description : Turn admin mode off and check status
DEBUG:tangoctl:Read attribute adminMode : should be ''
Attribute adminMode : 1
INFO:tangoctl:Read environment variable ADMIN_MODE : 1
INFO:tangoctl:Write attrbute adminMode value 1
Attrbute adminMode set to 1
INFO:tangoctl:Read environment variable ADMIN_MODE : 1
DEBUG:tangoctl:Read attribute adminMode : should be '1'
Attribute adminMode : 1
INFO:tangoctl:Run command State
Command State : DISABLE
INFO:tangoctl:Run command Status
Command Status : The device is in DISABLE state.<br>
slide33. Tree view $ tangoktl.py -K test-equipment -b
tango-databaseds.test-equipment.svc.miditf.internal.skao.int:10000
└── mid-itf
├── progattenuator
│ └── 1
├── siggen
│ └── 1
├── skysimctl
│ └── 4
└── spectana
└── 1<br>
slide34. Other functionality Basic Python testing
Sets of tests that can be run on multiple devices
Switch admin mode on and off
Switch device on and of
Place device in standby mode
Device can be changed but tests are hard-coded
Python tests scripted in JSON or YAML format
More flexible<br>
slide35. Enhancements Graphical User Interface
Under development
Filter by attribute, command and property
Regular expressions
C++ version
More limited output formats
Under development (K8S C++ API not great)
See https://gitlab.com/jcoetzer/tangoctl_cpp<br>
slide36. Under development Graphical User Interface
Web interface<br>