[DPB][YANG] extended yang-model - added 'buffer_model' field, added test cases (#6464)
- Why I did it The fix for the issue [DPB][YANG] sonic-device_metadata.yang is not aligned with newest changes in CONFIG_DB - How I did it CONFIG_DB was extended with the field buffer_model - added representation of this field inside the sonic-device_metadata.yang - How to verify it Run the command config interface breakout <interface> <breakout_mode> Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
This commit is contained in:
parent
4e83d7de2a
commit
6bcea45862
@ -202,7 +202,8 @@
|
||||
"mac": "00:11:22:33:dd:5a",
|
||||
"hostname": "asw.dc",
|
||||
"bgp_asn": "64850",
|
||||
"hwsku": "Stone"
|
||||
"hwsku": "Stone",
|
||||
"buffer_model": "dynamic"
|
||||
}
|
||||
},
|
||||
"VLAN": {
|
||||
|
@ -32,5 +32,15 @@
|
||||
"DEVICE_METADATA_TYPE_INCORRECT_PATTERN": {
|
||||
"desc": "DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.",
|
||||
"eStrKey" : "Pattern"
|
||||
},
|
||||
"DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN": {
|
||||
"desc": "DEVICE_METADATA correct value for BUFFER_MODEL field"
|
||||
},
|
||||
"DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN2": {
|
||||
"desc": "DEVICE_METADATA correct value for BUFFER_MODEL field"
|
||||
},
|
||||
"DEVICE_METADATA_INCORRECT_BUFFER_MODEL_PATTERN": {
|
||||
"desc": "DEVICE_METADATA wrong value for BUFFER_MODEL field.",
|
||||
"eStr": ["pattern", "does not satisfy"]
|
||||
}
|
||||
}
|
||||
|
@ -90,5 +90,32 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"buffer_model": "dynamic"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN2": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"buffer_model": "traditional"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_INCORRECT_BUFFER_MODEL_PATTERN": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"buffer_model": "incorrect_pattern"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,18 @@ module sonic-device_metadata {
|
||||
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC";
|
||||
}
|
||||
}
|
||||
|
||||
leaf buffer_model {
|
||||
description "This leaf is added for dynamic buffer calculation.
|
||||
The dynamic model represents the model in which the buffer configurations,
|
||||
like the headroom sizes and buffer pool sizes, are dynamically calculated based
|
||||
on the ports' speed, cable length, and MTU. This model is used by Mellanox so far.
|
||||
The traditional model represents the model in which all the buffer configurations
|
||||
are statically configured in CONFIG_DB tables. This is the default model used by all other vendors";
|
||||
type string {
|
||||
pattern "dynamic|traditional";
|
||||
}
|
||||
}
|
||||
}
|
||||
/* end of container localhost */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user