Add yang_config_validation to DEVICE_METADATA yang model (#12497)

* Add yang_config_validation to DEVICE_METADATA yang model
This commit is contained in:
isabelmsft 2022-10-26 13:11:42 -07:00 committed by GitHub
parent 3058fb62e6
commit 3d9a6e46bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 2 deletions

View File

@ -831,7 +831,8 @@ instance is supported in SONiC.
"deployment_id": "1",
"type": "ToRRouter",
"bgp_adv_lo_prefix_as_128" : "true",
"buffer_model": "traditional"
"buffer_model": "traditional",
"yang_config_validation": "disable"
}
}
}

View File

@ -332,7 +332,8 @@
"max_cores": "8",
"sub_role": "FrontEnd",
"dhcp_server": "disabled",
"bgp_adv_lo_prefix_as_128": "true"
"bgp_adv_lo_prefix_as_128": "true",
"yang_config_validation": "disable"
}
},
"VLAN": {

View File

@ -51,6 +51,15 @@
"value": "enable"
}
},
"DEVICE_METADATA_DEFAULT_YANG_CONFIG_VALIDATION": {
"desc": "DEVICE_METADATA DEFAULT VALUE FOR YANG CONFIG VALIDATION.",
"eStrKey" : "Verify",
"verify": {
"xpath": "/sonic-device_metadata:sonic-device_metadata/DEVICE_METADATA/localhost/hostname",
"key": "sonic-device_metadata:yang_config_validation",
"value": "disable"
}
},
"DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN": {
"desc": "DEVICE_METADATA correct value for BUFFER_MODEL field"
},

View File

@ -85,6 +85,17 @@
}
}
},
"DEVICE_METADATA_DEFAULT_YANG_CONFIG_VALIDATION": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"bgp_asn": "65001",
"hostname": "DUT-CSW",
"platform": "Stone-DX010"
}
}
}
},
"DEV_META_DEV_NEIGH_VERSION_TABLE": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {

View File

@ -119,6 +119,11 @@ module sonic-device_metadata {
default enable;
}
leaf yang_config_validation {
type stypes:mode-status;
default disable;
}
leaf cloudtype {
type string;
}