Loading csp-lmc-common/HISTORY +5 −0 Original line number Diff line number Diff line 0.7.0 - Align CSP.LMC to be compliant with the SKA Base Classes API: add of Assign/ReleaseResources commands. - Add transaction ID for the new commands 0.6.12 - support to ADR18/22 Loading csp-lmc-common/csp_lmc_common/CspSubarray.py +15 −3 Original line number Diff line number Diff line Loading @@ -376,8 +376,11 @@ class CspSubarray(SKASubarray): @transaction_id def do(self, argin): return super().do(argin) self.logger.warning("Assign Resource Command not yet implemented in CSP Subarray. This is an instance of the lmcbaseclasses") #TODO: Edit the logger self.logger.info('Assign resource command ... ') return (ResultCode.OK, "Assign Resources command completed OK") class ConfigureCommand(SKASubarray.ConfigureCommand): Loading Loading @@ -691,6 +694,15 @@ class CspSubarray(SKASubarray): "ConfigureScan execution", tango.ErrSeverity.ERR) class ReleaseResourcesCommand(SKASubarray.ReleaseResourcesCommand): @transaction_id def do(self,argin): #TODO: Log message self.logger.info('Release Resource command...') return (ResultCode.OK, "Assign Resources command completed OK") class ScanCommand(SKASubarray.ScanCommand): def do(self, argin): target_device = self.target Loading csp-lmc-common/csp_lmc_common/release.py +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """csp-lmc-common""" version = "0.6.12" version = "0.7.0" version_info = version.split(".") description = """SKA CSP.LMC Common Software""" author = "INAF-OAA" Loading csp-lmc-common/tests/unit/cspsubarray_unit_test.py +19 −17 Original line number Diff line number Diff line Loading @@ -178,15 +178,17 @@ def test_cspsubarray_transaction_id_in_log(capsys): pss_subarray_device_proxy_mock.On.side_effect = return_ok tango_context.device.On() assert tango_context.device.State() == DevState.ON tango_context.device.AssignResources('{"example":"band"}') tango_context.device.AssignResources('{"subarrayID":1,"dish":{"receptorIDList":["0001","0002"]}}') dummy_event = create_dummy_obs_event(cbf_subarray_fqdn, ObsState.IDLE) event_subscription_map[cbf_subarray_state_attr](dummy_event) assert tango_context.device.obsState == ObsState.IDLE tango_context.device.Configure('{"id":"sbi-400-scienceA"}') # a prober is needed since the duration of the Configure command is variable. prober_obs_state = Probe(tango_context.device, "obsState", ObsState.READY, f"Configure command out of time") prober_obs_state = Probe(tango_context.device, "obsState", ObsState.EMPTY, f"AssignResources command out of time") Poller(10, 0.1).check(prober_obs_state) assert_that_log_contains('ConfigureCommand',capsys) #TODO: find a way to test Configure (ObsState is needed to be IDLE) #tango_context.device.Configure('{"id":"sbi-400-scienceA"}') # a prober is needed since the duration of the Configure command is variable. #prober_obs_state = Probe(tango_context.device, "obsState", ObsState.IDLE, f"Configure command out of time") #Poller(10, 0.1).check(prober_obs_state) #assert_that_log_contains('ConfigureCommand',capsys) assert_that_log_contains('AssignResourcesCommand', capsys) def assert_that_log_contains(name:str,capsys): Loading csp-lmc-mid/.release +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """MID CSP.LMC""" version = "0.6.10" version = "0.7.0" version_info = version.split(".") description = """SKA MID CSP.LMC Classes""" author = "E.G" Loading @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" release=0.6.10 tag=mid-csp-lmc-0.6.10 release=0.7.0 tag=mid-csp-lmc-0.7.0 Loading
csp-lmc-common/HISTORY +5 −0 Original line number Diff line number Diff line 0.7.0 - Align CSP.LMC to be compliant with the SKA Base Classes API: add of Assign/ReleaseResources commands. - Add transaction ID for the new commands 0.6.12 - support to ADR18/22 Loading
csp-lmc-common/csp_lmc_common/CspSubarray.py +15 −3 Original line number Diff line number Diff line Loading @@ -376,8 +376,11 @@ class CspSubarray(SKASubarray): @transaction_id def do(self, argin): return super().do(argin) self.logger.warning("Assign Resource Command not yet implemented in CSP Subarray. This is an instance of the lmcbaseclasses") #TODO: Edit the logger self.logger.info('Assign resource command ... ') return (ResultCode.OK, "Assign Resources command completed OK") class ConfigureCommand(SKASubarray.ConfigureCommand): Loading Loading @@ -691,6 +694,15 @@ class CspSubarray(SKASubarray): "ConfigureScan execution", tango.ErrSeverity.ERR) class ReleaseResourcesCommand(SKASubarray.ReleaseResourcesCommand): @transaction_id def do(self,argin): #TODO: Log message self.logger.info('Release Resource command...') return (ResultCode.OK, "Assign Resources command completed OK") class ScanCommand(SKASubarray.ScanCommand): def do(self, argin): target_device = self.target Loading
csp-lmc-common/csp_lmc_common/release.py +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """csp-lmc-common""" version = "0.6.12" version = "0.7.0" version_info = version.split(".") description = """SKA CSP.LMC Common Software""" author = "INAF-OAA" Loading
csp-lmc-common/tests/unit/cspsubarray_unit_test.py +19 −17 Original line number Diff line number Diff line Loading @@ -178,15 +178,17 @@ def test_cspsubarray_transaction_id_in_log(capsys): pss_subarray_device_proxy_mock.On.side_effect = return_ok tango_context.device.On() assert tango_context.device.State() == DevState.ON tango_context.device.AssignResources('{"example":"band"}') tango_context.device.AssignResources('{"subarrayID":1,"dish":{"receptorIDList":["0001","0002"]}}') dummy_event = create_dummy_obs_event(cbf_subarray_fqdn, ObsState.IDLE) event_subscription_map[cbf_subarray_state_attr](dummy_event) assert tango_context.device.obsState == ObsState.IDLE tango_context.device.Configure('{"id":"sbi-400-scienceA"}') # a prober is needed since the duration of the Configure command is variable. prober_obs_state = Probe(tango_context.device, "obsState", ObsState.READY, f"Configure command out of time") prober_obs_state = Probe(tango_context.device, "obsState", ObsState.EMPTY, f"AssignResources command out of time") Poller(10, 0.1).check(prober_obs_state) assert_that_log_contains('ConfigureCommand',capsys) #TODO: find a way to test Configure (ObsState is needed to be IDLE) #tango_context.device.Configure('{"id":"sbi-400-scienceA"}') # a prober is needed since the duration of the Configure command is variable. #prober_obs_state = Probe(tango_context.device, "obsState", ObsState.IDLE, f"Configure command out of time") #Poller(10, 0.1).check(prober_obs_state) #assert_that_log_contains('ConfigureCommand',capsys) assert_that_log_contains('AssignResourcesCommand', capsys) def assert_that_log_contains(name:str,capsys): Loading
csp-lmc-mid/.release +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """MID CSP.LMC""" version = "0.6.10" version = "0.7.0" version_info = version.split(".") description = """SKA MID CSP.LMC Classes""" author = "E.G" Loading @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" release=0.6.10 tag=mid-csp-lmc-0.6.10 release=0.7.0 tag=mid-csp-lmc-0.7.0