Skip to content

Commit

Permalink
changed the name of db table
Browse files Browse the repository at this point in the history
  • Loading branch information
kanza-latif committed Sep 20, 2024
1 parent db735d5 commit 1d403ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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, {})
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/hostcfgd/hostcfgd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1d403ac

Please sign in to comment.