From 19f878f591831afc05460d977e4a8669c1656cbf Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Fri, 12 Nov 2021 22:08:58 -0800 Subject: [PATCH] Revert "[yang] Add missing device types to the device_metadata yang (#9226)" (#9251) This reverts commit 2dc94b30bb100919ef15dfb73bb0a635370df245. --- .../tests/yang_model_tests/tests/device_metadata.json | 3 --- .../yang_model_tests/tests_config/device_metadata.json | 10 ---------- .../yang-models/sonic-device_metadata.yang | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index 16cab82bc78d..8147f8a3ea24 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -33,9 +33,6 @@ "desc": "DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.", "eStrKey" : "Pattern" }, - "DEVICE_METADATA_TYPE_CORRECT_PATTERN": { - "desc": "DEVICE_METADATA correct value for Type field" - }, "DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN": { "desc": "DEVICE_METADATA correct value for BUFFER_MODEL field" }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index 26a2c9377dc7..501ad9bb2c20 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -44,16 +44,6 @@ } } }, - "DEVICE_METADATA_TYPE_CORRECT_PATTERN": { - "sonic-device_metadata:sonic-device_metadata": { - "sonic-device_metadata:DEVICE_METADATA": { - "sonic-device_metadata:localhost": { - "bgp_asn": "65002", - "type": "BackEndToRRouter" - } - } - } - }, "DEV_META_DEV_NEIGH_VERSION_TABLE": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index fef47b571876..400cbf3bcd00 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -91,7 +91,7 @@ module sonic-device_metadata { leaf type { type string { length 1..255; - pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter"; + pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC"; } }