sonic-buildimage/dockers/docker-dhcp-relay
Sudharsan Dhamal Gopalarathnam 6862692ae1 [dhcp_relay]Fix the clear dhcp6relay_counters CLI (#13148)
Avoid traceback on sonic-clear command

sonic-clear dhcp6relay_counters 
Traceback (most recent call last):
  File "/usr/local/bin/sonic-clear", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/clear/plugins/dhcp-relay.py", line 19, in dhcp6relay_clear_counters
    counter = DHCPv6_Counter()
NameError: name 'DHCPv6_Counter' is not defined

- How I did it
Corrected the way to import using importlib

- How to verify it
Tested the sonic-clear command and verified no traceback is seen
2023-02-16 18:36:47 +08:00
..
cli [dhcp_relay]Fix the clear dhcp6relay_counters CLI (#13148) 2023-02-16 18:36:47 +08:00
cli-plugin-tests [dhcp_relay] Remove exist check while adding dhcpv6 relay (#13826) 2023-02-16 11:08:34 +08:00
critical_processes Incorporate DHCPv6 Relay Agent into dhcp-relay docker (#8321) 2021-09-22 16:05:03 -07:00
dhcp_relay_regex.json Add rsyslog plugin regex for select operation failure (#12659) 2022-11-13 21:41:33 -08:00
dhcp-relay.monitors.j2 Fix dependency of dhcp-mon on VLAN with only v6 (#13006) 2023-02-06 12:36:55 +08:00
dhcp-relay.programs.j2 [dhcp_relay] Add "vlan missing ip helper" dhcp relay unittest (#10654) 2022-06-04 11:37:04 -07:00
dhcpv4-relay.agents.j2 [dhcp_relay] DHCP relay support for IPv6 (#7772) 2021-07-16 07:31:05 -07:00
dhcpv6-relay.agents.j2 Add dhcp6relay dualtor option (#12459) 2022-10-21 10:33:10 -07:00
docker_init.sh [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-dhcp-relay.supervisord.conf.j2 [dhcp_relay] Add "vlan missing ip helper" dhcp relay unittest (#10654) 2022-06-04 11:37:04 -07:00
Dockerfile.j2 [infra] Support syslog rate limit configuration (#12490) (#13535) 2023-01-30 20:11:44 +02:00
events_info.json Add rsyslog plugin regex for select operation failure (#12659) 2022-11-13 21:41:33 -08:00
port-name-alias-map.txt.j2 [dhcp-relay] Reduce Calls to SONiC Cfggen (#5175) 2020-08-17 15:47:14 -07:00
start.sh docker-dhcp-relay: Fix waiting for interfaces to get set up (#9034) 2021-10-21 18:45:00 -07:00
wait_for_intf.sh.j2 [DHCP_RELAY] Updated wait_for_intf.sh to wait for ipv6 global and link local addr (#12273) 2022-10-12 11:46:20 +03:00