sonic-utilities
sonic-utilities copied to clipboard
fix bug in multi_asic_namespace_validation_callback
multi_asic.is_multi_asic is bug that returns True if function NOT exists, so the if condition will never enter, letting multi_asic_namespace_validation_callback to never work.
when changing to multi_asic.is_multi_asic(), for single-asic, we still need to ensure NO value passed inside this function.
e,g, show run bgp -n asic0 on a single-asic is passing value asic0 to this function, and we want to avoid that.
What I did
How I did it
How to verify it
Before:
# admin@str2-7050cx3-acs-02:/usr$ show ip bgp neighbor -n asic0
# -n/--namespace is not available for single asic
# Aborted!
# admin@str2-7050cx3-acs-02:/usr$ show ip bgp neighbor
# -n/--namespace is not available for single asic
# Aborted!
After:
admin@str2-7050cx3-acs-02:/usr$ show run bgp -n asic0
-n/--namespace is not available for single asic
Aborted!
admin@str2-7050cx3-acs-02:/usr$
admin@str2-7050cx3-acs-02:/usr$
admin@str2-7050cx3-acs-02:/usr$
admin@str2-7050cx3-acs-02:/usr$ show run bgp -n
Error: -n option requires an argument
admin@str2-7050cx3-acs-02:/usr$
admin@str2-7050cx3-acs-02:/usr$
admin@str2-7050cx3-acs-02:/usr$ show run bgp
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
...