From 3bcf491924a9d1f7f3a3df8fbd4f964e7b7dd8aa Mon Sep 17 00:00:00 2001 From: yaqiangz Date: Thu, 27 Jul 2023 02:33:10 +0000 Subject: [PATCH] Update --- .../tests/files/sample_config_db.json | 4 ++-- .../yang_model_tests/tests/dhcp_server_ipv4.json | 4 ---- .../tests_config/dhcp_server_ipv4.json | 13 ------------- .../yang-models/sonic-dhcp-server-ipv4.yang | 7 ++----- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index cd7f998b4f79..a1f4d040cc13 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1908,12 +1908,12 @@ } }, "DHCP_SERVER_IPV4_PORT": { - "Vlan100|PortChannel0003": { + "Vlan100|Ethernet0": { "ips": [ "100.1.1.10" ] }, - "Vlan100|PortChannel2": { + "Vlan100|Ethernet1": { "ranges": [ "range1" ] diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/dhcp_server_ipv4.json b/src/sonic-yang-models/tests/yang_model_tests/tests/dhcp_server_ipv4.json index 9f1d59ce08fe..2b355a78c340 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/dhcp_server_ipv4.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/dhcp_server_ipv4.json @@ -59,10 +59,6 @@ "desc": "Missing id in DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS", "eStrKey" : "Mandatory" }, - "DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_TYPE_ABSENT": { - "desc": "Missing type in DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS", - "eStrKey" : "Mandatory" - }, "DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_VALUE_ABSENT": { "desc": "Missing value in DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS", "eStrKey" : "Mandatory" diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/dhcp_server_ipv4.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/dhcp_server_ipv4.json index 7c0147a660c5..031a22ca0811 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/dhcp_server_ipv4.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/dhcp_server_ipv4.json @@ -788,19 +788,6 @@ } } }, - "DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_TYPE_ABSENT": { - "sonic-dhcp-server-ipv4:sonic-dhcp-server-ipv4": { - "sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS": { - "DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_LIST": [ - { - "name": "option60", - "id": 60, - "value": "dummy_value" - } - ] - } - } - }, "DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_VALUE_ABSENT": { "sonic-dhcp-server-ipv4:sonic-dhcp-server-ipv4": { "sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS": { diff --git a/src/sonic-yang-models/yang-models/sonic-dhcp-server-ipv4.yang b/src/sonic-yang-models/yang-models/sonic-dhcp-server-ipv4.yang index 67494cb48d95..0d332e1d556c 100644 --- a/src/sonic-yang-models/yang-models/sonic-dhcp-server-ipv4.yang +++ b/src/sonic-yang-models/yang-models/sonic-dhcp-server-ipv4.yang @@ -53,7 +53,7 @@ module sonic-dhcp-server-ipv4 { } leaf lease_time { - description "Lease time of DHCP IP"; + description "Lease time of DHCP IP in second"; mandatory true; type uint32 { range "1..4294967295"; @@ -125,15 +125,13 @@ module sonic-dhcp-server-ipv4 { } leaf type { - description "Type of customized option"; - mandatory true; + description "Type of customized option, for standard DHCP option, this field is invalid"; type enumeration { enum text; enum ipv4-address; enum uint8; enum uint16; enum uint32; - enum uint64; } } @@ -148,7 +146,6 @@ module sonic-dhcp-server-ipv4 { type uint8; type uint16; type uint32; - type uint64; } } }