Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Reverted "ssh_key" to "ssh_string" #216

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<user@server>", # New feature: SSH key, default value
"ssh_string": "<user@server>", # New feature: SSH key, default value
"ssh_path": "<path>" # New feature: SSH path, default value
}

Expand Down Expand Up @@ -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:
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 @@ -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', '<user@server>']), # Covering ssh_key
call(['sonic-kdump-config', '--ssh_string', '<user@server>']), # Covering ssh_string
call(['sonic-kdump-config', '--ssh_path', '<path>']) # Covering ssh_path
]
mocked_subprocess.check_call.assert_has_calls(expected, any_order=True)
Expand Down
Loading