Skip to content
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
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,12 +11,26 @@
"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.",
"eStr": ["pattern", "does not satisfy"]
},
"KDUMP_WITH_INVALID_MEMORY": {
"desc": "Configuring kdump config with invalid memory config.",
"eStr": ["pattern", "does not satisfy"]
},
"KDUMP_WITH_INVALID_MEM_HIGH": {
"desc": "Configuring kdump config with invalid value.",
"eStr": ["Pattern", "does not satisfy"]
},
"KDUMP_WITH_INVALID_MEM_HIGH_2": {
"desc": "Configuring kdump config with invalid suffix.",
"eStr": ["Pattern", "does not satisfy"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,28 @@
}
}
},

"KDUMP_WITH_VALID_MEM_HIGH": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "1G,high",
}
}
}
},
"KDUMP_WITH_VALID_MEM_HIGH_2": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "512M,high",
}
}
}
},
"KDUMP_WITH_INVALID_NUM_DUMPS": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
Expand All @@ -65,5 +86,27 @@
}
}
}
},
"KDUMP_WITH_INVALID_MEM_HIGH": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "100,high",
}
}
}
},
"KDUMP_WITH_INVALID_MEM_HIGH_2": {
"sonic-kdump:sonic-kdump": {
"sonic-kdump:KDUMP": {
"config": {
"enabled": "true",
"num_dumps": "3",
"memory": "1G,highx",
}
}
}
}
}
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