diff --git a/tangostationcontrol/tangostationcontrol/devices/configuration_device.py b/tangostationcontrol/tangostationcontrol/devices/configuration_device.py index 265f72c4b308f4e24902999f6404715b443d7f5f..ad6e63c32c6f2325565c2e026ab5577b50ac5897 100644 --- a/tangostationcontrol/tangostationcontrol/devices/configuration_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/configuration_device.py @@ -37,19 +37,19 @@ class Configuration(lofar_device): # ---------- # Attributes # ---------- - tangodb_properties_RW = attribute(dtype=str, access=AttrWriteType.READ_WRITE, doc='The whole station configuration, as a JSON string.') + station_configuration_RW = attribute(dtype=str, access=AttrWriteType.READ_WRITE, doc='The Tango properties of all the devices in this station, as a JSON string.') - def read_tangodb_properties_RW(self): + def read_station_configuration_RW(self): return self._dump_configdb() - def write_tangodb_properties_RW(self, tangodb_properties): + def write_station_configuration_RW(self, station_configuration): """ Takes a JSON string which represents the station configuration and loads the whole configuration from scratch. N.B. it does not update, it loads a full new configuration. """ # TODO(Stefano): L2SS-1031 implement load configuration - self.proxy.tangodb_properties_RW = tangodb_properties + self.proxy.station_configuration_RW = station_configuration def _dump_configdb(self): """ Returns the TangoDB station configuration as a JSON string """ diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_configuration.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_configuration.py index 52f469b8a0ff185fc1451bab541fe490dcaf2f1c..280439df893623458a77aa4324217c4e369fc8b9 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_configuration.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_configuration.py @@ -18,12 +18,12 @@ class TestDeviceConfiguration(AbstractTestBases.TestDeviceBase): def setUp(self): super().setUp("STAT/Configuration/1") - def test_read_tangodb_properties(self): + def test_read_station_configuration(self): self.proxy.warm_boot() self.assertEqual(DevState.ON, self.proxy.state()) """ Test whether the station control configuration is correctly retrieved as a JSON string """ - tangodb_properties = self.proxy.tangodb_properties_RW - dbdata = json.loads(tangodb_properties) + station_configuration = self.proxy.station_configuration_RW + dbdata = json.loads(station_configuration) self.assertTrue(type(dbdata), dict) self.assertGreater(len(dbdata['servers']), 0) # Verify if Configuration Device exists