Skip to content
Open
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
14 changes: 14 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/kdump.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"KDUMP_WITH_VALID_VALUES_4": {
"desc": "Configuring the kdump with valid values."
},
"KDUMP_WITH_VALID_MEM_HIGH": {
"desc": "Configuring the kdump with valid values and high suffix."
},
"KDUMP_WITH_VALID_MEM_HIGH_2": {
"desc": "Configuring the kdump with valid values and high suffix."
},
"KDUMP_WITH_INVALID_NUM_DUMPS": {
"desc": "Configuring kdump config with a invalid number of allowed kdumps.",
"eStrKey": "Range"
Expand All @@ -19,6 +25,14 @@
"desc": "Configuring kdump config with invalid memory config.",
"eStrKey": "Pattern"
},
"KDUMP_WITH_INVALID_MEM_HIGH": {
"desc": "Configuring kdump config with invalid value.",
"eStrKey": "Pattern"
},
"KDUMP_WITH_INVALID_MEM_HIGH_2": {
"desc": "Configuring kdump config with invalid suffix.",
"eStrKey": "Pattern"
},
"KDUMP_WITH_VALID_REMOTE_VALUES": {
"desc": "Configuring the kdump with valid remote ssh values."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,34 @@
}
}
},

"KDUMP_WITH_VALID_MEM_HIGH": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ysmanman could you add a testcase with the full memory paramaters..
"memory": "0M-2G:256M,2G-4G:256M,4G-8G:384M,8G-:448M, 16G:1G,high",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @deepak-singhal0408 , ,high does not support memory ranges at all. Only the size is allowed with ,high.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. thanks

"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "1G,high",
"remote": "true",
"ssh_string" : "[email protected]",
"ssh_path": "/home/ali/.ssh/id_rsa"
}
}
}
},
"KDUMP_WITH_VALID_MEM_HIGH_2": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "512M,high",
"remote": "true",
"ssh_string" : "[email protected]",
"ssh_path": "/home/ali/.ssh/id_rsa"
}
}
}
},
"KDUMP_WITH_INVALID_NUM_DUMPS": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
Expand Down Expand Up @@ -84,7 +111,34 @@
}
}
},

"KDUMP_WITH_INVALID_MEM_HIGH": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "100,high",
"remote": "true",
"ssh_string" : "[email protected]",
"ssh_path": "/home/ali/.ssh/id_rsa"
}
}
}
},
"KDUMP_WITH_INVALID_MEM_HIGH_2": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "1G,highx",
"remote": "true",
"ssh_string" : "[email protected]",
"ssh_path": "/home/ali/.ssh/id_rsa"
}
}
}
},
"KDUMP_WITH_VALID_REMOTE_VALUES": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-kdump.yang
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module sonic-kdump {

leaf memory {
type string {
pattern "(((([0-9]+[MG]?)?(-([0-9]+[MG])?):)?[0-9]+[MG],?)+)";
pattern "((((([0-9]+[MG]?)?(-([0-9]+[MG])?):)?[0-9]+[MG],?)+)|([0-9]+[MG],high))";
}
description
"Memory reserved for loading the crash handler kernel. The amount
Expand Down
Loading