[yang] Update device_metadata to add dhcp_server (#10382)
Why I did it dhcp_server is introduced, and need to update yang model. How I did it Update yang models and add unit test. How to verify it Run unit test for sonic-yang-models. Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
parent
588ed0b760
commit
a8f72e5d45
@ -304,7 +304,8 @@
|
||||
"switch_id": "2",
|
||||
"switch_type": "voq",
|
||||
"max_cores": "8",
|
||||
"sub_role": "FrondEnd"
|
||||
"sub_role": "FrondEnd",
|
||||
"dhcp_server": "disabled"
|
||||
}
|
||||
},
|
||||
"VLAN": {
|
||||
|
@ -103,6 +103,13 @@
|
||||
},
|
||||
"DEVICE_METADATA_VALID_SUB_ROLE_CONFIG": {
|
||||
"desc": "Verifying valid sub_role configuration."
|
||||
},
|
||||
"DEVICE_METADATA_VALID_DHCP_SERVER": {
|
||||
"desc": "Verifying dhcp_server configuration."
|
||||
},
|
||||
"DEVICE_METADATA_INVALID_DHCP_SERVER": {
|
||||
"desc": "Verifying invalid dhcp_server configuration.",
|
||||
"eStrKey": "InvalidValue"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -283,5 +283,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_VALID_DHCP_SERVER": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"dhcp_server": "enabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_INVALID_DHCP_SERVER": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"dhcp_server": "invalid"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -183,6 +183,11 @@ module sonic-device_metadata {
|
||||
type uint8;
|
||||
description "Maximum number of cores in a VoQ Switch (chassis).";
|
||||
}
|
||||
|
||||
leaf dhcp_server {
|
||||
type stypes:admin_mode;
|
||||
description "Indicate whether enable the embedded DHCP server.";
|
||||
}
|
||||
}
|
||||
/* end of container localhost */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user