Small refactor, to allow for more interface types to be added as l2xc targets later

This commit is contained in:
Pim van Pelt
2022-03-15 21:56:29 +00:00
parent af90b37a33
commit 05b3c5c157

View File

@ -160,8 +160,7 @@ def is_l2xc_interface(yaml, ifname):
def get_l2xc_target_interfaces(yaml):
""" Returns a list of all interfaces that are the target of an L2 CrossConnect """
ret = []
if not 'interfaces' in yaml:
return ret
if 'interfaces' in yaml:
for ifname, iface in yaml['interfaces'].items():
if 'l2xc' in iface:
ret.append(iface['l2xc'])