From 4a1e7d8581cb2871a417154f85f1db06e5e6f0a8 Mon Sep 17 00:00:00 2001 From: arlakshm <55814491+arlakshm@users.noreply.github.com> Date: Thu, 12 May 2022 15:56:11 -0700 Subject: [PATCH] remove voq chassis check (#10805) Why I did it Fixes #10793 How I did it Removed the switch_type validation from the Yang model. How to verify it compile sonic_yang_mgmt-1.0-py3-none-any.whl and sonic_yang_mgmt-1.0-py3-none-any.whl Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan --- .../tests/bgp_voq_chassis_neighbor.json | 4 -- .../bgp_voq_chassis_neighbor.json | 41 ------------------- .../sonic-bgp-voq-chassis-neighbor.yang | 3 -- 3 files changed, 48 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/bgp_voq_chassis_neighbor.json b/src/sonic-yang-models/tests/yang_model_tests/tests/bgp_voq_chassis_neighbor.json index 3d575bb975..5c98b867e1 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/bgp_voq_chassis_neighbor.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/bgp_voq_chassis_neighbor.json @@ -2,10 +2,6 @@ "BGP_VOQ_CHASSIS_NEIGHBOR_TEST" : { "desc": "Load bgp voq chassis neighbor" }, - "BGP_VOQ_CHASSIS_WITH_INVALID_SWITCH_TYPE_TEST" : { - "desc": "Load bgp voq chassis on non voq chassis switch", - "eStr": ["Bgp voq neighbor are applicable only when switch_type is voq"] - }, "BGP_VOQ_CHASSIS_ABSENT_LOCAL_ADDRESS_TEST" : { "desc": "Load bgp voq chassis with no local address", "eStrKey" : "Mandatory" diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_voq_chassis_neighbor.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_voq_chassis_neighbor.json index 8779039123..f7ceb1d209 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_voq_chassis_neighbor.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_voq_chassis_neighbor.json @@ -40,47 +40,6 @@ } } }, - "BGP_VOQ_CHASSIS_WITH_INVALID_SWITCH_TYPE_TEST": { - "sonic-bgp-voq-chassis-neighbor:sonic-bgp-voq-chassis-neighbor": { - "sonic-bgp-voq-chassis-neighbor:BGP_VOQ_CHASSIS_NEIGHBOR": { - "BGP_VOQ_CHASSIS_NEIGHBOR_LIST": [ - { - "neighbor": "10.0.0.1", - "asn": "65001", - "holdtime": "180", - "keepalive": "60", - "local_addr": "10.0.0.2", - "name": "sonic-chassis-lc3", - "nhopself": "0", - "rrclient": "0", - "admin_status": "up" - }, - { - "neighbor": "3333::3:6", - "asn": "65001", - "holdtime": "180", - "keepalive": "60", - "local_addr": "3333::3:3", - "name": "sonic-chassis-lc3", - "nhopself": "0", - "rrclient": "0", - "admin_status": "up" - } - ] - } - }, - "sonic-device_metadata:sonic-device_metadata": { - "sonic-device_metadata:DEVICE_METADATA": { - "localhost": { - "bgp_asn": "65001", - "default_bgp_status": "up", - "hostname": "sonic-chassis", - "platform": "voq-chassis", - "switch_type": "chassis-packet" - } - } - } - }, "BGP_VOQ_CHASSIS_ABSENT_LOCAL_ADDRESS_TEST": { "sonic-bgp-voq-chassis-neighbor:sonic-bgp-voq-chassis-neighbor": { "sonic-bgp-voq-chassis-neighbor:BGP_VOQ_CHASSIS_NEIGHBOR": { diff --git a/src/sonic-yang-models/yang-models/sonic-bgp-voq-chassis-neighbor.yang b/src/sonic-yang-models/yang-models/sonic-bgp-voq-chassis-neighbor.yang index 0a7c6c9f19..662f77c3c8 100644 --- a/src/sonic-yang-models/yang-models/sonic-bgp-voq-chassis-neighbor.yang +++ b/src/sonic-yang-models/yang-models/sonic-bgp-voq-chassis-neighbor.yang @@ -54,9 +54,6 @@ module sonic-bgp-voq-chassis-neighbor { } } } - must "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'voq')" { - error-message "Bgp voq neighbor are applicable only when switch_type is voq"; - } } } }