diff --git a/csp-lmc-mid/conftest.py b/csp-lmc-mid/conftest.py index 02a4c7659282f23055f5925871968d43035a8797..751e09baf007cfc07effd511a879a2d7b122132d 100755 --- a/csp-lmc-mid/conftest.py +++ b/csp-lmc-mid/conftest.py @@ -95,3 +95,25 @@ def cbf_master(): except tango.DevFailed: continue +@pytest.fixture(scope="class") +def tm1_telstate_proxy(): + database = tango.Database() + instance_list = database.get_device_exported_for_class('TmCspSubarrayLeafNodeTest') + for instance in instance_list.value_string: + try: + if "subarray_01" in instance: + return tango.DeviceProxy(instance) + except tango.DevFailed: + continue + + +@pytest.fixture(scope="class") +def tm2_telstate_proxy(): + database = tango.Database() + instance_list = database.get_device_exported_for_class('TmCspSubarrayLeafNodeTest') + for instance in instance_list.value_string: + try: + if "subarray_02" in instance: + return tango.DeviceProxy(instance) + except tango.DevFailed: + continue diff --git a/csp-lmc-mid/csp_lmc_mid/release.py b/csp-lmc-mid/csp_lmc_mid/release.py index 86f16a94abe3d46e061728466661fba028d45198..45d53fd480a7a3e64599748f5ca3e073736ed2ce 100755 --- a/csp-lmc-mid/csp_lmc_mid/release.py +++ b/csp-lmc-mid/csp_lmc_mid/release.py @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """mid-csp-lmc""" -version = "0.5.2" +version = "0.5.3" version_info = version.split(".") description = """SKA MID CSP.LMC""" author = "INAF-OAA" diff --git a/csp-lmc-mid/docker/.release b/csp-lmc-mid/docker/.release index 49646e59a96088eac8210f99831e0f199f7f620a..929aa8087f303ff4afd268356e2e02b9f55a2091 100644 --- a/csp-lmc-mid/docker/.release +++ b/csp-lmc-mid/docker/.release @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """MID CSP.LMC""" -version = "0.5.2" +version = "0.5.3" version_info = version.split(".") description = """SKA MID CSP.LMC Classes""" author = "E.G" @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" -release=0.5.2 -tag=mid-csp-lmc-0.5.2 +release=0.5.3 +tag=mid-csp-lmc-0.5.3 diff --git a/csp-lmc-mid/docker/config/midcsplmc_dsconfig.json b/csp-lmc-mid/docker/config/midcsplmc_dsconfig.json index 6912a8d5e3b106096321b88f62cb8c6c77152dc5..e1abcc0f4600cdce34a514939e8d24c243559cfd 100644 --- a/csp-lmc-mid/docker/config/midcsplmc_dsconfig.json +++ b/csp-lmc-mid/docker/config/midcsplmc_dsconfig.json @@ -6,13 +6,13 @@ "mid_csp_cbf/sub_elt/master": { "attribute_properties": { "adminMode": { - "__value": [ - "0" - ], "abs_change": [ "-1", "1" - ] + ], + "__value":[ + "0" + ] }, "healthState": { "abs_change": [ @@ -137,7 +137,10 @@ ], "SW2Address": [ "mid_csp_cbf/sw2/01" - ], + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/01" + ], "SubID": [ "1" ], @@ -164,10 +167,12 @@ "1000", "obsstate", "1000", - "scanid", + "obsmode", "1000", - "outputLinksDistribution", - "1000" + "scanid", + "1000", + "outputLinksDistribution", + "1000" ] } } @@ -175,6 +180,36 @@ "SearchWindow": { "mid_csp_cbf/sw1/01": {}, "mid_csp_cbf/sw2/01": {} + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/01": { + "properties": { + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_02", + "mid_csp_cbf/fspSubarray/02_02", + "mid_csp_cbf/fspSubarray/03_02", + "mid_csp_cbf/fspSubarray/04_02" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/01": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ] + } + } } }, "cbfSubarray-02": { @@ -227,7 +262,10 @@ ], "SW2Address": [ "mid_csp_cbf/sw2/02" - ], + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/02" + ], "SubID": [ "2" ], @@ -246,6 +284,8 @@ "1000", "obsstate", "1000", + "obsmode", + "1000", "vcchealthstate", "1000", "adminmode", @@ -255,9 +295,9 @@ "fsphealthstate", "1000", "vccstate", - "1000", - "outputLinksDistribution", - "1000" + "1000", + "outputLinksDistribution", + "1000" ] } } @@ -265,6 +305,27 @@ "SearchWindow": { "mid_csp_cbf/sw1/02": {}, "mid_csp_cbf/sw2/02": {} + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/02": { + "properties": { + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_02", + "mid_csp_cbf/fspSubarray/02_02", + "mid_csp_cbf/fspSubarray/03_02", + "mid_csp_cbf/fspSubarray/04_02" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } } } }, @@ -306,10 +367,6 @@ "FspID": [ "1" ], - "FspSubarray": [ - "mid_csp_cbf/fspSubarray/01_01", - "mid_csp_cbf/fspSubarray/01_02" - ], "PSSAddress": [ "mid_csp_cbf/fsp_pss/01" ], @@ -318,7 +375,11 @@ ], "VLBIAddress": [ "mid_csp_cbf/fsp_vlbi/01" - ], + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_01", + "mid_csp_cbf/fspSubarray/01_02" + ], "polled_attr": [ "adminmode", "1000", @@ -421,10 +482,6 @@ "FspID": [ "2" ], - "FspSubarray": [ - "mid_csp_cbf/fspSubarray/02_01", - "mid_csp_cbf/fspSubarray/02_02" - ], "PSSAddress": [ "mid_csp_cbf/fsp_pss/02" ], @@ -433,7 +490,11 @@ ], "VLBIAddress": [ "mid_csp_cbf/fsp_vlbi/02" - ], + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/02_01", + "mid_csp_cbf/fspSubarray/02_02" + ], "polled_attr": [ "adminmode", "1000", @@ -536,10 +597,6 @@ "FspID": [ "3" ], - "FspSubarray": [ - "mid_csp_cbf/fspSubarray/03_01", - "mid_csp_cbf/fspSubarray/03_02" - ], "PSSAddress": [ "mid_csp_cbf/fsp_pss/03" ], @@ -548,7 +605,11 @@ ], "VLBIAddress": [ "mid_csp_cbf/fsp_vlbi/03" - ], + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/03_01", + "mid_csp_cbf/fspSubarray/03_02" + ], "polled_attr": [ "adminmode", "1000", @@ -651,10 +712,6 @@ "FspID": [ "4" ], - "FspSubarray": [ - "mid_csp_cbf/fspSubarray/04_01", - "mid_csp_cbf/fspSubarray/04_02" - ], "PSSAddress": [ "mid_csp_cbf/fsp_pss/04" ], @@ -663,7 +720,11 @@ ], "VLBIAddress": [ "mid_csp_cbf/fsp_vlbi/04" - ], + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/04_01", + "mid_csp_cbf/fspSubarray/04_02" + ], "polled_attr": [ "adminmode", "1000", @@ -737,962 +798,116 @@ } } }, - "MidCspCapabilityMonitor": { - "monitor": { - "CspCapabilityMonitor": { - "mid_csp/capability_monitor/receptors": { - "properties": { - "CapabilityDevices": [ - "mid_csp/receptors/004", - "mid_csp/receptors/003", - "mid_csp/receptors/002", - "mid_csp/receptors/001" - ], - "SkaLevel": [ - "2" - ] - } - }, - "mid_csp/capability_monitor/timing_beams": { - "properties": { - "CapabilityDevices": [ - "mid_csp/timing_beams/04", - "mid_csp/timing_beams/03", - "mid_csp/timing_beams/01", - "mid_csp/timing_beams/02" - ], - "SkaLevel": [ - "2" - ] - } - }, - "mid_csp/capability_monitor/vlbi_beams": { - "properties": { - "CapabilityDevices": [ - "mid_csp/vlbi_beams/03", - "mid_csp/vlbi_beams/04", - "mid_csp/vlbi_beams/02", - "mid_csp/vlbi_beams/01" - ], - "SkaLevel": [ - "2" - ] - } - } - }, - "CspSearchBeamsMonitor": { - "mid_csp/capability_monitor/search_beams": { - "properties": { - "CapabilityDevices": [ - "mid_csp/search_beams/04", - "mid_csp/search_beams/03", - "mid_csp/search_beams/01", - "mid_csp/search_beams/02" - ], - "SkaLevel": [ - "2" - ] - } - } - } + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } } }, - "MidCspMaster": { - "master": { - "MidCspMasterBase": { - "mid_csp/elt/master": { + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + }, + "VccMulti": { + "vcc-001": { + "Vcc": { + "mid_csp_cbf/vcc/001": { "attribute_properties": { "adminMode": { - "__value": [ - "0" - ], "abs_change": [ "-1", "1" ] }, - "fspMembership": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportFSPSubarrayMembership" - ] - }, "healthState": { "abs_change": [ "-1", "1" ] }, - "reportFSPAdminMode": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportFSPAdminMode" - ] - }, - "reportFSPHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportFSPHealthState" - ] - }, - "reportFSPState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportFSPState" - ] - }, - "reportSearchBeamAdminMode": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityAdminMode" - ] - }, - "reportSearchBeamHealthState": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityHealthState" - ] - }, - "reportSearchBeamObsState": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityObsState" - ] - }, - "reportSearchBeamState": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityState" - ] - }, - "reportTimingBeamAdminMode": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityAdminMode" - ] - }, - "reportTimingBeamHealthState": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityHealthState" - ] - }, - "reportTimingBeamObsState": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityObsState" - ] - }, - "reportTimingBeamState": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityState" - ] - }, - "reportVCCAdminMode": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportVCCAdminMode" - ] - }, - "reportVCCHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportVCCHealthState" - ] - }, - "reportVCCState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportVCCState" - ] - }, - "reportVlbiBeamAdminMode": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/capabilityAdminMode" - ] - }, - "reportVlbiBeamHealthState": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/capabilityHealthState" - ] - }, - "reportVlbiBeamObsState": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/capabilityObsState" - ] - }, - "reportVlbiBeamState": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/capabilityState" - ] - }, - "searchBeamAddresses": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityAddresses" - ] - }, - "searchBeamMembership": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/capabilityMembership" - ] - }, - "timingBeamAddresses": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityAddresses" - ] - }, - "timingBeamMembership": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/capabilityMembership" - ] - }, - "unassignedSearchBeamIDs": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/unassignedIDs" - ] - }, - "numOfUnassignedSearchBeams": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/numOfUnassignedIDs" - ] - }, - "numOfReservedSearchBeams": { - "__root_att": [ - "mid_csp/capability_monitor/search_beams/numOfReservedIDs" - ] - }, - "unassignedTimingBeamIDs": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/unassignedIDs" - ] - }, - "numOfUnassignedTimingBeams": { - "__root_att": [ - "mid_csp/capability_monitor/timing_beams/numOfUnassignedIDs" - ] - }, - "numOfUnassignedVlbiBeams": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/numOfUnassignedIDs" - ] - }, - "unassignedVlbiBeamIDs": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/unassignedIDs" - ] - }, - "vccMembership": { - "__root_att": [ - "mid_csp_cbf/sub_elt/master/reportVCCSubarrayMembership" - ] - }, - "vlbiBeamAddresses": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/cspCapabilityAddresses" - ] - }, - "vlbiBeamMembership": { - "__root_att": [ - "mid_csp/capability_monitor/vlbi_beams/capabilityMembership" + "subarrayMembership": { + "abs_change": [ + "-1", + "1" ] } }, "properties": { - "CspCbf": [ - "mid_csp_cbf/sub_elt/master" + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/001" ], - "CspPss": [ - "mid_csp_pss/sub_elt/master" + "Band3Address": [ + "mid_csp_cbf/vcc_band3/001" ], - "CspPst": [ - "mid_csp_pst/sub_elt/master" + "Band4Address": [ + "mid_csp_cbf/vcc_band4/001" ], - "CspSubarrays": [ - "mid_csp/elt/subarray_01", - "mid_csp/elt/subarray_02" + "Band5Address": [ + "mid_csp_cbf/vcc_band5/001" ], - "MaxCapabilities": [ - "Receptors:197", - "SearchBeams:1500", - "TimingBeams:16", - "VlbiBeams:20" + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/001" ], - "SearchBeamsMonitor": [ - "mid_csp/capability_monitor/search_beams" + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/001" ], - "SkaLevel": [ + "VccID": [ "1" ], - "TimingBeamsMonitor": [ - "mid_csp/capability_monitor/timing_beams" - ], - "VlbiBeamsMonitor": [ - "mid_csp/capability_monitor/vlbi_beams" - ], "polled_attr": [ - "csppssadminmode", - "1000", - "csppstadminmode", - "1000", - "cspcbfadminmode", - "1000", - "standbycmdalarm", + "state", "1000", - "offcmdalarm", + "healthstate", "1000", "adminmode", "1000", - "oncommandprogress", - "3000", - "offcommandprogress", - "3000", - "offcmddurationexpected", - "3000", - "standbycommandprogress", - "3000", - "oncmddurationexpected", - "3000", - "standbycmddurationexpected", - "3000", - "oncmddurationmeasured", - "3000", - "offcmddurationmeasured", - "3000", - "standbycmddurationmeasured", - "3000", - "offcmdtimeoutexpired", - "3000", - "oncmdtimeoutexpired", - "2000", - "csppssstate", - "2000", - "standbycmdtimeoutexpired", - "1000", - "csppststate", - "1000", - "cspcbfhealthstate", - "1000", - "csppsshealthstate", - "1000", - "csppsthealthstate", - "1000", - "cspcbfadminmode", - "1000", - "oncmdfailure", - "2000", - "offcmdfailure", - "2000", - "standbycmdfailure", - "2000", - "cspcbfstate", - "3000" + "subarraymembership", + "1000" ] } } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/001": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/001": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/001": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/001": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/001": {}, + "mid_csp_cbf/vcc_sw2/001": {} } - } - }, - "MidCspSubarray": { - "subarray1": { - "MidCspSubarrayBase": { - "mid_csp/elt/subarray_01": { + }, + "vcc-002": { + "Vcc": { + "mid_csp_cbf/vcc/002": { "attribute_properties": { - "assignedFspHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/fspHealthState" - ] - }, - "assignedFspState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/fspState" - ] - }, - "assignedReceptors": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/receptors" + "adminMode": { + "abs_change": [ + "-1", + "1" ] }, - "assignedVccHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/vccHealthState" + "healthState": { + "abs_change": [ + "-1", + "1" ] }, - "assignedVccState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/vccState" - ] - }, - "cbfOutputLink": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_01/outputLinksDistribution" - ] - } - }, - "properties": { - "CbfSubarray": [ - "mid_csp_cbf/sub_elt/subarray_01" - ], - "CspMaster": [ - "mid_csp/elt/master" - ], - "PssSubarray": [ - "mid_csp_pss/sub_elt/subarray_01" - ], - "SkaLevel": [ - "2" - ], - "SubID": [ - "1" - ], - "SubarrayProcModeCorrelation": [ - "mid_csp/elt/correlation-01" - ], - "SubarrayProcModePss": [ - "mid_csp/elt/pss-01" - ], - "SubarrayProcModePst": [ - "mid_csp/elt/pst-01" - ], - "SubarrayProcModeVlbi": [ - "mid_csp/elt/cvlbi-01" - ], - "polled_attr": [ - "alarmraisedflag", - "1000", - "timeoutexpiredflag", - "1000", - "scancmdprogress", - "1500", - "removeresourcescmdprogress", - "1500", - "addresourcescmdprogress", - "1500", - "endscancmdprogress", - "1500", - "endsbcmdprogress", - "1500" - ] - } - } - }, - "MidCspSubarrayProcModeCorrelation": { - "mid_csp/elt/correlation-01": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "CORRELATION" - ], - "subID": [ - "1" - ] - } - } - }, - "MidCspSubarrayProcModePss": { - "mid_csp/elt/pss-01": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "PSS" - ], - "subID": [ - "1" - ] - } - } - }, - "MidCspSubarrayProcModePst": { - "mid_csp/elt/pst-01": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "PST" - ], - "subID": [ - "1" - ] - } - } - }, - "MidCspSubarrayProcModeVlbi": { - "mid_csp/elt/vlbi-01": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "VLBI" - ], - "subID": [ - "1" - ] - } - } - } - }, - "subarray2": { - "MidCspSubarrayBase": { - "mid_csp/elt/subarray_02": { - "attribute_properties": { - "assignedFspHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/fspHealthState" - ] - }, - "assignedFspState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/fspState" - ] - }, - "assignedReceptors": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/receptors" - ] - }, - "assignedVccHealthState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/vccHealthState" - ] - }, - "assignedVccState": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/vccState" - ] - }, - "cbfOutputLink": { - "__root_att": [ - "mid_csp_cbf/sub_elt/subarray_02/outputLinksDistribution" - ] - } - }, - "properties": { - "CbfSubarray": [ - "mid_csp_cbf/sub_elt/subarray_02" - ], - "CspMaster": [ - "mid_csp/elt/master" - ], - "PssSubarray": [ - "mid_csp_pss/sub_elt/subarray_02" - ], - "SkaLevel": [ - "2" - ], - "SubID": [ - "2" - ], - "SubarrayProcModeCorrelation": [ - "mid_csp/elt/correlation-02" - ], - "SubarrayProcModePss": [ - "mid_csp/elt/pss-02" - ], - "SubarrayProcModePst": [ - "mid_csp/elt/pst-02" - ], - "SubarrayProcModeVlbi": [ - "mid_csp/elt/cvlbi-02" - ], - "polled_attr": [ - "alarmraisedflag", - "1000", - "timeoutexpiredflag", - "1500", - "scancmdprogress", - "1500", - "removeresourcescmdprogress", - "1500", - "addresourcescmdprogress", - "1500", - "endscancmdprogress", - "1500", - "endsbcmdprogress", - "1500" - ] - } - } - }, - "MidCspSubarrayProcModeCorrelation": { - "mid_csp/elt/correlation-02": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "CORRELATION" - ], - "subID": [ - "2" - ] - } - } - }, - "MidCspSubarrayProcModePss": { - "mid_csp/elt/pss-02": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "PSS" - ], - "subID": [ - "2" - ] - } - } - }, - "MidCspSubarrayProcModePst": { - "mid_csp/elt/pst-02": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "PST" - ], - "subID": [ - "2" - ] - } - } - }, - "MidCspSubarrayProcModeVlbi": { - "mid_csp/elt/vlbi-02": { - "properties": { - "CapID": [ - "1" - ], - "CapType": [ - "VLBI" - ], - "subID": [ - "2" - ] - } - } - } - } - }, - "PssMasterSimulator": { - "midpss": { - "PssMasterSimulator": { - "mid_csp_pss/sub_elt/master": { - "attribute_properties": { - "adminMode": { - "__value": [ - "0" - ], - "abs_change": [ - "-1", - "1" - ] - }, - "healthState": { - "abs_change": [ - "-1", - "1" - ] - }, - "offCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "offDurationExpected": { - "__value": [ - "12" - ] - }, - "onCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "onDurationExpected": { - "__value": [ - "10" - ] - }, - "standbyCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "standbyDurationExpected": { - "__value": [ - "5" - ] - } - }, - "properties": { - "polled_attr": [ - "state", - "1000", - "healthstate", - "1000", - "adminmode", - "1000", - "onCommandProgress", - "1000", - "offCommandProgress", - "1000", - "standbyCommandProgress", - "1000" - ] - } - } - } - } - }, - "PstMasterSimulator": { - "pst": { - "PstMasterSimulator": { - "mid_csp_pst/sub_elt/master": { - "attribute_properties": { - "adminMode": { - "__value": [ - "0" - ], - "abs_change": [ - "-1", - "1" - ] - }, - "healthState": { - "abs_change": [ - "-1", - "1" - ] - }, - "offCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "offDurationExpected": { - "__value": [ - "12" - ] - }, - "onCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "onDurationExpected": { - "__value": [ - "10" - ] - }, - "standbyCommandProgress": { - "abs_change": [ - "-5", - "5" - ] - }, - "standbyDurationExpected": { - "__value": [ - "5" - ] - } - }, - "properties": { - "polled_attr": [ - "state", - "1000", - "healthstate", - "1000", - "adminmode", - "1000", - "onCommandProgress", - "1000", - "offCommandProgress", - "1000", - "standbyCommandProgress", - "1000" - ] - } - } - } - } - }, - "TangoAccessControl": { - "1": { - "TangoAccessControl": { - "sys/access_control/1": {} - } - } - }, - "TangoRestServer": { - "rest": { - "TangoRestServer": { - "sys/rest/0": {} - } - } - }, - "TangoTest": { - "test": { - "TangoTest": { - "sys/tg_test/1": {} - } - } - }, - "TmCspSubarrayLeafNodeTest": { - "tm": { - "TmCspSubarrayLeafNodeTest": { - "ska_mid/tm_leaf_node/csp_subarray_01": { - "attribute_properties": { - "dopplerPhaseCorrection": { - "abs_change": [ - "-1", - "1" - ] - } - }, - "properties": { - "CspMasterAddress": [ - "mid_csp/elt/master" - ], - "CspSubarrayAddress": [ - "mid_csp/elt/subarray_01" - ], - "polled_attr": [ - "delaymodel", - "1000", - "visdestinationaddress", - "1000", - "dopplerphasecorrection", - "1000" - ] - } - } - } - }, - "tm2": { - "TmCspSubarrayLeafNodeTest": { - "ska_mid/tm_leaf_node/csp_subarray_02": { - "attribute_properties": { - "dopplerPhaseCorrection": { - "abs_change": [ - "-1", - "1" - ] - } - }, - "properties": { - "CspMasterAddress": [ - "mid_csp/elt/master" - ], - "CspSubarrayAddress": [ - "mid_csp/elt/subarray_02" - ], - "polled_attr": [ - "delaymodel", - "1000", - "visdestinationaddress", - "1000", - "dopplerphasecorrection", - "1000" - ] - } - } - } - } - }, - "VccMulti": { - "vcc-001": { - "Vcc": { - "mid_csp_cbf/vcc/001": { - "attribute_properties": { - "adminMode": { - "abs_change": [ - "-1", - "1" - ] - }, - "healthState": { - "abs_change": [ - "-1", - "1" - ] - }, - "subarrayMembership": { - "abs_change": [ - "-1", - "1" - ] - } - }, - "properties": { - "Band1And2Address": [ - "mid_csp_cbf/vcc_band12/001" - ], - "Band3Address": [ - "mid_csp_cbf/vcc_band3/001" - ], - "Band4Address": [ - "mid_csp_cbf/vcc_band4/001" - ], - "Band5Address": [ - "mid_csp_cbf/vcc_band5/001" - ], - "SW1Address": [ - "mid_csp_cbf/vcc_sw1/001" - ], - "SW2Address": [ - "mid_csp_cbf/vcc_sw2/001" - ], - "VccID": [ - "1" - ], - "polled_attr": [ - "state", - "1000", - "healthstate", - "1000", - "adminmode", - "1000", - "subarraymembership", - "1000" - ] - } - } - }, - "VccBand1And2": { - "mid_csp_cbf/vcc_band12/001": {} - }, - "VccBand3": { - "mid_csp_cbf/vcc_band3/001": {} - }, - "VccBand4": { - "mid_csp_cbf/vcc_band4/001": {} - }, - "VccBand5": { - "mid_csp_cbf/vcc_band5/001": {} - }, - "VccSearchWindow": { - "mid_csp_cbf/vcc_sw1/001": {}, - "mid_csp_cbf/vcc_sw2/001": {} - } - }, - "vcc-002": { - "Vcc": { - "mid_csp_cbf/vcc/002": { - "attribute_properties": { - "adminMode": { - "abs_change": [ - "-1", - "1" - ] - }, - "healthState": { - "abs_change": [ - "-1", - "1" - ] - }, - "subarrayMembership": { - "abs_change": [ - "-1", - "1" + "subarrayMembership": { + "abs_change": [ + "-1", + "1" ] } }, @@ -1898,6 +1113,70 @@ "mid_csp_cbf/vcc_sw2/004": {} } } - } + }, + "TmCspSubarrayLeafNodeTest": { + "tm": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray_01": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CspMasterAddress": [ + "mid_csp/elt/master" + ], + "CspSubarrayAddress": [ + "mid_csp/elt/subarray_01" + ], + + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + }, + "tm2": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray_02": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CspMasterAddress": [ + "mid_csp/elt/master" + ], + "CspSubarrayAddress": [ + "mid_csp/elt/subarray_02" + ], + + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + } + } } } diff --git a/csp-lmc-mid/docker/mid-csp-tangodb.yml b/csp-lmc-mid/docker/mid-csp-tangodb.yml index 64a6922bb979d5b19e26369fdd1a788fd44adb6d..9a16d6be5f5ad9ca66089fd1383f7e66a7a7d9d3 100644 --- a/csp-lmc-mid/docker/mid-csp-tangodb.yml +++ b/csp-lmc-mid/docker/mid-csp-tangodb.yml @@ -10,7 +10,7 @@ # version: '2.2' volumes: - tangodb: {} + mid-csp_tangodb: {} services: tangodb: @@ -23,7 +23,7 @@ services: - MYSQL_USER=tango - MYSQL_PASSWORD=tango volumes: - - tangodb:/var/lib/mysql + - mid-csp_tangodb:/var/lib/mysql databaseds: image: nexus.engageska-portugal.pt/ska-docker/tango-cpp:latest diff --git a/csp-lmc-mid/tests/MidCspSubarray_test.py b/csp-lmc-mid/tests/MidCspSubarray_test.py index 98cbf89fa3ea8b925616295c1877525e6ea45d04..f7eb052e97b8156728c451d59c280bdc55ddc9d3 100755 --- a/csp-lmc-mid/tests/MidCspSubarray_test.py +++ b/csp-lmc-mid/tests/MidCspSubarray_test.py @@ -325,11 +325,16 @@ class TestCspSubarray(object): assert subarray_state == tango.DevState.OFF assert obs_state == ObsState.IDLE - def test_two_subarrays_configureScan(self, midcsp_subarray01, midcsp_subarray02, midcsp_master): + def test_two_subarrays_configureScan(self, midcsp_subarray01, midcsp_subarray02, midcsp_master, tm1_telstate_proxy): """ Test that the Configure() command is issued when the Subarray state is ON and ObsState is IDLE or READY """ + midcsp_subarray01.Init() + time.sleep(5) + # reinitialize TmTelState simulator to have success + # in configurin the subarray_01 + tm1_telstate_proxy.Init() obs_state1 = midcsp_subarray01.obsState obs_state2 = midcsp_subarray02.obsState assert ((obs_state1 == 0) and (obs_state2 == 0)) @@ -363,7 +368,6 @@ class TestCspSubarray(object): f1.close() f2.close() start_time = time.time() - timeout = False while True: obs_state1 = midcsp_subarray01.obsState obs_state2 = midcsp_subarray02.obsState @@ -375,10 +379,7 @@ class TestCspSubarray(object): # use the default value for the configureDelayExpected # need to do some work on setting this value if elapsed_time > 10: - timeout = True break - assert (obs_state2 == 2) + assert ((obs_state2 == 2) and (obs_state1 == 2)) time.sleep(1) - # subarray1 configuration fails because we should restart the - # TM telstate device - assert midcsp_subarray01.timeoutExpiredFlag + assert not midcsp_subarray01.timeoutExpiredFlag