From 592a1b0f9f907179e47a11115b98af83fc5954e4 Mon Sep 17 00:00:00 2001 From: muhammadalihussnain Date: Tue, 11 Feb 2025 12:05:05 +0500 Subject: [PATCH] reverted ssh_key to ssh_string --- scripts/hostcfgd | 8 ++++---- tests/hostcfgd/hostcfgd_test.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/hostcfgd b/scripts/hostcfgd index bd6d8dcb..cd3c2967 100644 --- a/scripts/hostcfgd +++ b/scripts/hostcfgd @@ -1141,7 +1141,7 @@ class KdumpCfg(object): "memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M", "num_dumps": "3", "remote": "false", # New feature: remote, default is "false" - "ssh_key": "", # New feature: SSH key, default value + "ssh_string": "", # New feature: SSH key, default value "ssh_path": "" # New feature: SSH path, default value } @@ -1194,9 +1194,9 @@ class KdumpCfg(object): remote = data.get("remote") run_cmd(["sonic-kdump-config", "--remote", remote]) - ssh_key = self.kdump_defaults["ssh_key"] - if data.get("ssh_key") is not None: - run_cmd(["sonic-kdump-config", "--ssh_key", ssh_key]) + ssh_string = self.kdump_defaults["ssh_string"] + if data.get("ssh_string") is not None: + run_cmd(["sonic-kdump-config", "--ssh_string", ssh_string]) # ssh_path ssh_path= self.kdump_defaults["ssh_path"] if data.get("ssh_path") is not None: diff --git a/tests/hostcfgd/hostcfgd_test.py b/tests/hostcfgd/hostcfgd_test.py index 63453e84..330a528b 100644 --- a/tests/hostcfgd/hostcfgd_test.py +++ b/tests/hostcfgd/hostcfgd_test.py @@ -217,7 +217,7 @@ def test_kdump_event(self): call(['sonic-kdump-config', '--num_dumps', '3']), call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']), call(['sonic-kdump-config', '--remote', 'false']), # Covering remote - call(['sonic-kdump-config', '--ssh_key', '']), # Covering ssh_key + call(['sonic-kdump-config', '--ssh_string', '']), # Covering ssh_string call(['sonic-kdump-config', '--ssh_path', '']) # Covering ssh_path ] mocked_subprocess.check_call.assert_has_calls(expected, any_order=True)