diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f25acdf1cb594abbd2e39c4df5f1b0102004216..8bbc48ec8e58a29303e516874f4d44c174e20cae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -417,6 +417,8 @@ integration_test_docker: echo "Saving log for container $container" docker logs "${container}" >& "log/${container}.log" done + # Collect content of the TangoDB + - $CI_PROJECT_DIR/bin/dump_ConfigDb.sh >& log/dump_ConfigDb.log artifacts: when: always paths: diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index fa6f9b91b5598c64bb4b1a7766a01a43592010b0..8e4cbe06591e77d9602a853c7e71128911c32cd9 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -23,7 +23,6 @@ "STAT/CCD/1", "STAT/PSOC/1", "STAT/AntennaField/HBA", - "STAT/AntennaField/LBA", "STAT/PCON/1", "STAT/ObservationControl/1", "STAT/TemperatureManager/1", @@ -110,20 +109,12 @@ "STAT/AntennaField/HBA": { "properties": { "Control_Children": [ - "STAT/SDPFirmware/1", + "STAT/SDPFirmware/HBA", "STAT/TileBeam/HBA", "STAT/DigitalBeam/HBA", "STAT/APS/H0" ] } - }, - "STAT/AntennaField/LBA": { - "properties": { - "Control_Children": [ - "STAT/SDPFirmware/1", - "STAT/APS/L0" - ] - } } } } @@ -163,7 +154,7 @@ ], "Power_Children": [ "STAT/CCD/1", - "STAT/SDPFirmware/1" + "STAT/SDPFirmware/HBA" ] } } @@ -215,8 +206,8 @@ "RECVL, RECV_TEMP_error_R" ], "Shutdown_Device_List": [ - "STAT/SDPFirmware/1", - "STAT/SDP/1", + "STAT/SDPFirmware/HBA", + "STAT/SDP/HBA", "STAT/UNB2/1", "STAT/RECVH/1", "STAT/RECVL/1", @@ -242,14 +233,14 @@ "DigitalBeam": { "STAT/DigitalBeam/HBA": { "properties": { + "Control_Children": [ + "STAT/Beamlet/HBA" + ], "Beam_tracking_interval": [ "1.0" ], "Beam_tracking_preparation_period": [ "0.5" - ], - "Control_Children": [ - "STAT/Beamlet/1" ] } } @@ -259,7 +250,7 @@ "Beamlet": { "STAT": { "Beamlet": { - "STAT/Beamlet/1": { + "STAT/Beamlet/HBA": { "properties": { "FPGA_beamlet_output_hdr_eth_source_mac_RW_default": [ "00:22:86:08:00:00", @@ -350,16 +341,6 @@ "STAT/RECVH/1" ] } - }, - "STAT/APS/L0": { - "properties": { - "Control_Children": [ - "STAT/APSCT/1", - "STAT/APSPU/1", - "STAT/UNB2/1", - "STAT/RECVL/1" - ] - } } } } @@ -407,19 +388,20 @@ "SDPFirmware": { "STAT": { "SDPFirmware": { - "STAT/SDPFirmware/1": { + "STAT/SDPFirmware/HBA": { "properties": { "Control_Children": [ - "STAT/SDP/1", - "STAT/XST/1", - "STAT/SST/1", - "STAT/BST/1" + "STAT/SDP/HBA", + "STAT/XST/HBA", + "STAT/SST/HBA", + "STAT/BST/HBA" ], "Power_Children": [ - "STAT/SDP/1", - "STAT/BST/1", - "STAT/SST/1", - "STAT/XST/1" + "STAT/SDP/HBA", + "STAT/BST/HBA", + "STAT/SST/HBA", + "STAT/XST/HBA", + "STAT/Beamlet/HBA" ] } } @@ -429,11 +411,8 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { - "Power_Children": [ - "STAT/Beamlet/1" - ] } } } @@ -442,7 +421,7 @@ "BST": { "STAT": { "BST": { - "STAT/BST/1": { + "STAT/BST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5003" @@ -473,7 +452,7 @@ "SST": { "STAT": { "SST": { - "STAT/SST/1": { + "STAT/SST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5001" @@ -507,7 +486,7 @@ "XST": { "STAT": { "XST": { - "STAT/XST/1": { + "STAT/XST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5002" diff --git a/CDB/integrations/digitalbeam_cluster_ConfigDb.json b/CDB/integrations/digitalbeam_cluster_ConfigDb.json index 21daaa805421ec680ebc6a64daa7aa7e54176832..17b7e675e6f94bc551c0a29f83472ff7afdd647c 100644 --- a/CDB/integrations/digitalbeam_cluster_ConfigDb.json +++ b/CDB/integrations/digitalbeam_cluster_ConfigDb.json @@ -3,10 +3,10 @@ "SDPFirmware":{ "STAT": { "SDPFirmware": { - "STAT/SDPFirmware/1":{ + "STAT/SDPFirmware/HBA":{ "properties": { "Control_Children": [ - "STAT/SDP/1" + "STAT/SDP/HBA" ], "OPC_Server_Name": [ "sdptr-sim" @@ -18,14 +18,14 @@ "5.0" ], "Power_Children": [ - "STAT/SDP/1" + "STAT/SDP/HBA" ] } }, - "STAT/SDPFirmware/2":{ + "STAT/SDPFirmware/LBA":{ "properties": { "Control_Children": [ - "STAT/SDP/2" + "STAT/SDP/LBA" ], "OPC_Server_Name": [ "sdptr-sim" @@ -37,7 +37,7 @@ "5.0" ], "Power_Children": [ - "STAT/SDP/2" + "STAT/SDP/LBA" ] } } @@ -47,7 +47,7 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -60,7 +60,7 @@ ] } }, - "STAT/SDP/2": { + "STAT/SDP/LBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -79,10 +79,10 @@ "Beamlet": { "STAT": { "Beamlet": { - "STAT/Beamlet/1": { + "STAT/Beamlet/HBA": { "properties": { "SDP_device": [ - "STAT/SDP/1" + "STAT/SDP/HBA" ], "OPC_Server_Name": [ "sdptr-sim" @@ -167,10 +167,10 @@ ] } }, - "STAT/Beamlet/2": { + "STAT/Beamlet/LBA": { "properties": { "SDP_device": [ - "STAT/SDP/2" + "STAT/SDP/LBA" ], "OPC_Server_Name": [ "sdptr-sim" @@ -303,7 +303,7 @@ "STAT/AntennaField/HBA" ], "Beamlet_Device": [ - "STAT/Beamlet/1" + "STAT/Beamlet/HBA" ], "Beam_tracking_interval": [ "1.0" @@ -312,7 +312,7 @@ "0.5" ], "Control_Children": [ - "STAT/Beamlet/1" + "STAT/Beamlet/HBA" ] } }, @@ -322,7 +322,7 @@ "STAT/AntennaField/LBA" ], "Beamlet_Device": [ - "STAT/Beamlet/2" + "STAT/Beamlet/LBA" ], "Beam_tracking_interval": [ "1.0" @@ -331,7 +331,7 @@ "0.5" ], "Control_Children": [ - "STAT/Beamlet/2" + "STAT/Beamlet/LBA" ] } } @@ -344,7 +344,7 @@ "STAT/AntennaField/LBA": { "properties": { "Control_Children": [ - "STAT/SDPFirmware/2", + "STAT/SDPFirmware/LBA", "STAT/digitalbeam/LBA", "STAT/RECVL/1", "STAT/RECVL/2" @@ -558,8 +558,8 @@ "STAT/AntennaField/HBA": { "properties": { "Control_Children": [ - "STAT/SDPFirmware/1", - "STAT/digitalbeam/HBA", + "STAT/SDPFirmware/HBA", + "STAT/DigitalBeam/HBA", "STAT/RECVH/1", "STAT/RECVH/2" ], diff --git a/CDB/integrations/tilebeam_cluster_ConfigDb.json b/CDB/integrations/tilebeam_cluster_ConfigDb.json index d334521b22d017ce80c403cfa0d79a066e7767ad..f9fe278be98da2524a48a122dae8b2ed5e393768 100644 --- a/CDB/integrations/tilebeam_cluster_ConfigDb.json +++ b/CDB/integrations/tilebeam_cluster_ConfigDb.json @@ -579,19 +579,6 @@ } } } - }, - "SDPFirmware":{ - "STAT": { - "SDPFirmware": { - "STAT/SDPFirmware/1":{ - "properties": { - "Control_Children": [ - "STAT/SDP/1" - ] - } - } - } - } } } } diff --git a/CDB/stations/LTS_ConfigDb.json b/CDB/stations/LTS_ConfigDb.json index a6af15dbd5dd27e8b77588002242e0a4c3589234..65333660b47151ea7b6b86ea6c34937a7cc47799 100644 --- a/CDB/stations/LTS_ConfigDb.json +++ b/CDB/stations/LTS_ConfigDb.json @@ -147,7 +147,7 @@ "SDPFirmware":{ "STAT": { "SDPFirmware": { - "STAT/SDPFirmware/1": { + "STAT/SDPFirmware/HBA": { "properties": { "OPC_Server_Name": [ "dop369.astron.nl" @@ -172,7 +172,7 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { "OPC_Server_Name": [ "dop369.astron.nl" @@ -209,7 +209,7 @@ "BST": { "STAT": { "BST": { - "STAT/BST/1": { + "STAT/BST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5003" @@ -288,7 +288,7 @@ "SST": { "STAT": { "SST": { - "STAT/SST/1": { + "STAT/SST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5001" @@ -367,7 +367,7 @@ "XST": { "STAT": { "XST": { - "STAT/XST/1": { + "STAT/XST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5002" diff --git a/CDB/stations/simulators_ConfigDb.json b/CDB/stations/simulators_ConfigDb.json index 3342f9bef85302d8cba95ca8aa12c953ee9caa4e..e298e70aec6729b537cd7a2b6fcaa80f8b0dbe12 100644 --- a/CDB/stations/simulators_ConfigDb.json +++ b/CDB/stations/simulators_ConfigDb.json @@ -99,7 +99,7 @@ "Beamlet": { "STAT": { "Beamlet": { - "STAT/Beamlet/1": { + "STAT/Beamlet/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -238,7 +238,7 @@ "SDPFirmware": { "STAT": { "SDPFirmware": { - "STAT/SDPFirmware/1": { + "STAT/SDPFirmware/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -257,7 +257,7 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -276,7 +276,7 @@ "BST": { "STAT": { "BST": { - "STAT/BST/1": { + "STAT/BST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -331,7 +331,7 @@ "SST": { "STAT": { "SST": { - "STAT/SST/1": { + "STAT/SST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -386,7 +386,7 @@ "XST": { "STAT": { "XST": { - "STAT/XST/1": { + "STAT/XST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" diff --git a/docker-compose/device-antennafield.yml b/docker-compose/device-antennafield.yml index b1f4dc6c09fd07954aa8d0c02d06a85a192167ad..21461e4ec2943e2c6ff1af7472d9b9e57ba9d37a 100644 --- a/docker-compose/device-antennafield.yml +++ b/docker-compose/device-antennafield.yml @@ -40,7 +40,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5815 - TANGO_ZMQ_HEARTBEAT_PORT=5915 healthcheck: - test: l2ss-health STAT/AntennaField/HBA + test: l2ss-health dserver/AntennaField/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-aps.yml b/docker-compose/device-aps.yml index 5944909d5ecfa5c7724d181e60904977a195af9d..6094efb52cc2c9c6b957403dd842164c55ad2626 100644 --- a/docker-compose/device-aps.yml +++ b/docker-compose/device-aps.yml @@ -31,7 +31,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5828 - TANGO_ZMQ_HEARTBEAT_PORT=5928 healthcheck: - test: l2ss-health STAT/APS/H0 + test: l2ss-health dserver/APS/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-apsct.yml b/docker-compose/device-apsct.yml index 57a90c10c843d56219d45610b6668c8df695787f..921c4cfa5a7d2261e4a192bb810f724992743e0d 100644 --- a/docker-compose/device-apsct.yml +++ b/docker-compose/device-apsct.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5809 - TANGO_ZMQ_HEARTBEAT_PORT=5909 healthcheck: - test: l2ss-health STAT/Apsct/1 + test: l2ss-health dserver/APSCT/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-apspu.yml b/docker-compose/device-apspu.yml index 5e2de1a66a65eafab4443f04415dc5aa77b598f9..88752625b15f670ee734b22368d11526014c6909 100644 --- a/docker-compose/device-apspu.yml +++ b/docker-compose/device-apspu.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5810 - TANGO_ZMQ_HEARTBEAT_PORT=5910 healthcheck: - test: l2ss-health STAT/Apspu/1 + test: l2ss-health dserver/APSPU/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-beamlet.yml b/docker-compose/device-beamlet.yml index def12d9abc92affccd01b4668d64f7a2da974b14..b998eaf7ed0a1fa934757e9fa985203c31e6de06 100644 --- a/docker-compose/device-beamlet.yml +++ b/docker-compose/device-beamlet.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5812 - TANGO_ZMQ_HEARTBEAT_PORT=5912 healthcheck: - test: l2ss-health STAT/Beamlet/1 + test: l2ss-health dserver/Beamlet/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-boot.yml b/docker-compose/device-boot.yml index 5c4a58689fa0809c648f13f081ae5c314348490e..77585f8da9817d218e3a31d77902d63299dc3137 100644 --- a/docker-compose/device-boot.yml +++ b/docker-compose/device-boot.yml @@ -38,7 +38,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5808 - TANGO_ZMQ_HEARTBEAT_PORT=5908 healthcheck: - test: l2ss-health STAT/BOOT/1 + test: l2ss-health dserver/BOOT/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-bst.yml b/docker-compose/device-bst.yml index 0f4a39eeba8eba0b276af0b73f49203bbb6cb5f1..e199b3dbad3f7248be0be739b46fc023523f8262 100644 --- a/docker-compose/device-bst.yml +++ b/docker-compose/device-bst.yml @@ -46,7 +46,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5817 - TANGO_ZMQ_HEARTBEAT_PORT=5917 healthcheck: - test: l2ss-health STAT/BST/1 + test: l2ss-health dserver/BST/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-calibration.yml b/docker-compose/device-calibration.yml index 3ff6353c543a6afd30117edf9e28e833d5c55d62..7c738866057256cc583159a15540bae8aea5b707 100644 --- a/docker-compose/device-calibration.yml +++ b/docker-compose/device-calibration.yml @@ -41,7 +41,7 @@ services: - MINIO_ROOT_USER=${MINIO_ROOT_USER} - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD} healthcheck: - test: l2ss-health STAT/Calibration/1 + test: l2ss-health dserver/Calibration/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-ccd.yml b/docker-compose/device-ccd.yml index 4e2810ddaae0b4e599a4ea17520f0e2973a89a3a..1621c7257cbe4d94c6a587dd90108c2e12b5eede 100644 --- a/docker-compose/device-ccd.yml +++ b/docker-compose/device-ccd.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5821 - TANGO_ZMQ_HEARTBEAT_PORT=5921 healthcheck: - test: l2ss-health STAT/CCD/1 + test: l2ss-health dserver/CCD/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-configuration.yml b/docker-compose/device-configuration.yml index 346a999a5716f48d5134fa9b05339c70f20248ef..d3dbeb273868136986202993936c8854142ccc2d 100644 --- a/docker-compose/device-configuration.yml +++ b/docker-compose/device-configuration.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5822 - TANGO_ZMQ_HEARTBEAT_PORT=5922 healthcheck: - test: l2ss-health STAT/Configuration/1 + test: l2ss-health dserver/Configuration/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-digitalbeam.yml b/docker-compose/device-digitalbeam.yml index 766c4317df094bd10f9cbd050ecb2d46ca0ca677..e6ba98a0e5b84e26425b7b92bf8e91067111af52 100644 --- a/docker-compose/device-digitalbeam.yml +++ b/docker-compose/device-digitalbeam.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5813 - TANGO_ZMQ_HEARTBEAT_PORT=5913 healthcheck: - test: l2ss-health STAT/DigitalBeam/HBA + test: l2ss-health dserver/DigitalBeam/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-docker.yml b/docker-compose/device-docker.yml index bf51663ae58d8a897c4fab30b62be96da9069a63..9ef0917b09deba02b1dd5b80b657694317910660 100644 --- a/docker-compose/device-docker.yml +++ b/docker-compose/device-docker.yml @@ -41,7 +41,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5805 - TANGO_ZMQ_HEARTBEAT_PORT=5905 healthcheck: - test: l2ss-health STAT/Docker/1 + test: l2ss-health dserver/Docker/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-ec.yml b/docker-compose/device-ec.yml index cdb95022bd3e81c895da8ad95af5d9ab80d98a14..48e015f2a603b03f35e23b8469e127f5dbf9d970 100644 --- a/docker-compose/device-ec.yml +++ b/docker-compose/device-ec.yml @@ -34,7 +34,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5829 - TANGO_ZMQ_HEARTBEAT_PORT=5929 healthcheck: - test: l2ss-health STAT/ec/1 + test: l2ss-health dserver/ec/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-observation-control.yml b/docker-compose/device-observation-control.yml index f5fcaa1a644ce34459f4187bebdc51d78f64fb50..baf3b68c75fa473c792d339bf537e20bd23627a8 100644 --- a/docker-compose/device-observation-control.yml +++ b/docker-compose/device-observation-control.yml @@ -38,7 +38,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5803 - TANGO_ZMQ_HEARTBEAT_PORT=5903 healthcheck: - test: l2ss-health STAT/ObservationControl/1 + test: l2ss-health dserver/ObservationControl/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-pcon.yml b/docker-compose/device-pcon.yml index 093c22c10ee186f481bae57ae27af63b18e2eb78..e5b9d1d3035b8026d155bec20e225642e5116e3a 100644 --- a/docker-compose/device-pcon.yml +++ b/docker-compose/device-pcon.yml @@ -34,7 +34,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5820 - TANGO_ZMQ_HEARTBEAT_PORT=5920 healthcheck: - test: l2ss-health STAT/pcon/1 + test: l2ss-health dserver/pcon/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-psoc.yml b/docker-compose/device-psoc.yml index 3610a7e34abadbead2da62903c8d1665d4aa6f0f..ab8ee4388e98a0c465b8f74ebb08d5f643458bc9 100644 --- a/docker-compose/device-psoc.yml +++ b/docker-compose/device-psoc.yml @@ -34,7 +34,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5819 - TANGO_ZMQ_HEARTBEAT_PORT=5919 healthcheck: - test: l2ss-health STAT/PSOC/1 + test: l2ss-health dserver/PSOC/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-recvh.yml b/docker-compose/device-recvh.yml index f233718402fbf93fd1405a6fcd722e3ff63312f7..0f16da4f666b3c58012054eab5f5b2c1d80cee73 100644 --- a/docker-compose/device-recvh.yml +++ b/docker-compose/device-recvh.yml @@ -31,7 +31,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5825 - TANGO_ZMQ_HEARTBEAT_PORT=5925 healthcheck: - test: l2ss-health STAT/RECVH/1 + test: l2ss-health dserver/RECVH/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-recvl.yml b/docker-compose/device-recvl.yml index 67d098e2ff195e030b1defba3e3d613a43bfbc33..f6c905623f455510c515021e786b0e9a307c3277 100644 --- a/docker-compose/device-recvl.yml +++ b/docker-compose/device-recvl.yml @@ -31,7 +31,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5826 - TANGO_ZMQ_HEARTBEAT_PORT=5926 healthcheck: - test: l2ss-health STAT/RECVL/1 + test: l2ss-health dserver/RECVL/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-sdp.yml b/docker-compose/device-sdp.yml index e471859258feb61c96f1cacb8b9262d190e7de8e..52bb3d72c1a340a69878b72fbbb66e76bacef8bc 100644 --- a/docker-compose/device-sdp.yml +++ b/docker-compose/device-sdp.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5801 - TANGO_ZMQ_HEARTBEAT_PORT=5901 healthcheck: - test: l2ss-health STAT/SDP/1 + test: l2ss-health dserver/SDP/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-sdpfirmware.yml b/docker-compose/device-sdpfirmware.yml index b643bb0b0d7c7e11bb9545e2201114e197f45f18..731c975abe7f02499c14a2d1daf4e250a36dfd85 100644 --- a/docker-compose/device-sdpfirmware.yml +++ b/docker-compose/device-sdpfirmware.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5827 - TANGO_ZMQ_HEARTBEAT_PORT=5927 healthcheck: - test: l2ss-health STAT/SDPFirmware/1 + test: l2ss-health dserver/SDPFirmware/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-sst.yml b/docker-compose/device-sst.yml index 8020af21271f1570c72d7930f87964a255f340e5..b1712b91dfea646aa4d59f7f280176d9d6803cd8 100644 --- a/docker-compose/device-sst.yml +++ b/docker-compose/device-sst.yml @@ -46,7 +46,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5802 - TANGO_ZMQ_HEARTBEAT_PORT=5902 healthcheck: - test: l2ss-health STAT/SST/1 + test: l2ss-health dserver/SST/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-station-manager.yml b/docker-compose/device-station-manager.yml index fb27bec2d6618380fc5e963615419a4b1abeea70..f35e7f1e97307f54044b5d1bc587720f4271c42f 100644 --- a/docker-compose/device-station-manager.yml +++ b/docker-compose/device-station-manager.yml @@ -34,7 +34,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5823 - TANGO_ZMQ_HEARTBEAT_PORT=5923 healthcheck: - test: l2ss-health STAT/StationManager/1 + test: l2ss-health dserver/StationManager/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-temperature-manager.yml b/docker-compose/device-temperature-manager.yml index a62613803092ea3b5b5de87402da6e26bec1b128..14c8f3bb6c7b7db0c16009629eb153812a46180a 100644 --- a/docker-compose/device-temperature-manager.yml +++ b/docker-compose/device-temperature-manager.yml @@ -34,7 +34,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5816 - TANGO_ZMQ_HEARTBEAT_PORT=5916 healthcheck: - test: l2ss-health STAT/TemperatureManager/1 + test: l2ss-health dserver/TemperatureManager/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-tilebeam.yml b/docker-compose/device-tilebeam.yml index 5f36c7b3053cc43a2df095168a1b43129e8dfb96..ecad1f16270c50885bd870b582d0eb847fa472dd 100644 --- a/docker-compose/device-tilebeam.yml +++ b/docker-compose/device-tilebeam.yml @@ -35,7 +35,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5811 - TANGO_ZMQ_HEARTBEAT_PORT=5911 healthcheck: - test: l2ss-health STAT/TileBeam/HBA + test: l2ss-health dserver/TileBeam/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-unb2.yml b/docker-compose/device-unb2.yml index fdfa1938e4655e784bad21ae479f53d02411644c..9377bc0c6cc13c07c5e290320b1471bcc425f2a4 100644 --- a/docker-compose/device-unb2.yml +++ b/docker-compose/device-unb2.yml @@ -39,7 +39,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5804 - TANGO_ZMQ_HEARTBEAT_PORT=5904 healthcheck: - test: l2ss-health STAT/UNB2/1 + test: l2ss-health dserver/UNB2/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/device-xst.yml b/docker-compose/device-xst.yml index bb9a3e6d4d64e6b260030dc81ea0c0c42b143072..104472ebff28c9f7fe7fc763df9b30b5bb02d78d 100644 --- a/docker-compose/device-xst.yml +++ b/docker-compose/device-xst.yml @@ -46,7 +46,7 @@ services: - TANGO_ZMQ_EVENT_PORT=5806 - TANGO_ZMQ_HEARTBEAT_PORT=5906 healthcheck: - test: l2ss-health STAT/XST/1 + test: l2ss-health dserver/XST/STAT interval: 1m timeout: 30s retries: 3 diff --git a/docker-compose/http-json-schemas/definitions/observation-settings.json b/docker-compose/http-json-schemas/definitions/observation-settings.json index 7e0aef69cbdb5f2b8bab603d8aca63623a32ba56..2162b60072b138d1d2175f580d0dfad5f260aa09 100644 --- a/docker-compose/http-json-schemas/definitions/observation-settings.json +++ b/docker-compose/http-json-schemas/definitions/observation-settings.json @@ -4,6 +4,7 @@ "required": [ "observation_id", "stop_time", + "antenna_field", "antenna_set", "filter", "SAPs" @@ -17,6 +18,17 @@ "type": "string", "format": "date-time" }, + "antenna_field": { + "default": "HBA", + "description": "Antenna field to use", + "type": "string", + "enum": [ + "LBA", + "HBA", + "HBA0", + "HBA1" + ] + }, "antenna_set": { "default": "ALL", "description": "Fields & antennas to use", diff --git a/tangostationcontrol/integration_test/configuration/configDB/LOFAR_ConfigDb.json b/tangostationcontrol/integration_test/configuration/configDB/LOFAR_ConfigDb.json index d569a7f9993fea9b080aa0ba3e941eacfcc0d0d5..799763fc65e88de5666d35302f352eefa2065f2e 100644 --- a/tangostationcontrol/integration_test/configuration/configDB/LOFAR_ConfigDb.json +++ b/tangostationcontrol/integration_test/configuration/configDB/LOFAR_ConfigDb.json @@ -101,7 +101,7 @@ "RECVL, RECV_TEMP_error_R" ], "Shutdown_Device_List":[ - "STAT/SDP/1", "STAT/UNB2/1", "STAT/RECVH/1", "STAT/RECVL/1", "STAT/APSCT/1", "STAT/CCD/1", "STAT/APSPU/1" + "STAT/SDP/HBA", "STAT/UNB2/1", "STAT/RECVH/1", "STAT/RECVL/1", "STAT/APSCT/1", "STAT/CCD/1", "STAT/APSPU/1" ] } } @@ -119,7 +119,7 @@ "Beamlet": { "STAT": { "Beamlet": { - "STAT/Beamlet/1": { + "STAT/Beamlet/HBA": { "properties": { "FPGA_beamlet_output_hdr_eth_source_mac_RW_default": [ "00:22:86:08:00:00", @@ -274,7 +274,7 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { } } @@ -284,7 +284,7 @@ "BST": { "STAT": { "BST": { - "STAT/BST/1": { + "STAT/BST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5003" @@ -318,7 +318,7 @@ "SST": { "STAT": { "SST": { - "STAT/SST/1": { + "STAT/SST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5001" @@ -352,7 +352,7 @@ "XST": { "STAT": { "XST": { - "STAT/XST/1": { + "STAT/XST/HBA": { "properties": { "Statistics_Client_UDP_Port": [ "5002" diff --git a/tangostationcontrol/integration_test/configuration/configDB/simulators_ConfigDb.json b/tangostationcontrol/integration_test/configuration/configDB/simulators_ConfigDb.json index 4d7cc3644afb823377400e54b426ccc2e28f8f9b..ec768aa289d439835b5f9072b5109c4ec42b9064 100644 --- a/tangostationcontrol/integration_test/configuration/configDB/simulators_ConfigDb.json +++ b/tangostationcontrol/integration_test/configuration/configDB/simulators_ConfigDb.json @@ -73,7 +73,7 @@ "Beamlet": { "STAT": { "Beamlet": { - "STAT/Beamlet/1": { + "STAT/Beamlet/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -186,7 +186,7 @@ "SDPFirmware": { "STAT": { "SDPFirmware": { - "STAT/SDPFirmware/1": { + "STAT/SDPFirmware/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -205,7 +205,7 @@ "SDP": { "STAT": { "SDP": { - "STAT/SDP/1": { + "STAT/SDP/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -224,7 +224,7 @@ "BST": { "STAT": { "BST": { - "STAT/BST/1": { + "STAT/BST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -279,7 +279,7 @@ "SST": { "STAT": { "SST": { - "STAT/SST/1": { + "STAT/SST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" @@ -334,7 +334,7 @@ "XST": { "STAT": { "XST": { - "STAT/XST/1": { + "STAT/XST/HBA": { "properties": { "OPC_Server_Name": [ "sdptr-sim" diff --git a/tangostationcontrol/integration_test/default/devices/interfaces/test_power_hierarchy.py b/tangostationcontrol/integration_test/default/devices/interfaces/test_power_hierarchy.py index 8fcb8592c4633d32b8b855f8af62fb52e86df6cc..8e6cbd04dac53c8842f3ec2597cd89cbb87ed2fa 100644 --- a/tangostationcontrol/integration_test/default/devices/interfaces/test_power_hierarchy.py +++ b/tangostationcontrol/integration_test/default/devices/interfaces/test_power_hierarchy.py @@ -24,12 +24,12 @@ class TestPowerHierarchy(base.IntegrationTestCase): ccd_name = "STAT/CCD/1" pcon_name = "STAT/PCON/1" psoc_name = "STAT/PSOC/1" - sdp_name = "STAT/SDP/1" + sdp_name = "STAT/SDP/HBA" unb2_name = "STAT/UNB2/1" recvh_name = "STAT/RECVH/1" recvl_name = "STAT/RECVL/1" - sdp_name = "STAT/SDP/1" - sdpfirmware_name = "STAT/SDPFirmware/1" + sdp_name = "STAT/SDP/HBA" + sdpfirmware_name = "STAT/SDPFirmware/HBA" def setUp(self): super().setUp() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py b/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py index 08479862598b6d7ffc4047a3e0ebc089c7151244..85c81dc5d468f8643029b5070037bb828366edab 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py @@ -61,7 +61,7 @@ class TestAntennaFieldDevice(AbstractTestBases.TestDeviceBase): @staticmethod def shutdown_sdp(): - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() def setup_recv_proxy(self): @@ -74,14 +74,14 @@ class TestAntennaFieldDevice(AbstractTestBases.TestDeviceBase): def setup_sdpfirmware_proxy(self): # setup SDPFirmware - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() sdpfirmware_proxy.warm_boot() return sdpfirmware_proxy def setup_sdp_proxy(self): # setup SDP - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() return sdp_proxy diff --git a/tangostationcontrol/integration_test/default/devices/test_device_beamlet.py b/tangostationcontrol/integration_test/default/devices/test_device_beamlet.py index 3e6bb3d09f4857616cc6f28e2177a3327c2660e5..02814dcbe852546bb608db71b67fc32c0c6b4d4a 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_beamlet.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_beamlet.py @@ -22,7 +22,7 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/Beamlet/1") + super().setUp("STAT/Beamlet/HBA") def test_device_read_all_attributes(self): # We need to connect to SDP first to read some of our attributes @@ -32,7 +32,7 @@ class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase): def setup_sdp(self, antenna_type="HBA", clock=CLK_200_MHZ): # setup SDP, on which this device depends - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() sdp_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_bst.py b/tangostationcontrol/integration_test/default/devices/test_device_bst.py index aadefbc355b16f549777f2394ab49a451742e852..c4a08d430c2ab0aca92ed55efc591a768e112135 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_bst.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_bst.py @@ -8,7 +8,7 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceBST(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/BST/1") + super().setUp("STAT/BST/HBA") def test_device_read_all_attributes(self): # We need to connect to SDP first to read some of our attributes @@ -18,7 +18,7 @@ class TestDeviceBST(AbstractTestBases.TestDeviceBase): def setup_sdp(self): # setup SDP, on which this device depends - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() sdp_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_calibration.py b/tangostationcontrol/integration_test/default/devices/test_device_calibration.py index 7f9313d90af868d591e48d2add6120f0f741deb1..725d50a60f5e8ddc7868e0b85c4ce38c0ca5b6fd 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_calibration.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_calibration.py @@ -106,7 +106,7 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase): @staticmethod def shutdown_sdp(): - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() @staticmethod @@ -127,14 +127,14 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase): def setup_sdpfirmware_proxy(self): # setup SDP - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() sdpfirmware_proxy.warm_boot() return sdpfirmware_proxy def setup_sdp_proxy(self): # setup SDP - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() return sdp_proxy diff --git a/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py b/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py index 4fcbae3f141796d705c78da6d08c6327819d1662..76cfd79e1daa85569ae0c9abd522ab1f46dc80ca 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py @@ -34,10 +34,10 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase): antenna_use_ok = numpy.array([AntennaUse.AUTO] * MAX_ANTENNA) antennafield_iden = "STAT/AntennaField/HBA" - beamlet_iden = "STAT/Beamlet/1" + beamlet_iden = "STAT/Beamlet/HBA" recv_iden = "STAT/RECVH/1" - sdpfirmware_iden = "STAT/SDPFirmware/1" - sdp_iden = "STAT/SDP/1" + sdpfirmware_iden = "STAT/SDPFirmware/HBA" + sdp_iden = "STAT/SDP/HBA" def setUp(self): """Intentionally recreate the device object in each test""" diff --git a/tangostationcontrol/integration_test/default/devices/test_device_observation.py b/tangostationcontrol/integration_test/default/devices/test_device_observation.py index 83332db523ae9789399ca4758bc6037550aeb7d0..4c41ef96d0db6c8e186e3f47f0b685bc732c37cc 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_observation.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_observation.py @@ -140,14 +140,14 @@ class TestDeviceObservation(AbstractTestBases.TestDeviceBase): def setup_sdpfirmware_proxy(self): # setup SDPFirmware - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() sdpfirmware_proxy.warm_boot() return sdpfirmware_proxy def setup_sdp_proxy(self): # setup SDP - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() return sdp_proxy @@ -181,7 +181,7 @@ class TestDeviceObservation(AbstractTestBases.TestDeviceBase): def setup_beamlet_proxy(self): # setup Digitalbeam - beamlet_proxy = TestDeviceProxy("STAT/Beamlet/1") + beamlet_proxy = TestDeviceProxy("STAT/Beamlet/HBA") beamlet_proxy.off() beamlet_proxy.warm_boot() beamlet_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_observation_control.py b/tangostationcontrol/integration_test/default/devices/test_device_observation_control.py index c570b79d3de6ac8f46ac817907d4a1a9f1590025..1f27234f55f3f9e6b7cb8ef95d9b1d9c9367f542 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_observation_control.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_observation_control.py @@ -136,14 +136,14 @@ class TestObservationControlDevice(AbstractTestBases.TestDeviceBase): def setup_sdpfirmware_proxy(self): # setup SDPFirmware - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() sdpfirmware_proxy.warm_boot() return sdpfirmware_proxy def setup_sdp_proxy(self): # setup SDP - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() return sdp_proxy @@ -166,7 +166,7 @@ class TestObservationControlDevice(AbstractTestBases.TestDeviceBase): def setup_beamlet_proxy(self): # setup Digitalbeam - beamlet_proxy = TestDeviceProxy("STAT/Beamlet/1") + beamlet_proxy = TestDeviceProxy("STAT/Beamlet/HBA") beamlet_proxy.off() beamlet_proxy.warm_boot() beamlet_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_sdp.py b/tangostationcontrol/integration_test/default/devices/test_device_sdp.py index bfcf1bb6af6ac6ba1fb3c94d7aa28b54ca4eaf72..ec89efef30af8c74145d6379530d9658e21c3c63 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_sdp.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_sdp.py @@ -7,4 +7,4 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceSDP(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/SDP/1") + super().setUp("STAT/SDP/HBA") diff --git a/tangostationcontrol/integration_test/default/devices/test_device_sdpfirmware.py b/tangostationcontrol/integration_test/default/devices/test_device_sdpfirmware.py index deb9ef968185ffb2b867f35961a22f12de932397..dfaf9030187c2afaf32bada38902a416c06cbad3 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_sdpfirmware.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_sdpfirmware.py @@ -9,7 +9,7 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceSDPFirmware(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/SDPFirmware/1") + super().setUp("STAT/SDPFirmware/HBA") def test_device_sdpfirmware_read_attribute(self): """Test if we can read an attribute obtained over OPC-UA""" diff --git a/tangostationcontrol/integration_test/default/devices/test_device_sst.py b/tangostationcontrol/integration_test/default/devices/test_device_sst.py index 9ad21fcbe64bfc345b1f2bf6b36ed812d371dc73..1f0781110daeed79efe82c09dace80825f9ef0a2 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_sst.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_sst.py @@ -14,7 +14,7 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceSST(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/SST/1") + super().setUp("STAT/SST/HBA") def test_device_read_all_attributes(self): # We need to connect to SDP first to read some of our attributes @@ -25,7 +25,7 @@ class TestDeviceSST(AbstractTestBases.TestDeviceBase): def setup_sdpfirmware(self): # setup SDP Firmware - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() sdpfirmware_proxy.warm_boot() sdpfirmware_proxy.set_defaults() @@ -33,7 +33,7 @@ class TestDeviceSST(AbstractTestBases.TestDeviceBase): def setup_sdp(self): # setup SDP, on which this device depends - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() sdp_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py b/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py index ac04846950208e38a3865c71823d5a5af02838f0..32bf3719c1e8f5964d177608a01dde8f18070dcd 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py @@ -21,8 +21,8 @@ logger = logging.getLogger() class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase): - sdp_name = "STAT/SDP/1" - sdp_firmware_name = "STAT/SDPFirmware/1" + sdp_name = "STAT/SDP/HBA" + sdp_firmware_name = "STAT/SDPFirmware/HBA" rcu2h_name = "STAT/RECVH/1" temperature_manager_name = "STAT/TemperatureManager/1" diff --git a/tangostationcontrol/integration_test/default/devices/test_device_xst.py b/tangostationcontrol/integration_test/default/devices/test_device_xst.py index 4b0811b2a9729501af011a91633c72eba94298a5..806f3148d4f297d3ed35e142941d1fc9fcc5515f 100644 --- a/tangostationcontrol/integration_test/default/devices/test_device_xst.py +++ b/tangostationcontrol/integration_test/default/devices/test_device_xst.py @@ -8,7 +8,7 @@ from integration_test.default.devices.base import AbstractTestBases class TestDeviceSST(AbstractTestBases.TestDeviceBase): def setUp(self): """Intentionally recreate the device object in each test""" - super().setUp("STAT/XST/1") + super().setUp("STAT/XST/HBA") def test_device_read_all_attributes(self): # We need to connect to SDP first to read some of our attributes @@ -18,7 +18,7 @@ class TestDeviceSST(AbstractTestBases.TestDeviceBase): def setup_sdp(self): # setup SDP, on which this device depends - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() sdp_proxy.warm_boot() sdp_proxy.set_defaults() diff --git a/tangostationcontrol/integration_test/default/devices/test_observation.py b/tangostationcontrol/integration_test/default/devices/test_observation.py index 05b26a192fdd5d906eb10774c737b5297aaf1c42..e262c512dc262ea7d22fc03c3df7b43d8df0579a 100644 --- a/tangostationcontrol/integration_test/default/devices/test_observation.py +++ b/tangostationcontrol/integration_test/default/devices/test_observation.py @@ -25,8 +25,8 @@ class TestObservation(base.IntegrationTestCase): # make sure any devices we depend on are also started for device in [ "STAT/RECVH/1", - "STAT/SDP/1", - "STAT/Beamlet/1", + "STAT/SDP/HBA", + "STAT/Beamlet/HBA", "STAT/DigitalBeam/HBA", "STAT/TileBeam/HBA", "STAT/AntennaField/HBA", diff --git a/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py b/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py index e67423f9d720d4e3306ef5ca0661099669888775..533366f5d7f68295973c4ba00138fd690de0ec54 100644 --- a/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py +++ b/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py @@ -4,6 +4,7 @@ import importlib import os import sys +import fnmatch import numpy from tango import Database @@ -70,9 +71,12 @@ class TestPrometheusClient(BaseIntegrationTestCase): config_retrieved_devices = [ *policy.config["devices"].keys() ] # list of device names from policy file - for d in config_retrieved_devices: - if "*" not in d: # filter out wildcards - self.assertIn(d, policy_devices) + + # any device in the db matching a key should be present + for d in db_devices: + for c in config_retrieved_devices: + if fnmatch.fnmatch(d.casefold(), c.casefold()): + self.assertIn(d, policy_devices) def test_archiver_policy_attribute_list(self): """Test if the full set of archiving policy for the given device is retrieved""" diff --git a/tangostationcontrol/integration_test/digitalbeam_performance/test_digitalbeam_performance.py b/tangostationcontrol/integration_test/digitalbeam_performance/test_digitalbeam_performance.py index 0f92a29eea6515abb8cff03ef43eb20eb13e701c..0b48e86d404d08c58777b004b2f83acadac0c408 100644 --- a/tangostationcontrol/integration_test/digitalbeam_performance/test_digitalbeam_performance.py +++ b/tangostationcontrol/integration_test/digitalbeam_performance/test_digitalbeam_performance.py @@ -37,10 +37,10 @@ class TestDigitalbeamPerformance(base.IntegrationTestCase): tracking=False, ): # Setup multi SDP / recv and separate hba / lba antennafield / digitalbeam - for i, item in enumerate(["HBA", "LBA"]): - sdpfirmware_proxies.append(TestDeviceProxy(f"STAT/SDPFirmware/{i + 1}")) - sdp_proxies.append(TestDeviceProxy(f"STAT/SDP/{i + 1}")) - beamlet_proxies.append(TestDeviceProxy(f"STAT/Beamlet/{i + 1}")) + for item in ["HBA", "LBA"]: + sdpfirmware_proxies.append(TestDeviceProxy(f"STAT/SDPFirmware/{item}")) + sdp_proxies.append(TestDeviceProxy(f"STAT/SDP/{item}")) + beamlet_proxies.append(TestDeviceProxy(f"STAT/Beamlet/{item}")) antenna_field_proxies.append(TestDeviceProxy(f"STAT/AntennaField/{item}")) beam_proxies.append(TestDeviceProxy(f"STAT/DigitalBeam/{item}")) recv_proxies.append(TestDeviceProxy(f"STAT/RECV{item[0]}/1")) diff --git a/tangostationcontrol/integration_test/tilebeam_performance/test_tilebeam_performance.py b/tangostationcontrol/integration_test/tilebeam_performance/test_tilebeam_performance.py index 247f1188ef1bd15c2be69332f3a69b6b9ef1aa22..8eda5ab52609657f36a19bedc221f5927fa80eef 100644 --- a/tangostationcontrol/integration_test/tilebeam_performance/test_tilebeam_performance.py +++ b/tangostationcontrol/integration_test/tilebeam_performance/test_tilebeam_performance.py @@ -40,14 +40,14 @@ class TestTilebeamPerformance(base.IntegrationTestCase): manager_proxy.put_property({"Control_Children": manager_children}) # SDPFirmware and SDP must be ready before AntennaField - sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/1") + sdpfirmware_proxy = TestDeviceProxy("STAT/SDPFirmware/HBA") sdpfirmware_proxy.off() self.assertTrue(sdpfirmware_proxy.state() is DevState.OFF) sdpfirmware_proxy.warm_boot() sdpfirmware_proxy.set_defaults() self.assertTrue(sdpfirmware_proxy.state() is DevState.ON) - sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy = TestDeviceProxy("STAT/SDP/HBA") sdp_proxy.off() self.assertTrue(sdp_proxy.state() is DevState.OFF) sdp_proxy.warm_boot() @@ -78,7 +78,7 @@ class TestTilebeamPerformance(base.IntegrationTestCase): proxy.put_property( { "Control_Children": [ - "STAT/SDPFirmware/1", + "STAT/SDPFirmware/HBA", f"STAT/RECVH/{n}", f"STAT/tilebeam/HBA{n-1}", ], diff --git a/tangostationcontrol/requirements.txt b/tangostationcontrol/requirements.txt index 235750e1e7a4f8d26acd386047588da86a3f8dd8..0c2234af9646cb17c05e1e4d5b0cb3348e1090d3 100644 --- a/tangostationcontrol/requirements.txt +++ b/tangostationcontrol/requirements.txt @@ -10,7 +10,7 @@ psycopg2-binary >= 2.9.2 # LGPL pyasn1 == 0.4.8 # BSD, pinned because https://github.com/pyasn1/pyasn1/issues/28 pysnmp >= 0.1.7 # BSD h5py >= 3.1.0 # BSD -jsonschema >= 4.0.0 # MIT +jsonschema == 4.17.3 # MIT docker >= 5.0.3 # Apache 2 python-logstash-async >= 2.5.0 # MIT python-casacore >= 3.3.1 # LGPLv3 diff --git a/tangostationcontrol/tangostationcontrol/configuration/observation_settings.py b/tangostationcontrol/tangostationcontrol/configuration/observation_settings.py index 19cf94f2b5a0bf684762fa19c3f4fbd7cf30682f..4e8c4e5df1e6e77927acd97d4c54c5f0599070f5 100644 --- a/tangostationcontrol/tangostationcontrol/configuration/observation_settings.py +++ b/tangostationcontrol/tangostationcontrol/configuration/observation_settings.py @@ -14,6 +14,7 @@ class ObservationSettings(_ConfigurationBase): self, observation_id: int, stop_time: datetime, + antenna_field: str, antenna_set: str, filter: str, SAPs: Sequence[Sap], @@ -22,6 +23,7 @@ class ObservationSettings(_ConfigurationBase): ): self.observation_id = observation_id self.stop_time = stop_time + self.antenna_field = antenna_field self.antenna_set = antenna_set self.filter = filter self.SAPs = SAPs @@ -32,6 +34,7 @@ class ObservationSettings(_ConfigurationBase): yield from { "observation_id": self.observation_id, "stop_time": self.stop_time.isoformat(), + "antenna_field": self.antenna_field, "antenna_set": self.antenna_set, "filter": self.filter, "SAPs": [dict(s) for s in self.SAPs], @@ -45,6 +48,7 @@ class ObservationSettings(_ConfigurationBase): return ObservationSettings( json_dct["observation_id"], datetime.fromisoformat(json_dct["stop_time"]), + json_dct["antenna_field"], json_dct["antenna_set"], json_dct["filter"], json_dct["SAPs"], diff --git a/tangostationcontrol/tangostationcontrol/devices/boot.py b/tangostationcontrol/tangostationcontrol/devices/boot.py index 152fdf1549feb8b7aa43de7bb278c7d36bd71f3e..d942e27dabbce020533b50875c776128f6df6101 100644 --- a/tangostationcontrol/tangostationcontrol/devices/boot.py +++ b/tangostationcontrol/tangostationcontrol/devices/boot.py @@ -263,13 +263,13 @@ class Boot(LOFARDevice): "STAT/RECVH/1", "STAT/RECVL/1", "STAT/UNB2/1", # Uniboards host SDP, so initialise them first - "STAT/SDPFirmware/1", - "STAT/SDP/1", + "STAT/SDPFirmware/HBA", + "STAT/SDP/HBA", # SDP controls the mask for SST/XST/BST/Beamlet, so initialise it first - "STAT/BST/1", - "STAT/SST/1", - "STAT/XST/1", - "STAT/Beamlet/1", + "STAT/BST/HBA", + "STAT/SST/HBA", + "STAT/XST/HBA", + "STAT/Beamlet/HBA", "STAT/AntennaField/HBA", # Accesses RECVH # "STAT/AntennaField/LBA", # Accesses RECVL "STAT/TileBeam/HBA", # Accesses AntennaField diff --git a/tangostationcontrol/tangostationcontrol/devices/interfaces/hierarchy.py b/tangostationcontrol/tangostationcontrol/devices/interfaces/hierarchy.py index 2eef35a1749667c82fb6814e3efb2c9fb598ac36..a6c72933a1a41804e7fbc655f8b5d350d2cf30be 100644 --- a/tangostationcontrol/tangostationcontrol/devices/interfaces/hierarchy.py +++ b/tangostationcontrol/tangostationcontrol/devices/interfaces/hierarchy.py @@ -163,7 +163,13 @@ class AbstractHierarchy(ABC): proxies = {} for child in children: child = child.casefold() - proxies[child] = self._get_children(child, depth - 1) + + try: + proxies[child] = self._get_children(child, depth - 1) + except Exception as e: + raise ValueError( + f"Could not obtain proxy to child {child} of parent {proxy.dev_name()}" + ) from e return {"proxy": proxy, "children": proxies} diff --git a/tangostationcontrol/tangostationcontrol/devices/observation.py b/tangostationcontrol/tangostationcontrol/devices/observation.py index 8a9a2427dce8a02e223e87acffb6a563f3ef8736..f7c871f68e4059d1e42c626a43095dd3e4b6e26f 100644 --- a/tangostationcontrol/tangostationcontrol/devices/observation.py +++ b/tangostationcontrol/tangostationcontrol/devices/observation.py @@ -52,6 +52,7 @@ class Observation(LOFARDevice): ) observation_id_R = attribute(dtype=numpy.int64, access=AttrWriteType.READ) stop_time_R = attribute(dtype=numpy.float64, access=AttrWriteType.READ) + antenna_field_R = attribute(dtype=str, access=AttrWriteType.READ) antenna_set_R = attribute(dtype=str, access=AttrWriteType.READ) filter_R = attribute(dtype=str, access=AttrWriteType.READ) saps_subband_R = attribute( @@ -107,26 +108,30 @@ class Observation(LOFARDevice): self._num_saps = len(self._observation_settings.SAPs) self._saps_pointing = self._build_saps_pointing(self._observation_settings) + antennafield = self._observation_settings.antenna_field + # Set a reference of AntennaField device that is correlated to this device util = Util.instance() # TODO(Stefano): set a proper policy for the devices instance number # It cannot be inherited from the Observation instance number # (i.e. Observation_id) self.antennafield_proxy = create_device_proxy( - f"{util.get_ds_inst_name()}/AntennaField/HBA" + f"{util.get_ds_inst_name()}/AntennaField/{antennafield}" ) # Set a reference of Beamlet device that is correlated to this device - self.beamlet_proxy = create_device_proxy(f"{util.get_ds_inst_name()}/Beamlet/1") + self.beamlet_proxy = create_device_proxy( + f"{util.get_ds_inst_name()}/Beamlet/{antennafield}" + ) # Set a reference of DigitalBeam device that is correlated to this device self.digitalbeam_proxy = create_device_proxy( - f"{util.get_ds_inst_name()}/DigitalBeam/HBA" + f"{util.get_ds_inst_name()}/DigitalBeam/{antennafield}" ) # Set a reference of TileBeam device that is correlated to this device self.tilebeam_proxy = create_device_proxy( - f"{util.get_ds_inst_name()}/Tilebeam/HBA" + f"{util.get_ds_inst_name()}/Tilebeam/{antennafield}" ) logger.info( @@ -202,6 +207,13 @@ class Observation(LOFARDevice): """Return the stop_time_R attribute.""" return self._observation_settings.stop_time.timestamp() + @only_in_states([DevState.STANDBY, DevState.ON]) + @fault_on_error() + @log_exceptions() + def read_antenna_field_R(self): + """Return the antenna_field_R attribute.""" + return self._observation_settings.antenna_field + @only_in_states([DevState.STANDBY, DevState.ON]) @fault_on_error() @log_exceptions() diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py b/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py index f5c6dd33e32a856581ec7dfc3d59509b129b877d..4bd3906a9f8f987472bd3904bd73448805615494 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py @@ -101,7 +101,7 @@ class Beamlet(OPCUADevice): dtype=str, doc="Which SDP device subscribed for this beamlet", mandatory=False, - default_value="STAT/SDP/1", + default_value="STAT/SDP/HBA", ) FIRST_DEFAULT_SETTINGS = [ diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py b/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py index 4e9656dbebc030968541425376aa2f92c831c92a..15c06b24dbc46ef96003794d3611a437379e47f9 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py @@ -70,7 +70,7 @@ class DigitalBeam(BeamDevice): dtype=str, doc="Which Beamlet represents the FPGAs to steer.", mandatory=False, - default_value="STAT/Beamlet/1", + default_value="STAT/Beamlet/HBA", ) # ---------- diff --git a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py index ba6ce85c25d93574efd120449ac1dc3d4098fd7c..bd006b767c49f9327327194cc0f207a4f9d78a4e 100644 --- a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py +++ b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py @@ -69,7 +69,7 @@ class TemperatureManager(LOFARDevice): dtype=[str], mandatory=False, default_value=[ - "STAT/SDP/1", + "STAT/SDP/HBA", "STAT/UNB2/1", "STAT/RECVH/1", "STAT/RECVL/1", diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_observation_base.py b/tangostationcontrol/tangostationcontrol/test/devices/test_observation_base.py index a8740461ad0baeb2b5e1aff08a3ea9f556244616..18cb8feb5e24dd4c569f86df6797d50e4784a41f 100644 --- a/tangostationcontrol/tangostationcontrol/test/devices/test_observation_base.py +++ b/tangostationcontrol/tangostationcontrol/test/devices/test_observation_base.py @@ -7,6 +7,7 @@ class TestObservationBase: { "observation_id": 12345, "stop_time": "2106-02-07T00:00:00", + "antenna_field": "HBA", "antenna_set": "ALL", "filter": "HBA_110_190", "SAPs": [{ diff --git a/tangostationcontrol/test/common/test_observation_controller.py b/tangostationcontrol/test/common/test_observation_controller.py index 16e81ad5c3b58ba22d276b3bf3e738d44414911c..3aa1091ab8212dee9233c7e0b8bec47570775171 100644 --- a/tangostationcontrol/test/common/test_observation_controller.py +++ b/tangostationcontrol/test/common/test_observation_controller.py @@ -43,6 +43,7 @@ class TestRunningObservation(base.TestCase): SETTINGS = ObservationSettings( 5, datetime.fromisoformat("2022-10-26T11:35:54.704150"), + "HBA", "ALL", "filter settings", [Sap([3, 2], Pointing(1.2, 2.1, "LMN")), Sap([1], Pointing(3.3, 4.4, "MOON"))], diff --git a/tangostationcontrol/test/configuration/_mock_requests.py b/tangostationcontrol/test/configuration/_mock_requests.py index cf9c177004e6f48fe90f9796aaf1501f98ea9c63..314c1b40d9cfad27f73c380b53d98d4b2971cbd7 100644 --- a/tangostationcontrol/test/configuration/_mock_requests.py +++ b/tangostationcontrol/test/configuration/_mock_requests.py @@ -79,6 +79,7 @@ OBSERVATION_SETTINGS_SCHEMA = """ "required": [ "observation_id", "stop_time", + "antenna_field", "antenna_set", "filter", "SAPs" @@ -92,6 +93,9 @@ OBSERVATION_SETTINGS_SCHEMA = """ "type": "string", "format": "date-time" }, + "antenna_field": { + "type": "string" + }, "antenna_set": { "type": "string" }, diff --git a/tangostationcontrol/test/configuration/test_observation_settings.py b/tangostationcontrol/test/configuration/test_observation_settings.py index 4a3effeaa159034480b4f017920615e68737053f..7f67d02e141da7e663b8dd480f0015c11ed23013 100644 --- a/tangostationcontrol/test/configuration/test_observation_settings.py +++ b/tangostationcontrol/test/configuration/test_observation_settings.py @@ -18,6 +18,7 @@ class TestObservationSettings(base.TestCase): def test_from_json(self, _): sut = ObservationSettings.from_json( '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", ' + '"antenna_field": "HBA", ' '"antenna_set": "ALL", "filter": "filter_settings",' '"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}]}' ) @@ -30,6 +31,7 @@ class TestObservationSettings(base.TestCase): sut = ObservationSettings.from_json( '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", ' + '"antenna_field": "HBA", ' '"antenna_set": "ALL", "filter": "filter_settings",' '"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],' '"tile_beam": {"angle1":2.2, "angle2": 3.1, "direction_type":"MOON"} }' @@ -41,6 +43,7 @@ class TestObservationSettings(base.TestCase): sut = ObservationSettings.from_json( '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", ' + '"antenna_field": "HBA", ' '"antenna_set": "ALL", "filter": "filter_settings",' '"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],' '"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}' @@ -51,19 +54,19 @@ class TestObservationSettings(base.TestCase): def test_from_json_type_missmatch(self, _): for json in [ # observation_id - '{"observation_id": "3", "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": "3", "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # stop_time - '{"observation_id": 3, "stop_time": "test", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "test", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # antenna_set - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": 4, "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": 4, "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # filter - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": 1,"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": 1,"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # SAPs - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": {"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}},"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', - # '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [1],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', - # '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": 1, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": {"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}},"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + # '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [1],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + # '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": 1, "first_beamlet": 2}', # first_beamlet - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": "2"}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": "2"}', ]: with self.assertRaises((ValidationError, ValueError), msg=f"{json}"): ObservationSettings.from_json(json) @@ -71,17 +74,19 @@ class TestObservationSettings(base.TestCase): def test_from_json_missing_fields(self, _): for json in [ # observation_id - '{"stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # stop_time - '{"observation_id": 3, "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + # antenna_field + '{"observation_id": 3, "antenna_set": "ALL", "stop_time": "2012-04-23T18:25:43", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # antenna_set - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "antenna_field": "HBA", "stop_time": "2012-04-23T18:25:43", "filter": "filter_settings","SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # filter - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # SAPs - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', # SAPs (empty list) - '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', + '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", "antenna_field": "HBA", "antenna_set": "ALL", "filter": "filter_settings","SAPs": [],"tile_beam": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}, "first_beamlet": 2}', ]: with self.assertRaises((ValidationError, ValueError), msg=f"{json}"): ObservationSettings.from_json(json) @@ -90,6 +95,7 @@ class TestObservationSettings(base.TestCase): sut = ObservationSettings( 5, datetime.fromisoformat("2022-10-26T11:35:54.704150"), + "HBA", "ALL", "filter settings", [ @@ -100,6 +106,7 @@ class TestObservationSettings(base.TestCase): self.assertEqual( sut.to_json(), '{"observation_id": 5, "stop_time": "2022-10-26T11:35:54.704150", ' + '"antenna_field": "HBA", ' '"antenna_set": "ALL", "filter": "filter settings", "SAPs": ' '[{"subbands": [3, 2], "pointing": {"angle1": 1.2, "angle2": 2.1, ' '"direction_type": "LMN"}}, {"subbands": [1], "pointing": {"angle1": 3.3, ' @@ -112,6 +119,7 @@ class TestObservationSettings(base.TestCase): with self.assertRaises(RefResolutionError): ObservationSettings.from_json( '{"observation_id": 3, "stop_time": "2012-04-23T18:25:43", ' + '"antenna_field": "HBA", ' '"antenna_set": "ALL", "filter": "filter_settings",' '"SAPs": [{"subbands": [3, 2, 1], "pointing": {"angle1":1.2, "angle2": 2.1, "direction_type":"LMN"}}]}' )