[sonic-dhcp-server.yang]: yang model for dhcp_server table. (#12175)
changes: -- yang model for dhcp_server table. -- tests. Why I did it yang model for dhcp_server table. How I did it -- yang model for dhcp_server table. -- yang model tests. How to verify it -- yang model build time tests.
This commit is contained in:
parent
86fec08928
commit
56d2c81f26
@ -104,6 +104,7 @@ setup(
|
||||
'./yang-models/sonic-device_metadata.yang',
|
||||
'./yang-models/sonic-device_neighbor.yang',
|
||||
'./yang-models/sonic-device_neighbor_metadata.yang',
|
||||
'./yang-models/sonic-dhcp-server.yang',
|
||||
'./yang-models/sonic-dhcpv6-relay.yang',
|
||||
'./yang-models/sonic-extension.yang',
|
||||
'./yang-models/sonic-flex_counter.yang',
|
||||
|
@ -4,6 +4,10 @@
|
||||
"Vrf_blue": {
|
||||
}
|
||||
},
|
||||
"DHCP_SERVER": {
|
||||
"192.0.0.8": {},
|
||||
"192.0.0.8": {}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossy_pool": {
|
||||
"mode": "static",
|
||||
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"DHCP_SERVER_POSITIVE_CONFIG": {
|
||||
"desc": "Configure DHCP_SERVER POSITIVE_CONFIGs."
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"DHCP_SERVER_POSITIVE_CONFIG": {
|
||||
"sonic-dhcp-server:sonic-dhcp-server": {
|
||||
"sonic-dhcp-server:DHCP_SERVER": {
|
||||
"DHCP_SERVER_LIST": [
|
||||
{
|
||||
"ip": "10.1.1.2"
|
||||
},
|
||||
{
|
||||
"ip": "10.1.9.2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
52
src/sonic-yang-models/yang-models/sonic-dhcp-server.yang
Normal file
52
src/sonic-yang-models/yang-models/sonic-dhcp-server.yang
Normal file
@ -0,0 +1,52 @@
|
||||
module sonic-dhcp-server {
|
||||
|
||||
yang-version 1.1;
|
||||
|
||||
namespace "http://github.com/Azure/sonic-dhcp-server";
|
||||
|
||||
prefix dhcp-server;
|
||||
|
||||
import ietf-inet-types {
|
||||
prefix inet;
|
||||
}
|
||||
|
||||
import sonic-port {
|
||||
prefix port;
|
||||
}
|
||||
|
||||
organization
|
||||
"SONiC";
|
||||
|
||||
contact
|
||||
"SONiC";
|
||||
|
||||
description "DHCP SERVER YANG module for SONiC OS";
|
||||
|
||||
revision 2022-09-23 {
|
||||
description "Initial version";
|
||||
}
|
||||
|
||||
container sonic-dhcp-server {
|
||||
|
||||
container DHCP_SERVER {
|
||||
|
||||
description "DHCP_SERVER part of config_db.json";
|
||||
|
||||
list DHCP_SERVER_LIST {
|
||||
|
||||
description "List of IPs in DHCP_SERVER Table";
|
||||
|
||||
key "ip";
|
||||
|
||||
leaf ip {
|
||||
description "IP as DHCP_SERVER";
|
||||
type inet:ipv4-address;
|
||||
}
|
||||
|
||||
} /* end of list IPS_LIST */
|
||||
|
||||
} /* end of container DHCP_SERVER */
|
||||
|
||||
} /* end of container sonic-dhcp-server */
|
||||
|
||||
} /* end of module sonic-dhcp-server */
|
Reference in New Issue
Block a user