diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4177e47e72d01490291482bdf66d0a732f8903c2..cc246b077bca48b5e6616a5ac7d2d2b55c4e2370 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,7 @@ docker_build_image_all: - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-docker latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-observation latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-observation_control latest - - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-pdu latest + - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-psoc latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-recv latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-sdp latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-bst latest @@ -256,17 +256,17 @@ docker_build_image_device_apspu: script: # Do not remove 'bash' or statement will be ignored by primitive docker shell - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apspu $tag -docker_build_image_device_pdu: +docker_build_image_device_psoc: extends: .base_docker_images_except only: refs: - merge_requests changes: - - docker-compose/device-pdu.yml + - docker-compose/device-psoc.yml - docker-compose/lofar-device-base/* script: # Do not remove 'bash' or statement will be ignored by primitive docker shell - - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-pdu $tag + - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-psoc $tag docker_build_image_device_tilebeam: extends: .base_docker_images_except only: diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index 3ef551007758ef6713c33c666adb0c6152e12fc9..70c85e9bd31a97e84758a08bebae82106b702a87 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -41,10 +41,10 @@ } } }, - "PDU": { + "PSOC": { "STAT": { - "PDU": { - "STAT/PDU/1": { + "PSOC": { + "STAT/PSOC/1": { "properties": { "SNMP_host": ["10.87.2.145"], "SNMP_community": ["public"], diff --git a/docker-compose/device-pdu.yml b/docker-compose/device-psoc.yml similarity index 83% rename from docker-compose/device-pdu.yml rename to docker-compose/device-psoc.yml index c1c2af57f2c385c41b241322fb84366ab7e06c88..b7b9738b0c4d6d40f2d4ff6c2f9f0698b0957a17 100644 --- a/docker-compose/device-pdu.yml +++ b/docker-compose/device-psoc.yml @@ -8,8 +8,8 @@ volumes: iers-data: {} services: - device-pdu: - image: device-pdu + device-psoc: + image: device-psoc # build explicitly, as docker-compose does not understand a local image # being shared among services. build: @@ -17,7 +17,7 @@ services: dockerfile: docker-compose/lofar-device-base/Dockerfile args: SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} - container_name: ${CONTAINER_NAME_PREFIX}device-pdu + container_name: ${CONTAINER_NAME_PREFIX}device-psoc logging: driver: "json-file" options: @@ -38,5 +38,5 @@ services: - bin/start-ds.sh # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA # can't know about our Docker port forwarding - - l2ss-pdu PDU STAT -v -ORBendPoint giop:tcp:device-pdu:5714 -ORBendPointPublish giop:tcp:${HOSTNAME}:5714 + - l2ss-psoc PSOC STAT -v -ORBendPoint giop:tcp:device-psoc:5714 -ORBendPointPublish giop:tcp:${HOSTNAME}:5714 restart: unless-stopped diff --git a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py index 26bd47d70b9a6175a45c7a2c2bbebbe19a8326b6..af329f05b03ae4bdc3b10542e96949c2f5e2b604 100644 --- a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py +++ b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py @@ -9,7 +9,7 @@ xst = DeviceProxy("STAT/XST/1") unb2 = DeviceProxy("STAT/UNB2/1") boot = DeviceProxy("STAT/Boot/1") tilebeam = DeviceProxy("STAT/TileBeam/1") -pdu = DeviceProxy("STAT/PDU/1") +psoc = DeviceProxy("STAT/PSOC/1") beamlet = DeviceProxy("STAT/Beamlet/1") digitalbeam = DeviceProxy("STAT/DigitalBeam/1") antennafield = DeviceProxy("STAT/AntennaField/1") diff --git a/docker-compose/tango-prometheus-exporter/lofar2-policy.json b/docker-compose/tango-prometheus-exporter/lofar2-policy.json index dfa82dbdc1837afcaeb696ae0021e8f015ad6658..5c7d49b01a2fdb2bf79a1b5d4559e8d9dc5e530b 100644 --- a/docker-compose/tango-prometheus-exporter/lofar2-policy.json +++ b/docker-compose/tango-prometheus-exporter/lofar2-policy.json @@ -29,7 +29,7 @@ }, "STAT/Docker/1": { }, - "STAT/PDU/1": { + "STAT/PSOC/1": { }, "STAT/RECV/1": { "include": [ diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index 691ba0b54209bedd8c536bd406efc00b16911b59..007d86d3e5f1e59d2e1b597c48cb03cda912adaa 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -69,7 +69,7 @@ sleep 1 # dsconfig container must be up and running... # shellcheck disable=SC2016 echo '/usr/local/bin/wait-for-it.sh ${TANGO_HOST} --strict --timeout=300 -- true' | make run dsconfig bash - -DEVICES="device-boot device-apsct device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-pdu device-antennafield device-temperature-manager device-observation" +DEVICES="device-boot device-apsct device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-antennafield device-temperature-manager device-observation" SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim" # Build only the required images, please do not build everything that makes CI diff --git a/tangostationcontrol/docs/source/devices/pdu.rst b/tangostationcontrol/docs/source/devices/pdu.rst deleted file mode 100644 index ca78ad3c5b890bb53e422f11df17ff1530ec5376..0000000000000000000000000000000000000000 --- a/tangostationcontrol/docs/source/devices/pdu.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _pdu: - -PDU -==================== - -The ``pdu == DeviceProxy("STAT/PDU/1")`` device controls the Power Distribution -Unit (PDU) diff --git a/tangostationcontrol/docs/source/devices/psoc.rst b/tangostationcontrol/docs/source/devices/psoc.rst new file mode 100644 index 0000000000000000000000000000000000000000..bccb7b0d487aec270be78393625da2d00c1d1b24 --- /dev/null +++ b/tangostationcontrol/docs/source/devices/psoc.rst @@ -0,0 +1,7 @@ +.. _psoc: + +PSOC +==================== + +The ``psoc == DeviceProxy("STAT/PSOC/1")`` device controls the Power Distribution +Unit (PSOC) diff --git a/tangostationcontrol/docs/source/index.rst b/tangostationcontrol/docs/source/index.rst index ac967bdf1fc84700900ddd604ac5b7a4fe9f051a..b3b686818cc758f1ed662f07bff5d4f0095b1920 100644 --- a/tangostationcontrol/docs/source/index.rst +++ b/tangostationcontrol/docs/source/index.rst @@ -25,7 +25,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st devices/antennafield devices/boot devices/docker - devices/pdu + devices/psoc devices/recv devices/sdp devices/bst-sst-xst diff --git a/tangostationcontrol/setup.cfg b/tangostationcontrol/setup.cfg index fc7e7cefc997194d5de1a6f253329aeefda67656..cd64d07bf69914aae880fa881b995333942881b3 100644 --- a/tangostationcontrol/setup.cfg +++ b/tangostationcontrol/setup.cfg @@ -36,7 +36,7 @@ where=. console_scripts = l2ss-apsct = tangostationcontrol.devices.apsct:main l2ss-apspu = tangostationcontrol.devices.apspu:main - l2ss-pdu = tangostationcontrol.devices.pdu:main + l2ss-psoc = tangostationcontrol.devices.psoc:main l2ss-tilebeam = tangostationcontrol.devices.tilebeam:main l2ss-beamlet = tangostationcontrol.devices.sdp.beamlet:main l2ss-digitalbeam = tangostationcontrol.devices.sdp.digitalbeam:main diff --git a/tangostationcontrol/tangostationcontrol/devices/boot.py b/tangostationcontrol/tangostationcontrol/devices/boot.py index 3e1dbcb6f4746422e6b3b9502f32a0594c0e1b0d..d5834e231da0423df69ba48050da5abd08d8865c 100644 --- a/tangostationcontrol/tangostationcontrol/devices/boot.py +++ b/tangostationcontrol/tangostationcontrol/devices/boot.py @@ -233,7 +233,7 @@ class Boot(lofar_device): dtype='DevVarStringArray', mandatory=False, default_value=["STAT/Docker/1", # Docker controls the device containers, so it goes before anything else - "STAT/PDU/1", # PDU boot early to detect power delivery failure as fast as possible + "STAT/PSOC/1", # PSOC boot early to detect power delivery failure as fast as possible "STAT/APSPU/1", # APS Power Units control other hardware we want to initialise "STAT/APSCT/1", "STAT/RECV/1", # RCUs are input for SDP, so initialise them first diff --git a/tangostationcontrol/tangostationcontrol/devices/pdu.py b/tangostationcontrol/tangostationcontrol/devices/psoc.py similarity index 90% rename from tangostationcontrol/tangostationcontrol/devices/pdu.py rename to tangostationcontrol/tangostationcontrol/devices/psoc.py index 99b4269decf0f7266141c60f17c1e8ec2128fe34..e599563fd4f1ad3120d86da937aac31f27dcc53e 100644 --- a/tangostationcontrol/tangostationcontrol/devices/pdu.py +++ b/tangostationcontrol/tangostationcontrol/devices/psoc.py @@ -3,7 +3,7 @@ # Distributed under the terms of the APACHE license. # See LICENSE.txt for more info. -""" PDU Device Server for LOFAR2.0 +""" PSOC Device Server for LOFAR2.0 """ @@ -29,11 +29,11 @@ debug.setLogger(debug.Debug('searcher', "compiler", "borrower", "reader")) logger = logging.getLogger() -__all__ = ["PDU", "main"] +__all__ = ["PSOC", "main"] @device_logging_to_python() -class PDU(lofar_device): +class PSOC(lofar_device): # ----------------- # Device Properties # ----------------- @@ -70,9 +70,9 @@ class PDU(lofar_device): # ---------- # Attributes # ---------- - sockets_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPDUOutletCtl", "index": 1}, dims=(8,), datatype=str) - master_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPDUMasterState"}, datatype=str) - current_load_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "rPDULoadStatusLoad", "index": 1}, datatype=numpy.int64) + sockets_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPSOCOutletCtl", "index": 1}, dims=(8,), datatype=str) + master_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPSOCMasterState"}, datatype=str) + current_load_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "rPSOCLoadStatusLoad", "index": 1}, datatype=numpy.int64) uptime_R = attribute_wrapper(comms_annotation={"mib": "SNMPv2-MIB", "name": "sysUpTime"}, datatype=numpy.int64) # -------- @@ -116,7 +116,7 @@ class PDU(lofar_device): def _toggle_socket(self, socket_name, on: bool): """ - This function is tailored to the "APS switched rack PDU", changing the psoc will require some changes to this function + This function is tailored to the "APS switched rack PSOC", changing the psoc will require some changes to this function """ try: @@ -131,7 +131,7 @@ class PDU(lofar_device): socket_set = "outletOff" # create the snmp_attribute for the correct socket - attr = snmp_attribute(self.snmp_manager.SNMP_comm, "PowerNet-MIB", name="sPDUOutletCtl", idx=socket_nr, dtype=str, dim_x=1, dim_y=0) + attr = snmp_attribute(self.snmp_manager.SNMP_comm, "PowerNet-MIB", name="sPSOCOutletCtl", idx=socket_nr, dtype=str, dim_x=1, dim_y=0) # write the correct value attr.write_function([socket_set]) @@ -189,5 +189,5 @@ class PDU(lofar_device): # Run server # ---------- def main(**kwargs): - """Main function of the PDU module.""" - return entry(PDU, **kwargs) + """Main function of the PSOC module.""" + return entry(PSOC, **kwargs) diff --git a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py index b4671a47ee7819acc551562cd0e0f224acdc0448..912753f82c655a65d785af891fbf03222db86c3b 100644 --- a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py +++ b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py @@ -153,7 +153,7 @@ class TemperatureManager(lofar_device): DeviceProxy("STAT/RECV/1").off() DeviceProxy("STAT/APSCT/1").off() DeviceProxy("STAT/APSPU/1").off() - DeviceProxy("STAT/PDU/1").off() + DeviceProxy("STAT/PSOC/1").off() logger.warning(f"Temperature alarm triggered auto shutdown of all hardware devices") # ---------- diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_psoc.py similarity index 83% rename from tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py rename to tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_psoc.py index 661c21c88d31d4306eea879d147374d90109162f..e1c3f2b20ad275542b186337adceaa2eed13eec7 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_psoc.py @@ -10,10 +10,10 @@ from tangostationcontrol.integration_test.default.devices.base import AbstractTestBases -class TestDevicePDU(AbstractTestBases.TestDeviceBase): +class TestDevicePSOC(AbstractTestBases.TestDeviceBase): def setUp(self): - super().setUp("STAT/PDU/1") + super().setUp("STAT/PSOC/1") def test_device_read_all_attributes(self): """Mask reading attributes not possible without SNMP""" diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py index 198a4cba29453a2e60665362edfa44b1cc52f63f..7944ac7434b94ad2268f642a711470ac2190640f 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py @@ -60,7 +60,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase): self.proxy.on() devices = [DeviceProxy("STAT/SDP/1"), DeviceProxy("STAT/UNB2/1"), DeviceProxy("STAT/RECV/1"), - DeviceProxy("STAT/APSCT/1"), DeviceProxy("STAT/APSPU/1"), DeviceProxy("STAT/PDU/1")] + DeviceProxy("STAT/APSCT/1"), DeviceProxy("STAT/APSPU/1"), DeviceProxy("STAT/PSOC/1")] # make sure none of the devices are in the OFF state. Any other state is fine for dev in devices: diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py index bb78a9f63dfbdc3efdf456cf05ab509a5c15d46f..a1bbeb8d1699f23b5f960d252451bf81770797b9 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py @@ -172,7 +172,6 @@ class TestSNMP(base.TestCase): res_lst = [] - # set hlapi.ObjectType to the mocked m_ObjectType function hlapi.ObjectType = loop_test # call the write function. This function should now call m_ObjectType itself. diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py b/tangostationcontrol/tangostationcontrol/test/devices/test_psoc_device.py similarity index 88% rename from tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py rename to tangostationcontrol/tangostationcontrol/test/devices/test_psoc_device.py index 7ae03cbeaea266c7017c17566c77db4e52d77e1a..f6951904d8f09b9279bcb48d2fd3a744cf4d65fa 100644 --- a/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py +++ b/tangostationcontrol/tangostationcontrol/test/devices/test_psoc_device.py @@ -10,7 +10,7 @@ from tangostationcontrol.test.devices import device_base -class TestPDUDevice(device_base.DeviceTestCase): +class TestPSOCDevice(device_base.DeviceTestCase): # some dummy values for mandatory properties @@ -28,4 +28,4 @@ class TestPDUDevice(device_base.DeviceTestCase): def setUp(self): # DeviceTestCase setUp patches lofar_device DeviceProxy - super(TestPDUDevice, self).setUp() + super(TestPSOCDevice, self).setUp()