Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ def parse_dpg(dpg, hname):

# If this VLAN requires a DHCP relay agent, it will contain a <DhcpRelays> element
# containing a list of DHCP server IPs
if vintf.find(str(QName(ns, "DhcpRelays"))) is not None:
vintfdhcpservers = vintf.find(str(QName(ns, "DhcpRelays"))).text
vintf_node = vintf.find(str(QName(ns, "DhcpRelays")))
if vintf_node is not None and vintf_node.text is not None:
vintfdhcpservers = vintf_node.text
vdhcpserver_list = vintfdhcpservers.split(';')
vlan_attributes['dhcp_servers'] = vdhcpserver_list

Expand Down