sonic-buildimage/dockers
Sudharsan Dhamal Gopalarathnam bbc72e78b0
[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
2022-12-26 09:14:59 +02:00
..
docker-base [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-base-bullseye [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-base-buster [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-base-stretch [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-basic_router [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-config-engine Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-bullseye Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-buster Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-config-engine-stretch Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-database [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-dhcp-relay [dhcp_relay]Fix the clear dhcp6relay_counters CLI (#13148) 2022-12-26 09:14:59 +02:00
docker-eventd Add events to host and create rsyslog_plugin deb pkg (#12059) 2022-09-21 09:20:53 -07:00
docker-fpm-frr [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-fpm-gobgp Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-iccpd [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-lldp [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-macsec [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-mux [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-nat [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-orchagent [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-pde [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-platform-monitor [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-ptf Enable system-site-packages for ptf docker and install thrift for test_qos_sai (#12094) 2022-09-17 13:33:53 +08:00
docker-ptf-sai [SAI PTF] SAI PTF docker support sai-ptf v2 (#12719) 2022-11-17 04:42:51 -08:00
docker-router-advertiser Fix radv.conf traceback when VLAN_INTERFACE is not defined (#12034) 2022-09-09 12:54:05 -07:00
docker-sflow [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-snmp [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-sonic-mgmt [docker-sonic-mgmt] Cleanup and upgrade some packages (#12218) 2022-10-18 10:02:30 +08:00
docker-sonic-mgmt-framework [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-sonic-p4rt Update p4rt configuration to match SONiC upstream schema. (#10725) 2022-08-04 14:56:48 -07:00
docker-sonic-restapi [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-sonic-sdk [Bullseye] Upgrade sonic-sdk image to bullseye (#12649) 2022-11-28 18:57:26 +02:00
docker-sonic-sdk-buildenv Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-telemetry [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-swss-layer-bullseye Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-swss-layer-buster Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-teamd [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
dockerfile-macros.j2 [sonic-config-engine] Clean up dependencies, pin versions; install Python 3 package in Buster container (#5656) 2020-10-26 13:48:50 -07:00