Add support to get fabric asic namespaces list. (#11793)
Why I did it VoQ chassis supervisor will have Fabric asics and the sub_role for fabric asics will be "Fabric". The fabric asics namespaces are not being returned in get_all_namespaces() and is required in caclmgrd to add right cacl to allow internal docker traffic from fabric asic namespaces. test_cacl_application fails on VoQ chassis Supervisor with the error: Failed: Missing expected iptables rules: set(['-A INPUT -s 240.127.1.1/32 -d 240.127.1.1/32 -j ACCEPT', '-A INPUT -s 240.127.1.3/32 -d 240.127.1.1/32 -j ACCEPT', '-A INPUT -s 240.127.1.2/32 -d 240.127.1.1/32 -j ACCEPT']) How I did it Update get_all_namespaces to return fabric namespaces list. How to verify it Verified on VoQ chassis.
This commit is contained in:
parent
0cdef2ebc6
commit
8d06de37ae
@ -13,6 +13,7 @@ NAMESPACE_PATH_GLOB = '/run/netns/*'
|
||||
ASIC_CONF_FILENAME = 'asic.conf'
|
||||
FRONTEND_ASIC_SUB_ROLE = 'FrontEnd'
|
||||
BACKEND_ASIC_SUB_ROLE = 'BackEnd'
|
||||
FABRIC_ASIC_SUB_ROLE = 'Fabric'
|
||||
EXTERNAL_PORT = 'Ext'
|
||||
INTERNAL_PORT = 'Int'
|
||||
INBAND_PORT = 'Inb'
|
||||
@ -210,6 +211,7 @@ def get_all_namespaces():
|
||||
"""
|
||||
front_ns = []
|
||||
back_ns = []
|
||||
fabric_ns = []
|
||||
num_asics = get_num_asics()
|
||||
|
||||
if is_multi_asic():
|
||||
@ -224,8 +226,10 @@ def get_all_namespaces():
|
||||
front_ns.append(namespace)
|
||||
elif metadata['localhost']['sub_role'] == BACKEND_ASIC_SUB_ROLE:
|
||||
back_ns.append(namespace)
|
||||
elif metadata['localhost']['sub_role'] == FABRIC_ASIC_SUB_ROLE:
|
||||
fabric_ns.append(namespace)
|
||||
|
||||
return {'front_ns': front_ns, 'back_ns': back_ns}
|
||||
return {'front_ns': front_ns, 'back_ns': back_ns, 'fabric_ns': fabric_ns}
|
||||
|
||||
|
||||
def get_namespace_list(namespace=None):
|
||||
|
Reference in New Issue
Block a user