Added Yang Support for attribute slice_type to DEVICE_METADATA#19094
Merged
rlhui merged 16 commits intosonic-net:masterfrom May 31, 2024
Merged
Added Yang Support for attribute slice_type to DEVICE_METADATA#19094rlhui merged 16 commits intosonic-net:masterfrom
rlhui merged 16 commits intosonic-net:masterfrom
Conversation
This reverts commit 6c5ed3a.
This reverts commit 109e194.
Signed-off-by: Abhishek Dosi <[email protected]>
This reverts commit 6545569.
Signed-off-by: Abhishek Dosi <[email protected]>
This reverts commit b80b20e.
to DEVICE_METADATA. Yang model updated accordingly. Signed-off-by: Abhishek Dosi <[email protected]>
…as config" This reverts commit 789c97c.
Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
arlakshm
approved these changes
May 31, 2024
lguohan
pushed a commit
that referenced
this pull request
Jun 6, 2024
…minigraph (#19160) What I did: Added support to parse "AssociatedSliceStr" attribute of minigraph and save as slice_type as part of DEVICE_METADATA for Chassis Device Type. Yang model are done as part of : #19094 Also as part of this change fixed issue of current device not selected correctly as asic_hostname not being correct. Why I did: In BGP Templates we need to take different action based on this attribute. Signed-off-by: Abhishek Dosi <[email protected]>
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jun 12, 2024
…minigraph (sonic-net#19160) What I did: Added support to parse "AssociatedSliceStr" attribute of minigraph and save as slice_type as part of DEVICE_METADATA for Chassis Device Type. Yang model are done as part of : sonic-net#19094 Also as part of this change fixed issue of current device not selected correctly as asic_hostname not being correct. Why I did: In BGP Templates we need to take different action based on this attribute. Signed-off-by: Abhishek Dosi <[email protected]>
mssonicbld
pushed a commit
that referenced
this pull request
Jun 15, 2024
…minigraph (#19160) What I did: Added support to parse "AssociatedSliceStr" attribute of minigraph and save as slice_type as part of DEVICE_METADATA for Chassis Device Type. Yang model are done as part of : #19094 Also as part of this change fixed issue of current device not selected correctly as asic_hostname not being correct. Why I did: In BGP Templates we need to take different action based on this attribute. Signed-off-by: Abhishek Dosi <[email protected]>
rlhui
pushed a commit
that referenced
this pull request
Apr 28, 2025
This PR is continuation of #19094 where slice_type was added for DEVICE_METADATA. In this PR we are adding this DEVICE_NEIGHBOR_METADATA also. Why I did: Without this change Yang Validation fails when doing config apply-patch if this field is present in DEVICE_NEIGHBOR_METADATA --------- Signed-off-by: Abhishek Dosi <[email protected]>
mssonicbld
added a commit
to mssonicbld/sonic-buildimage-msft
that referenced
this pull request
Apr 30, 2025
What I did: This PR is continuation of sonic-net/sonic-buildimage#19094 where `slice_type` was added for DEVICE_METADATA. In this PR we are adding this DEVICE_NEIGHBOR_METADATA also. Why I did: Without this change Yang Validation fails when doing `config apply-patch` if this field is present in DEVICE_NEIGHBOR_METADATA ADO: 32574645 How I verify: Manual Verification Before fix: ``` echo '[]' | sudo config apply-patch /dev/stdin sonic_yang(3):All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) sonic_yang(3):exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] sonic_yang(3):Data Loading Failed:All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Failed to apply patch due to: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] ``` After fix: ``` echo '[]' | sudo config apply-patch /dev/stdin Patch Applier: localhost: Patch application starting. Patch Applier: localhost: Patch: [] Patch Applier: localhost getting current config db. Patch Applier: localhost: simulating the target full config after applying the patch. Patch Applier: localhost: validating all JsonPatch operations are permitted on the specified fields Patch Applier: localhost: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: localhost: sorting patch updates. Patch Applier: The localhost patch was converted into 0 changes. Patch Applier: localhost: applying 0 changes in order. Patch Applier: localhost: verifying patch updates are reflected on ConfigDB. Patch Applier: localhost patch application completed. Patch Applier: asic0: Patch application starting. Patch Applier: asic0: Patch: [] Patch Applier: asic0 getting current config db. Patch Applier: asic0: simulating the target full config after applying the patch. Patch Applier: asic0: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic0: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic0: sorting patch updates. Patch Applier: The asic0 patch was converted into 0 changes. Patch Applier: asic0: applying 0 changes in order. Patch Applier: asic0: verifying patch updates are reflected on ConfigDB. Patch Applier: asic0 patch application completed. Patch Applier: asic1: Patch application starting. Patch Applier: asic1: Patch: [] Patch Applier: asic1 getting current config db. Patch Applier: asic1: simulating the target full config after applying the patch. Patch Applier: asic1: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic1: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic1: sorting patch updates. Patch Applier: The asic1 patch was converted into 0 changes. Patch Applier: asic1: applying 0 changes in order. Patch Applier: asic1: verifying patch updates are reflected on ConfigDB. Patch Applier: asic1 patch application completed. Patch Applier: asic2: Patch application starting. Patch Applier: asic2: Patch: [] Patch Applier: asic2 getting current config db. Patch Applier: asic2: simulating the target full config after applying the patch. Patch Applier: asic2: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic2: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic2: sorting patch updates. Patch Applier: The asic2 patch was converted into 0 changes. Patch Applier: asic2: applying 0 changes in order. Patch Applier: asic2: verifying patch updates are reflected on ConfigDB. Patch Applier: asic2 patch application completed. Patch applied successfully. ``` UT updated.
mssonicbld
added a commit
to Azure/sonic-buildimage-msft
that referenced
this pull request
May 1, 2025
… model (#1070) What I did: This PR is continuation of sonic-net/sonic-buildimage#19094 where `slice_type` was added for DEVICE_METADATA. In this PR we are adding this DEVICE_NEIGHBOR_METADATA also. Why I did: Without this change Yang Validation fails when doing `config apply-patch` if this field is present in DEVICE_NEIGHBOR_METADATA ADO: 32574645 How I verify: Manual Verification Before fix: ``` echo '[]' | sudo config apply-patch /dev/stdin sonic_yang(3):All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) sonic_yang(3):exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] sonic_yang(3):Data Loading Failed:All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Failed to apply patch due to: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] ``` After fix: ``` echo '[]' | sudo config apply-patch /dev/stdin Patch Applier: localhost: Patch application starting. Patch Applier: localhost: Patch: [] Patch Applier: localhost getting current config db. Patch Applier: localhost: simulating the target full config after applying the patch. Patch Applier: localhost: validating all JsonPatch operations are permitted on the specified fields Patch Applier: localhost: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: localhost: sorting patch updates. Patch Applier: The localhost patch was converted into 0 changes. Patch Applier: localhost: applying 0 changes in order. Patch Applier: localhost: verifying patch updates are reflected on ConfigDB. Patch Applier: localhost patch application completed. Patch Applier: asic0: Patch application starting. Patch Applier: asic0: Patch: [] Patch Applier: asic0 getting current config db. Patch Applier: asic0: simulating the target full config after applying the patch. Patch Applier: asic0: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic0: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic0: sorting patch updates. Patch Applier: The asic0 patch was converted into 0 changes. Patch Applier: asic0: applying 0 changes in order. Patch Applier: asic0: verifying patch updates are reflected on ConfigDB. Patch Applier: asic0 patch application completed. Patch Applier: asic1: Patch application starting. Patch Applier: asic1: Patch: [] Patch Applier: asic1 getting current config db. Patch Applier: asic1: simulating the target full config after applying the patch. Patch Applier: asic1: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic1: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic1: sorting patch updates. Patch Applier: The asic1 patch was converted into 0 changes. Patch Applier: asic1: applying 0 changes in order. Patch Applier: asic1: verifying patch updates are reflected on ConfigDB. Patch Applier: asic1 patch application completed. Patch Applier: asic2: Patch application starting. Patch Applier: asic2: Patch: [] Patch Applier: asic2 getting current config db. Patch Applier: asic2: simulating the target full config after applying the patch. Patch Applier: asic2: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic2: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic2: sorting patch updates. Patch Applier: The asic2 patch was converted into 0 changes. Patch Applier: asic2: applying 0 changes in order. Patch Applier: asic2: verifying patch updates are reflected on ConfigDB. Patch Applier: asic2 patch application completed. Patch applied successfully. ``` UT updated.
mssonicbld
added a commit
to mssonicbld/sonic-buildimage-msft
that referenced
this pull request
Jul 9, 2025
What I did: This PR is continuation of sonic-net/sonic-buildimage#19094 where `slice_type` was added for DEVICE_METADATA. In this PR we are adding this DEVICE_NEIGHBOR_METADATA also. Why I did: Without this change Yang Validation fails when doing `config apply-patch` if this field is present in DEVICE_NEIGHBOR_METADATA ADO: 32574645 How I verify: Manual Verification Before fix: ``` echo '[]' | sudo config apply-patch /dev/stdin sonic_yang(3):All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) sonic_yang(3):exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] sonic_yang(3):Data Loading Failed:All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Failed to apply patch due to: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] ``` After fix: ``` echo '[]' | sudo config apply-patch /dev/stdin Patch Applier: localhost: Patch application starting. Patch Applier: localhost: Patch: [] Patch Applier: localhost getting current config db. Patch Applier: localhost: simulating the target full config after applying the patch. Patch Applier: localhost: validating all JsonPatch operations are permitted on the specified fields Patch Applier: localhost: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: localhost: sorting patch updates. Patch Applier: The localhost patch was converted into 0 changes. Patch Applier: localhost: applying 0 changes in order. Patch Applier: localhost: verifying patch updates are reflected on ConfigDB. Patch Applier: localhost patch application completed. Patch Applier: asic0: Patch application starting. Patch Applier: asic0: Patch: [] Patch Applier: asic0 getting current config db. Patch Applier: asic0: simulating the target full config after applying the patch. Patch Applier: asic0: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic0: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic0: sorting patch updates. Patch Applier: The asic0 patch was converted into 0 changes. Patch Applier: asic0: applying 0 changes in order. Patch Applier: asic0: verifying patch updates are reflected on ConfigDB. Patch Applier: asic0 patch application completed. Patch Applier: asic1: Patch application starting. Patch Applier: asic1: Patch: [] Patch Applier: asic1 getting current config db. Patch Applier: asic1: simulating the target full config after applying the patch. Patch Applier: asic1: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic1: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic1: sorting patch updates. Patch Applier: The asic1 patch was converted into 0 changes. Patch Applier: asic1: applying 0 changes in order. Patch Applier: asic1: verifying patch updates are reflected on ConfigDB. Patch Applier: asic1 patch application completed. Patch Applier: asic2: Patch application starting. Patch Applier: asic2: Patch: [] Patch Applier: asic2 getting current config db. Patch Applier: asic2: simulating the target full config after applying the patch. Patch Applier: asic2: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic2: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic2: sorting patch updates. Patch Applier: The asic2 patch was converted into 0 changes. Patch Applier: asic2: applying 0 changes in order. Patch Applier: asic2: verifying patch updates are reflected on ConfigDB. Patch Applier: asic2 patch application completed. Patch applied successfully. ``` UT updated.
mssonicbld
added a commit
to Azure/sonic-buildimage-msft
that referenced
this pull request
Jul 9, 2025
… model (#1331) What I did: This PR is continuation of sonic-net/sonic-buildimage#19094 where `slice_type` was added for DEVICE_METADATA. In this PR we are adding this DEVICE_NEIGHBOR_METADATA also. Why I did: Without this change Yang Validation fails when doing `config apply-patch` if this field is present in DEVICE_NEIGHBOR_METADATA ADO: 32574645 How I verify: Manual Verification Before fix: ``` echo '[]' | sudo config apply-patch /dev/stdin sonic_yang(3):All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) sonic_yang(3):exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] sonic_yang(3):Data Loading Failed:All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Failed to apply patch due to: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: Validate json patch: [] failed due to:Data Loading Failed All Keys are not parsed in DEVICE_NEIGHBOR_METADATA dict_keys(['xxxxx', 'xxxxx-lc02-ASIC00', 'xxxxx-lc02-ASIC01', 'xxxxx-lc02-ASIC02', 'xxxxx-sup00', 'xxxxx-sup00-ASIC00', 'xxxxx-sup00-ASIC01', 'xxxxx-sup00-ASIC04', 'xxxxx-sup00-ASIC05', 'xxxxx-sup00-ASIC08', 'xxxxx-sup00-ASIC09', 'xxxxx-sup00-ASIC10', 'xxxxx-sup00-ASIC11', 'xxxxx-sup00-ASIC12', 'xxxxx-sup00-ASIC13']) exceptionList:["'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'", "'slice_type'"] ``` After fix: ``` echo '[]' | sudo config apply-patch /dev/stdin Patch Applier: localhost: Patch application starting. Patch Applier: localhost: Patch: [] Patch Applier: localhost getting current config db. Patch Applier: localhost: simulating the target full config after applying the patch. Patch Applier: localhost: validating all JsonPatch operations are permitted on the specified fields Patch Applier: localhost: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: localhost: sorting patch updates. Patch Applier: The localhost patch was converted into 0 changes. Patch Applier: localhost: applying 0 changes in order. Patch Applier: localhost: verifying patch updates are reflected on ConfigDB. Patch Applier: localhost patch application completed. Patch Applier: asic0: Patch application starting. Patch Applier: asic0: Patch: [] Patch Applier: asic0 getting current config db. Patch Applier: asic0: simulating the target full config after applying the patch. Patch Applier: asic0: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic0: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic0: sorting patch updates. Patch Applier: The asic0 patch was converted into 0 changes. Patch Applier: asic0: applying 0 changes in order. Patch Applier: asic0: verifying patch updates are reflected on ConfigDB. Patch Applier: asic0 patch application completed. Patch Applier: asic1: Patch application starting. Patch Applier: asic1: Patch: [] Patch Applier: asic1 getting current config db. Patch Applier: asic1: simulating the target full config after applying the patch. Patch Applier: asic1: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic1: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic1: sorting patch updates. Patch Applier: The asic1 patch was converted into 0 changes. Patch Applier: asic1: applying 0 changes in order. Patch Applier: asic1: verifying patch updates are reflected on ConfigDB. Patch Applier: asic1 patch application completed. Patch Applier: asic2: Patch application starting. Patch Applier: asic2: Patch: [] Patch Applier: asic2 getting current config db. Patch Applier: asic2: simulating the target full config after applying the patch. Patch Applier: asic2: validating all JsonPatch operations are permitted on the specified fields Patch Applier: asic2: validating target config does not have empty tables, since they do not show up in ConfigDb. Patch Applier: asic2: sorting patch updates. Patch Applier: The asic2 patch was converted into 0 changes. Patch Applier: asic2: applying 0 changes in order. Patch Applier: asic2: verifying patch updates are reflected on ConfigDB. Patch Applier: asic2 patch application completed. Patch applied successfully. ``` UT updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did:
Added Yang model support for new attribute in
DEVICE_METADATAofslice_typeWhy I did:
For Spine Router we use this metadata to run-time decide the BGP template to use.
How I verify: