Add label attribute for LAG and virtual router #1158
Merged
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.
Since LAG and virtual router can be created without any unique mandatory attributes, anchor attribute can be used to uniquely identify specified objects. This will be very useful in SONiC warm boot scenario, for example to identify 2 empty LAGs which are present on the device after reboot.
This attribute doesn't correspond to any internal SAI vendor device resources, and at this point it don't need to be implemented by any vendor, it implementation at create function internals CAN be skipped without posting error. This attribute is considered as user data attached to specific object.
If vendor wants to support this attribute it should also be persistent over warm boot scenario
Cons: extra attribute, that has no actual resource meaning and it would need to be added to objects that need to be uniquely identified on user side
Pros: convenient for SONiC, since metadata for all attributes is auto generated, and it will make very easy to to use existing attribute, instead of making convoluted way to pass extra information from sairedis/syncd path (this is because of current SONiC architecture design in sairedis/syncd model)
Related to:
#1080
#1132