Skip to content

Commit 1aa6388

Browse files
Revert "reverted ssh_key to ssh_string (sonic-net#216)"
This reverts commit 7e1b280.
1 parent 7e1b280 commit 1aa6388

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/hostcfgd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ class KdumpCfg(object):
11411141
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M",
11421142
"num_dumps": "3",
11431143
"remote": "false", # New feature: remote, default is "false"
1144-
"ssh_string": "<user@server>", # New feature: SSH key, default value
1144+
"ssh_key": "<user@server>", # New feature: SSH key, default value
11451145
"ssh_path": "<path>" # New feature: SSH path, default value
11461146
}
11471147

@@ -1194,9 +1194,9 @@ class KdumpCfg(object):
11941194
remote = data.get("remote")
11951195
run_cmd(["sonic-kdump-config", "--remote", remote])
11961196

1197-
ssh_string = self.kdump_defaults["ssh_string"]
1198-
if data.get("ssh_string") is not None:
1199-
run_cmd(["sonic-kdump-config", "--ssh_string", ssh_string])
1197+
ssh_key = self.kdump_defaults["ssh_key"]
1198+
if data.get("ssh_key") is not None:
1199+
run_cmd(["sonic-kdump-config", "--ssh_key", ssh_key])
12001200
# ssh_path
12011201
ssh_path= self.kdump_defaults["ssh_path"]
12021202
if data.get("ssh_path") is not None:

tests/hostcfgd/hostcfgd_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_kdump_event(self):
217217
call(['sonic-kdump-config', '--num_dumps', '3']),
218218
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']),
219219
call(['sonic-kdump-config', '--remote', 'false']), # Covering remote
220-
call(['sonic-kdump-config', '--ssh_string', '<user@server>']), # Covering ssh_string
220+
call(['sonic-kdump-config', '--ssh_key', '<user@server>']), # Covering ssh_key
221221
call(['sonic-kdump-config', '--ssh_path', '<path>']) # Covering ssh_path
222222
]
223223
mocked_subprocess.check_call.assert_has_calls(expected, any_order=True)

0 commit comments

Comments
 (0)