Skip to content

Commit

Permalink
Rename func
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqiangz committed Feb 23, 2023
1 parent b617db5 commit 15c5d4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def set_dhcp_relay_table(table, config_db, vlan_name, value):
config_db.set_entry(table, vlan_name, value)


def is_support_dhcp_relay():
def is_dhcp_relay_running():
out, _ = clicommon.run_command("systemctl show dhcp_relay.service --property ActiveState --value", return_cmd=True)
return out.strip() == "active"

Expand Down Expand Up @@ -54,7 +54,7 @@ def add_vlan(db, vid):
# set dhcpv6_relay table
set_dhcp_relay_table('DHCP_RELAY', config_db, vlan, None)
# We need to restart dhcp_relay service after dhcpv6_relay config change
if is_support_dhcp_relay():
if is_dhcp_relay_running():
dhcp_relay_util.handle_restart_dhcp_relay_service()


Expand Down Expand Up @@ -99,7 +99,7 @@ def del_vlan(db, vid):
# set dhcpv6_relay table
set_dhcp_relay_table('DHCP_RELAY', config_db, vlan, None)
# We need to restart dhcp_relay service after dhcpv6_relay config change
if is_support_dhcp_relay():
if is_dhcp_relay_running():
dhcp_relay_util.handle_restart_dhcp_relay_service()


Expand Down

0 comments on commit 15c5d4b

Please sign in to comment.