Description
When configuration doesnt contain ACL_RULE, cli command "show run acl" returns exception.
Steps to reproduce the issue:
- Assure your running configuration doesnt contain ACL_RULE section - cli command
show run all | grep -e '"ACL_RULE"' should return nothing.
- Issue cli command "show run acl"
Describe the results you received:
root@r-qa-sw-eth-2134:/home/admin# show run acl
Traceback (most recent call last):
File "/usr/local/bin/sonic-cfggen", line 318, in
main()
File "/usr/local/bin/sonic-cfggen", line 302, in main
print(json.dumps(FormatConverter.to_serialized(data[args.var_json]), indent=4, cls=minigraph_encoder))
KeyError: 'ACL_RULE'
Describe the results you expected:
No output, no error.
Output of show version:
SONiC Software Version: SONiC.HEAD.129-0c9040de
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: 0c9040d
Build date: Thu Nov 21 12:50:41 UTC 2019
Built by: johnar@jenkins-worker-4
Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700
ASIC: mellanox
Description
When configuration doesnt contain ACL_RULE, cli command "show run acl" returns exception.
Steps to reproduce the issue:
show run all | grep -e '"ACL_RULE"'should return nothing.Describe the results you received:
root@r-qa-sw-eth-2134:/home/admin# show run acl
Traceback (most recent call last):
File "/usr/local/bin/sonic-cfggen", line 318, in
main()
File "/usr/local/bin/sonic-cfggen", line 302, in main
print(json.dumps(FormatConverter.to_serialized(data[args.var_json]), indent=4, cls=minigraph_encoder))
KeyError: 'ACL_RULE'
Describe the results you expected:
No output, no error.
Output of
show version:SONiC Software Version: SONiC.HEAD.129-0c9040de
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: 0c9040d
Build date: Thu Nov 21 12:50:41 UTC 2019
Built by: johnar@jenkins-worker-4
Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700
ASIC: mellanox