Skip to content
Snippets Groups Projects
Commit 22d5ee45 authored by Taya Snijder's avatar Taya Snijder
Browse files

Merge branch 'L2SS-801_rename_pdu_to_psoc' into 'master'

Resolve L2SS-801 "Rename pdu to psoc"

Closes L2SS-801

See merge request !376
parents 0399856a 5f09be83
No related branches found
No related tags found
1 merge request!376Resolve L2SS-801 "Rename pdu to psoc"
Showing
with 40 additions and 41 deletions
...@@ -100,7 +100,7 @@ docker_build_image_all: ...@@ -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-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 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-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-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-sdp latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-bst latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-bst latest
...@@ -256,17 +256,17 @@ docker_build_image_device_apspu: ...@@ -256,17 +256,17 @@ docker_build_image_device_apspu:
script: script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell # 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 - 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 extends: .base_docker_images_except
only: only:
refs: refs:
- merge_requests - merge_requests
changes: changes:
- docker-compose/device-pdu.yml - docker-compose/device-psoc.yml
- docker-compose/lofar-device-base/* - docker-compose/lofar-device-base/*
script: script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell # 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: docker_build_image_device_tilebeam:
extends: .base_docker_images_except extends: .base_docker_images_except
only: only:
......
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
} }
} }
}, },
"PDU": { "PSOC": {
"STAT": { "STAT": {
"PDU": { "PSOC": {
"STAT/PDU/1": { "STAT/PSOC/1": {
"properties": { "properties": {
"SNMP_host": ["10.87.2.145"], "SNMP_host": ["10.87.2.145"],
"SNMP_community": ["public"], "SNMP_community": ["public"],
......
...@@ -8,8 +8,8 @@ volumes: ...@@ -8,8 +8,8 @@ volumes:
iers-data: {} iers-data: {}
services: services:
device-pdu: device-psoc:
image: device-pdu image: device-psoc
# build explicitly, as docker-compose does not understand a local image # build explicitly, as docker-compose does not understand a local image
# being shared among services. # being shared among services.
build: build:
...@@ -17,7 +17,7 @@ services: ...@@ -17,7 +17,7 @@ services:
dockerfile: docker-compose/lofar-device-base/Dockerfile dockerfile: docker-compose/lofar-device-base/Dockerfile
args: args:
SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} 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: logging:
driver: "json-file" driver: "json-file"
options: options:
...@@ -38,5 +38,5 @@ services: ...@@ -38,5 +38,5 @@ services:
- bin/start-ds.sh - bin/start-ds.sh
# configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA # 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 # 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 restart: unless-stopped
...@@ -9,7 +9,7 @@ xst = DeviceProxy("STAT/XST/1") ...@@ -9,7 +9,7 @@ xst = DeviceProxy("STAT/XST/1")
unb2 = DeviceProxy("STAT/UNB2/1") unb2 = DeviceProxy("STAT/UNB2/1")
boot = DeviceProxy("STAT/Boot/1") boot = DeviceProxy("STAT/Boot/1")
tilebeam = DeviceProxy("STAT/TileBeam/1") tilebeam = DeviceProxy("STAT/TileBeam/1")
pdu = DeviceProxy("STAT/PDU/1") psoc = DeviceProxy("STAT/PSOC/1")
beamlet = DeviceProxy("STAT/Beamlet/1") beamlet = DeviceProxy("STAT/Beamlet/1")
digitalbeam = DeviceProxy("STAT/DigitalBeam/1") digitalbeam = DeviceProxy("STAT/DigitalBeam/1")
antennafield = DeviceProxy("STAT/AntennaField/1") antennafield = DeviceProxy("STAT/AntennaField/1")
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
}, },
"STAT/Docker/1": { "STAT/Docker/1": {
}, },
"STAT/PDU/1": { "STAT/PSOC/1": {
}, },
"STAT/RECV/1": { "STAT/RECV/1": {
"include": [ "include": [
......
...@@ -69,7 +69,7 @@ sleep 1 # dsconfig container must be up and running... ...@@ -69,7 +69,7 @@ sleep 1 # dsconfig container must be up and running...
# shellcheck disable=SC2016 # shellcheck disable=SC2016
echo '/usr/local/bin/wait-for-it.sh ${TANGO_HOST} --strict --timeout=300 -- true' | make run dsconfig bash - 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" SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim"
# Build only the required images, please do not build everything that makes CI # Build only the required images, please do not build everything that makes CI
......
.. _pdu:
PDU
====================
The ``pdu == DeviceProxy("STAT/PDU/1")`` device controls the Power Distribution
Unit (PDU)
.. _psoc:
PSOC
====================
The ``psoc == DeviceProxy("STAT/PSOC/1")`` device controls the Power Distribution
Unit (PSOC)
...@@ -25,7 +25,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st ...@@ -25,7 +25,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st
devices/antennafield devices/antennafield
devices/boot devices/boot
devices/docker devices/docker
devices/pdu devices/psoc
devices/recv devices/recv
devices/sdp devices/sdp
devices/bst-sst-xst devices/bst-sst-xst
......
...@@ -36,7 +36,7 @@ where=. ...@@ -36,7 +36,7 @@ where=.
console_scripts = console_scripts =
l2ss-apsct = tangostationcontrol.devices.apsct:main l2ss-apsct = tangostationcontrol.devices.apsct:main
l2ss-apspu = tangostationcontrol.devices.apspu: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-tilebeam = tangostationcontrol.devices.tilebeam:main
l2ss-beamlet = tangostationcontrol.devices.sdp.beamlet:main l2ss-beamlet = tangostationcontrol.devices.sdp.beamlet:main
l2ss-digitalbeam = tangostationcontrol.devices.sdp.digitalbeam:main l2ss-digitalbeam = tangostationcontrol.devices.sdp.digitalbeam:main
......
...@@ -233,7 +233,7 @@ class Boot(lofar_device): ...@@ -233,7 +233,7 @@ class Boot(lofar_device):
dtype='DevVarStringArray', dtype='DevVarStringArray',
mandatory=False, mandatory=False,
default_value=["STAT/Docker/1", # Docker controls the device containers, so it goes before anything else 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/APSPU/1", # APS Power Units control other hardware we want to initialise
"STAT/APSCT/1", "STAT/APSCT/1",
"STAT/RECV/1", # RCUs are input for SDP, so initialise them first "STAT/RECV/1", # RCUs are input for SDP, so initialise them first
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Distributed under the terms of the APACHE license. # Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info. # 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")) ...@@ -29,11 +29,11 @@ debug.setLogger(debug.Debug('searcher', "compiler", "borrower", "reader"))
logger = logging.getLogger() logger = logging.getLogger()
__all__ = ["PDU", "main"] __all__ = ["PSOC", "main"]
@device_logging_to_python() @device_logging_to_python()
class PDU(lofar_device): class PSOC(lofar_device):
# ----------------- # -----------------
# Device Properties # Device Properties
# ----------------- # -----------------
...@@ -70,9 +70,9 @@ class PDU(lofar_device): ...@@ -70,9 +70,9 @@ class PDU(lofar_device):
# ---------- # ----------
# Attributes # Attributes
# ---------- # ----------
sockets_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPDUOutletCtl", "index": 1}, dims=(8,), datatype=str) 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": "sPDUMasterState"}, 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": "rPDULoadStatusLoad", "index": 1}, datatype=numpy.int64) 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) uptime_R = attribute_wrapper(comms_annotation={"mib": "SNMPv2-MIB", "name": "sysUpTime"}, datatype=numpy.int64)
# -------- # --------
...@@ -116,7 +116,7 @@ class PDU(lofar_device): ...@@ -116,7 +116,7 @@ class PDU(lofar_device):
def _toggle_socket(self, socket_name, on: bool): 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: try:
...@@ -131,7 +131,7 @@ class PDU(lofar_device): ...@@ -131,7 +131,7 @@ class PDU(lofar_device):
socket_set = "outletOff" socket_set = "outletOff"
# create the snmp_attribute for the correct socket # 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 # write the correct value
attr.write_function([socket_set]) attr.write_function([socket_set])
...@@ -189,5 +189,5 @@ class PDU(lofar_device): ...@@ -189,5 +189,5 @@ class PDU(lofar_device):
# Run server # Run server
# ---------- # ----------
def main(**kwargs): def main(**kwargs):
"""Main function of the PDU module.""" """Main function of the PSOC module."""
return entry(PDU, **kwargs) return entry(PSOC, **kwargs)
...@@ -153,7 +153,7 @@ class TemperatureManager(lofar_device): ...@@ -153,7 +153,7 @@ class TemperatureManager(lofar_device):
DeviceProxy("STAT/RECV/1").off() DeviceProxy("STAT/RECV/1").off()
DeviceProxy("STAT/APSCT/1").off() DeviceProxy("STAT/APSCT/1").off()
DeviceProxy("STAT/APSPU/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") logger.warning(f"Temperature alarm triggered auto shutdown of all hardware devices")
# ---------- # ----------
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
from tangostationcontrol.integration_test.default.devices.base import AbstractTestBases from tangostationcontrol.integration_test.default.devices.base import AbstractTestBases
class TestDevicePDU(AbstractTestBases.TestDeviceBase): class TestDevicePSOC(AbstractTestBases.TestDeviceBase):
def setUp(self): def setUp(self):
super().setUp("STAT/PDU/1") super().setUp("STAT/PSOC/1")
def test_device_read_all_attributes(self): def test_device_read_all_attributes(self):
"""Mask reading attributes not possible without SNMP""" """Mask reading attributes not possible without SNMP"""
......
...@@ -60,7 +60,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase): ...@@ -60,7 +60,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
self.proxy.on() self.proxy.on()
devices = [DeviceProxy("STAT/SDP/1"), DeviceProxy("STAT/UNB2/1"), DeviceProxy("STAT/RECV/1"), 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 # make sure none of the devices are in the OFF state. Any other state is fine
for dev in devices: for dev in devices:
......
...@@ -172,7 +172,6 @@ class TestSNMP(base.TestCase): ...@@ -172,7 +172,6 @@ class TestSNMP(base.TestCase):
res_lst = [] res_lst = []
# set hlapi.ObjectType to the mocked m_ObjectType function
hlapi.ObjectType = loop_test hlapi.ObjectType = loop_test
# call the write function. This function should now call m_ObjectType itself. # call the write function. This function should now call m_ObjectType itself.
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
from tangostationcontrol.test.devices import device_base from tangostationcontrol.test.devices import device_base
class TestPDUDevice(device_base.DeviceTestCase): class TestPSOCDevice(device_base.DeviceTestCase):
# some dummy values for mandatory properties # some dummy values for mandatory properties
...@@ -28,4 +28,4 @@ class TestPDUDevice(device_base.DeviceTestCase): ...@@ -28,4 +28,4 @@ class TestPDUDevice(device_base.DeviceTestCase):
def setUp(self): def setUp(self):
# DeviceTestCase setUp patches lofar_device DeviceProxy # DeviceTestCase setUp patches lofar_device DeviceProxy
super(TestPDUDevice, self).setUp() super(TestPSOCDevice, self).setUp()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment