From 1d403ac6ecac79e1642bff7e8a6c291fb9346e12 Mon Sep 17 00:00:00 2001 From: "kanza.latif" Date: Fri, 20 Sep 2024 10:47:19 +0500 Subject: [PATCH] changed the name of db table --- scripts/hostcfgd | 6 +++--- tests/hostcfgd/hostcfgd_test.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/hostcfgd b/scripts/hostcfgd index b8427d5d..7a591743 100644 --- a/scripts/hostcfgd +++ b/scripts/hostcfgd @@ -1747,7 +1747,7 @@ class Memory_StatisticsCfg(object): # Apply default configurations if not present for row, value in self.memory_statistics_defaults.items(): if not memory_statistics_conf.get(row): - self.config_db.mod_entry("MEMORY_STATISTICS_TABLE", "config", {row: value}) + self.config_db.mod_entry("MEMORY_STATISTICS", "config", {row: value}) # Apply configurations to ensure they are set correctly on startup self.apply_configuration(memory_statistics_conf) @@ -1896,7 +1896,7 @@ class HostConfigDaemon: ldap_server = init_data['LDAP_SERVER'] lpbk_table = init_data['LOOPBACK_INTERFACE'] kdump = init_data['KDUMP'] - memory_statistics = init_data['MEMORY_STATISTICS_TABLE'] + memory_statistics = init_data['MEMORY_STATISTICS'] passwh = init_data['PASSW_HARDENING'] ssh_server = init_data['SSH_SERVER'] dev_meta = init_data.get(swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, {}) @@ -2100,7 +2100,7 @@ class HostConfigDaemon: return callback self.config_db.subscribe('KDUMP', make_callback(self.kdump_handler)) - self.config_db.subscribe('MEMORY_STATISTICS_TABLE', make_callback(self.memory_statistics_handler)) + self.config_db.subscribe('MEMORY_STATISTICS', make_callback(self.memory_statistics_handler)) # Handle AAA, TACACS and RADIUS related tables self.config_db.subscribe('AAA', make_callback(self.aaa_handler)) self.config_db.subscribe('TACPLUS', make_callback(self.tacacs_global_handler)) diff --git a/tests/hostcfgd/hostcfgd_test.py b/tests/hostcfgd/hostcfgd_test.py index 3dbe905b..b7b9d4e8 100644 --- a/tests/hostcfgd/hostcfgd_test.py +++ b/tests/hostcfgd/hostcfgd_test.py @@ -329,7 +329,7 @@ def test_memory_statistics_event(self): MockConfigDb.set_config_db(HOSTCFG_DAEMON_CFG_DB) daemon = hostcfgd.HostConfigDaemon() daemon.register_callbacks() - MockConfigDb.event_queue = [('MEMORY_STATISTICS_TABLE', 'config')] + MockConfigDb.event_queue = [('MEMORY_STATISTICS', 'config')] with mock.patch('hostcfgd.subprocess') as mocked_subprocess: popen_mock = mock.Mock()