Commit 2662f34e authored by Dmitry Lukhtionov's avatar Dmitry Lukhtionov Committed by bee26
Browse files

Update Orion.NOS profile

parent 703e7f2e
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_arp # Orion.NOS.get_arp
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Python modules
import re
# NOC modules
from noc.core.script.base import BaseScript from noc.core.script.base import BaseScript
from noc.sa.interfaces.igetarp import IGetARP from noc.sa.interfaces.igetarp import IGetARP
import re
class Script(BaseScript): class Script(BaseScript):
...@@ -16,7 +18,7 @@ class Script(BaseScript): ...@@ -16,7 +18,7 @@ class Script(BaseScript):
interface = IGetARP interface = IGetARP
rx_line = re.compile( rx_line = re.compile(
r"^\s*(?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\s+" r"^\s*(?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\s+"
r"(?P<mac>\S+)\s+\S+\s+(?P<interface>\S+)\s*$", r"(?P<mac>\S+)\s+\S+\s+(?P<interface>\S+)\s*",
re.MULTILINE, re.MULTILINE,
) )
......
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_chassis_id # Orion.NOS.get_chassis_id
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# NOC modules
from noc.core.script.base import BaseScript from noc.core.script.base import BaseScript
from noc.sa.interfaces.igetchassisid import IGetChassisID from noc.sa.interfaces.igetchassisid import IGetChassisID
...@@ -17,4 +18,7 @@ class Script(BaseScript): ...@@ -17,4 +18,7 @@ class Script(BaseScript):
def execute_cli(self): def execute_cli(self):
v = self.profile.get_version(self) v = self.profile.get_version(self)
return {"first_chassis_mac": v["mac"], "last_chassis_mac": v["mac"]} r = [{"first_chassis_mac": v["mac"], "last_chassis_mac": v["mac"]}]
if v.get("mac2") is not None:
r += [{"first_chassis_mac": v["mac2"], "last_chassis_mac": v["mac2"]}]
return r
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_interface_status # Orion.NOS.get_interface_status
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
...@@ -18,10 +18,29 @@ class Script(BaseScript): ...@@ -18,10 +18,29 @@ class Script(BaseScript):
name = "Orion.NOS.get_interface_status" name = "Orion.NOS.get_interface_status"
interface = IGetInterfaceStatus interface = IGetInterfaceStatus
rx_port = re.compile(r"^\s*(?P<port>\d+)\s+\S+\s+(?P<oper_status>\S+)", re.MULTILINE) rx_port = re.compile(r"^\s*P?(?P<port>\d+)\s+\S+\s+(?P<oper_status>\S+)", re.MULTILINE)
def execute_cli(self, interface=None): def execute_cli(self, interface=None):
r = [] r = []
if self.is_beta:
port_count = self.profile.get_port_count(self)
c = self.cli(("show interface port-list 1-%d" % port_count), cached=True)
for match in self.rx_port.finditer(c):
if (interface is not None) and (interface == match.group("port")):
return [
{
"interface": match.group("port"),
"status": "down" not in match.group("oper_status"),
}
]
r += [
{
"interface": match.group("port"),
"status": "down" not in match.group("oper_status"),
}
]
return r
for match in self.rx_port.finditer(self.cli("show interface port")): for match in self.rx_port.finditer(self.cli("show interface port")):
if (interface is not None) and (interface == match.group("port")): if (interface is not None) and (interface == match.group("port")):
return [ return [
......
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_interfaces # Orion.NOS.get_interfaces
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
...@@ -21,6 +21,24 @@ class Script(BaseScript): ...@@ -21,6 +21,24 @@ class Script(BaseScript):
rx_port = re.compile( rx_port = re.compile(
r"^\s*(?P<port>\d+)\s+(?P<admin_status>\S+)\s+(?P<oper_status>\S+)\s+", re.MULTILINE r"^\s*(?P<port>\d+)\s+(?P<admin_status>\S+)\s+(?P<oper_status>\S+)\s+", re.MULTILINE
) )
rx_port_beta = re.compile(
r"^\s*P(?P<port>\d+)\s+(?P<admin_status>\S+)\s+(?P<oper_status>\S+)\s+"
r"\S+\s+\S+\s+\S+\s+\S+\s+(?P<descr>\S+)\s*\n",
re.MULTILINE,
)
rx_port_a26 = re.compile(
r"^\s*(?P<ifname>\S+) is (?P<admin_status>\S+), line protocol is (?P<oper_status>\S+)(, dev index is (?P<ifindex>\d+))?\s*\n"
r"(^\s*\S+ is layer 2 port, alias name is (?P<descr>\S+), index is (?P<snmp_ifindex>\d+)\s*\n)?"
r"(^\s*Device flag .+\n)?"
r"(^\s*Time since last status change.+\n)?"
r"(^\s*IPv4 address is:\s*\n)?"
r"(^\s*(?P<address>\S+)\s+(?P<mask>\S+)\s+\(Primary\)\s*\n)?"
r"(^\s*VRF Bind: .+\n)?"
r"^\s*Hardware is \S+, (active is \S+, )?address is (?P<mac>\S+)\s*\n"
r"(^\s*PVID is (?P<pvid>\S+)\s*\n)?"
r"^\s*MTU (is )?(?P<mtu>\d+) bytes",
re.MULTILINE,
)
rx_descr = re.compile(r"^(?P<port>\d+)(?P<descr>.+)$", re.MULTILINE) rx_descr = re.compile(r"^(?P<port>\d+)(?P<descr>.+)$", re.MULTILINE)
rx_switchport = re.compile( rx_switchport = re.compile(
r"^Administrative Mode: (?P<mode>\S+)\s*\n" r"^Administrative Mode: (?P<mode>\S+)\s*\n"
...@@ -33,18 +51,52 @@ class Script(BaseScript): ...@@ -33,18 +51,52 @@ class Script(BaseScript):
r"^Administrative Trunk Allowed VLANs: (?P<vlans>\S+)\s*\n", r"^Administrative Trunk Allowed VLANs: (?P<vlans>\S+)\s*\n",
re.MULTILINE, re.MULTILINE,
) )
rx_enabled = re.compile(r"^\s*(?P<port>d+)\s+Ena", re.MULTILINE | re.IGNORECASE) rx_switchport_beta = re.compile(
r"^Interface: port(?P<port>\d+)\s*\n"
r"^Reject frame type: \S+\s*\n"
r"^Administrative Mode: (?P<mode>\S+)\s*\n"
r"^Operational Mode: \S+\s*\n"
r"^Access Mode VLAN: (?P<access_vlan>\d+)\s*\n"
r"^Administrative Access Egress VLANs:.*\n"
r"^Operational Access Egress VLANs:.*\n"
r"^Trunk Native Mode VLAN: (?P<native_vlan>\d+)\s*\n"
r"^Administrative Trunk Allowed VLANs: (?P<vlans>\S+)\s*\n",
re.MULTILINE,
)
rx_switchport_a26 = re.compile(
r"^(?P<ifname>\S+)\s*\n"
r"^Type :\S+\s*\n"
r"^Mode :(?P<mode>\S+)\s*\n"
r"^Port VID :(?P<pvid>\d+)\s*\n"
r"(^Trunk allowed Vlan: (?P<vlans>\d+\S+)\s*\n)?",
re.MULTILINE,
)
rx_enabled = re.compile(r"^\s*P?(?P<port>\d+)\s+Ena", re.MULTILINE | re.IGNORECASE)
# do not verified # do not verified
rx_oam = re.compile(r"^\s*(?P<port>d+)operate", re.MULTILINE | re.IGNORECASE) rx_oam = re.compile(r"^\s*P?(?P<port>\d+)operate", re.MULTILINE | re.IGNORECASE)
rx_lldp = re.compile(r"^\s*P?(?P<port>(?!0)\d+)\s+\d+", re.MULTILINE | re.IGNORECASE)
rx_ip = re.compile( rx_ip = re.compile(
r"^\s*(?P<ifname>\S+)\s+(?P<ip_address>\S+)\s+(?P<ip_subnet>\S+)\s+" r"^\s*(?P<ifname>\S+)\s+(?P<ip_address>\S+)\s+(?P<ip_subnet>\S+)\s+"
r"(?P<vlan_id>\d+)\s+(?P<admin_status>\S+)\s*\n", r"(?P<vlan_id>\d+)\s+(?P<admin_status>\S+)\s*\n",
re.MULTILINE, re.MULTILINE,
) )
rx_ip_beta = re.compile(
r"^\s*(?P<ifname>\d+)\s+(?P<ip_address>\d\S+)\s+(?P<ip_subnet>\d\S+)\s+",
re.MULTILINE,
)
rx_ip_beta_vlan = re.compile(
r"^\s*(?P<ifname>\d+)\s+(?P<vlan_id>\d+)\s*\n",
re.MULTILINE,
)
port_count = 0
def get_gvrp(self): def get_gvrp(self):
try: try:
v = self.cli("show gvrp configuration") if self.is_beta:
v = self.cli("show gvrp port-list 1-%d" % self.port_count)
else:
v = self.cli("show gvrp configuration")
if "GVRP Global Admin State: Disable" not in v: if "GVRP Global Admin State: Disable" not in v:
return self.rx_enabled.findall(v) return self.rx_enabled.findall(v)
except self.CLISyntaxError: except self.CLISyntaxError:
...@@ -74,7 +126,10 @@ class Script(BaseScript): ...@@ -74,7 +126,10 @@ class Script(BaseScript):
v = self.cli("show lldp statistic") v = self.cli("show lldp statistic")
if "LLDP is not enabled." not in v: if "LLDP is not enabled." not in v:
# Need more examples # Need more examples
return self.rx_enabled.findall(v) if self.is_beta:
return self.rx_lldp.findall(v)
else:
return self.rx_enabled.findall(v)
except self.CLISyntaxError: except self.CLISyntaxError:
return [] return []
return [] return []
...@@ -82,7 +137,10 @@ class Script(BaseScript): ...@@ -82,7 +137,10 @@ class Script(BaseScript):
def get_oam(self): def get_oam(self):
try: try:
# Need more examples # Need more examples
v = self.cli("show extended-oam status") if self.is_beta:
v = self.cli("show extended-oam status port-list 1-%d" % self.port_count)
else:
v = self.cli("show extended-oam status")
return self.rx_enabled.findall(v) return self.rx_enabled.findall(v)
except self.CLISyntaxError: except self.CLISyntaxError:
return [] return []
...@@ -90,13 +148,158 @@ class Script(BaseScript): ...@@ -90,13 +148,158 @@ class Script(BaseScript):
def execute_cli(self): def execute_cli(self):
interfaces = [] interfaces = []
descr = [] descr = []
if self.is_a26:
c = self.cli("show interface")
for match in self.rx_port_a26.finditer(c):
ifname = match.group("ifname")
iface = {
"name": ifname,
"type": self.profile.get_interface_type(ifname),
"admin_status": "up" in match.group("admin_status"),
"oper_status": "up" in match.group("oper_status"),
"mtu": match.group("mtu"),
"subinterfaces": [
{
"name": ifname,
"admin_status": "up" in match.group("admin_status"),
"oper_status": "up" in match.group("oper_status"),
"enabled_afi": [],
}
],
}
if match.group("snmp_ifindex"):
iface["snmp_ifindex"] = match.group("snmp_ifindex")
if match.group("ifindex"):
iface["snmp_ifindex"] = match.group("ifindex")
if match.group("mac"):
iface["mac"] = match.group("mac")
if match.group("descr") and match.group("descr") != "(null)":
iface["description"] = match.group("descr")
if match.group("mac"):
iface["subinterfaces"][0]["untagged_vlan"] = match.group("pvid")
if iface["type"] == "physical":
iface["subinterfaces"][0]["enabled_afi"] += ["BRIDGE"]
if iface["type"] == "SVI":
iface["subinterfaces"][0]["vlan_ids"] = ifname[4:]
if match.group("address") and match.group("mask"):
ip_address = match.group("address")
ip_subnet = match.group("mask")
ip_address = "%s/%s" % (ip_address, IPv4.netmask_to_len(ip_subnet))
iface["subinterfaces"][0]["enabled_afi"] += ["IPv4"]
iface["subinterfaces"][0]["ipv4_addresses"] = [ip_address]
interfaces += [iface]
c = self.cli("show switchport interface")
for match in self.rx_switchport_a26.finditer(c):
ifname = match.group("ifname")
for iface in interfaces:
if iface["name"] == ifname:
sub = iface["subinterfaces"][0]
if match.group("mode") == "Access":
sub["untagged_vlan"] = int(match.group("pvid"))
elif match.group("mode") == "Trunk":
sub["untagged_vlan"] = int(match.group("pvid"))
sub["tagged_vlans"] = self.expand_rangelist(
match.group("vlans").replace(";", ",")
)
else:
raise self.NotSupportedError()
break
return [{"interfaces": interfaces}]
if self.is_beta:
self.port_count = self.profile.get_port_count(self)
gvrp = self.get_gvrp() gvrp = self.get_gvrp()
stp = self.get_stp() stp = self.get_stp()
ctp = self.get_ctp() ctp = self.get_ctp()
lldp = self.get_lldp() lldp = self.get_lldp()
oam = self.get_lldp() oam = self.get_oam()
for l in self.cli("show interface port description").split("\n"):
match = self.rx_descr.match(l.strip()) if self.is_beta:
c = self.cli(("show interface port-list 1-%d" % self.port_count), cached=True)
for match in self.rx_port_beta.finditer(c):
ifname = match.group("port")
iface = {
"name": ifname,
"type": "physical",
"admin_status": "enable" in match.group("admin_status"),
"oper_status": "down" not in match.group("oper_status"),
"enabled_protocols": [],
"snmp_ifindex": ifname,
"description": match.group("descr"),
"subinterfaces": [
{
"name": ifname,
"admin_status": "enable" in match.group("admin_status"),
"oper_status": "down" not in match.group("oper_status"),
"enabled_afi": ["BRIDGE"],
}
],
}
if ifname in gvrp:
iface["enabled_protocols"] += ["GVRP"]
if ifname in stp:
iface["enabled_protocols"] += ["STP"]
if ifname in ctp:
iface["enabled_protocols"] += ["CTP"]
if ifname in lldp:
iface["enabled_protocols"] += ["LLDP"]
if ifname in oam:
iface["enabled_protocols"] += ["OAM"]
interfaces += [iface]
c = self.cli(("show interface port-list 1-%d switchport" % self.port_count))
for match in self.rx_switchport_beta.finditer(c):
ifname = match.group("port")
for iface in interfaces:
if iface["name"] == ifname:
sub = iface["subinterfaces"][0]
if match.group("mode") == "access":
sub["untagged_vlan"] = int(match.group("access_vlan"))
elif match.group("mode") == "trunk":
sub["untagged_vlan"] = int(match.group("native_vlan"))
sub["tagged_vlans"] = self.expand_rangelist(match.group("vlans"))
else:
raise self.NotSupportedError()
break
mac = self.scripts.get_chassis_id()[0].get("first_chassis_mac")
c = self.cli("show interface ip")
for match in self.rx_ip_beta.finditer(c):
ip_address = match.group("ip_address")
ip_subnet = match.group("ip_subnet")
ip_address = "%s/%s" % (ip_address, IPv4.netmask_to_len(ip_subnet))
ifname = match.group("ifname")
iface = {
"name": "ip%s" % ifname,
"type": "SVI",
"admin_status": True,
"oper_status": True,
"mac": mac,
"subinterfaces": [
{
"name": "ip%s" % ifname,
"admin_status": True,
"oper_status": True,
"mac": mac,
"enabled_afi": ["IPv4"],
"ipv4_addresses": [ip_address],
}
],
}
interfaces += [iface]
c = self.cli("show interface ip vlan")
for match in self.rx_ip_beta_vlan.finditer(c):
ifname = "ip%s" % match.group("ifname")
vid = match.group("vlan_id")
for iface in interfaces:
if iface["name"] == ifname:
sub = iface["subinterfaces"][0]
sub["vlan_ids"] = vid
break
# Not implemented
# c = self.cli("show interface ipv6")
return [{"interfaces": interfaces}]
for line in self.cli("show interface port description").split("\n"):
match = self.rx_descr.match(line.strip())
if match: if match:
if match.group("port") == "Port": if match.group("port") == "Port":
continue continue
...@@ -147,8 +350,8 @@ class Script(BaseScript): ...@@ -147,8 +350,8 @@ class Script(BaseScript):
interfaces += [iface] interfaces += [iface]
mac = self.profile.get_version(self)["mac"] mac = self.profile.get_version(self)["mac"]
descr = [] descr = []
for l in self.cli("show interface ip description").split("\n"): for line in self.cli("show interface ip description").split("\n"):
match = self.rx_descr.match(l.strip()) match = self.rx_descr.match(line.strip())
if match: if match:
if match.group("port") == "Port": if match.group("port") == "Port":
continue continue
......
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_lldp_neighbors # Orion.NOS.get_lldp_neighbors
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
...@@ -42,8 +42,8 @@ class Script(BaseScript): ...@@ -42,8 +42,8 @@ class Script(BaseScript):
""" """
rx_lldp = re.compile(r"^port(?P<port>\d+)\s+(?P<chassis_id>\S+)", re.MULTILINE) rx_lldp = re.compile(r"^port(?P<port>\d+)\s+(?P<chassis_id>\S+)", re.MULTILINE)
rx_int = re.compile( rx_int = re.compile(
r"^Port\s+port(?P<interface>\d+)\s+has\s+1\s+remotes:\s*\n" r"^P(ort\s+port)?(?P<interface>\d+)\s+has\s+1\s+remotes:\s*\n"
r"^\s*\n" r"(^\s*\n)?"
r"^Remote\s*1\s*\n" r"^Remote\s*1\s*\n"
r"^-+\s*\n" r"^-+\s*\n"
r"^ChassisIdSubtype\s*:\s+(?P<chassis_subtype>\S+)\s*\n" r"^ChassisIdSubtype\s*:\s+(?P<chassis_subtype>\S+)\s*\n"
...@@ -57,9 +57,42 @@ class Script(BaseScript): ...@@ -57,9 +57,42 @@ class Script(BaseScript):
r"^SysCapEnabled\s*:\s+(?P<caps>.+)\s*\n", r"^SysCapEnabled\s*:\s+(?P<caps>.+)\s*\n",
re.MULTILINE, re.MULTILINE,
) )
rx_int_a26 = re.compile(
r"^Port name\s*:\s*(?P<interface>\S+)\s*\n"
r"^Port Remote Counter\s*:\s*1\s*\n"
r"^TimeMark\s*:\s*\d+\s*\n"
r"^ChassisIdSubtype\s*:\s*(?P<chassis_subtype>\d+)\s*\n"
r"^ChassisId\s*:\s*(?P<chassis_id>\S+)\s*\n"
r"^PortIdSubtype\s*:\s*(?P<port_subtype>\S+)\s*\n"
r"^PortId\s*:\s*(?P<port_id>.+)\n"
r"^PortDesc\s*:\s*(?P<port_descr>.+)\n"
r"^SysName\s*:\s*(?P<sys_name>.*)\n",
re.MULTILINE,
)
def execute_cli(self): def execute_cli(self):
result = [] result = []
if self.is_a26:
v = self.cli("show lldp neighbors interface")
for match in self.rx_int_a26.finditer(v):
neighbor = {
"remote_chassis_id_subtype": match.group("chassis_subtype"),
"remote_chassis_id": match.group("chassis_id"),
"remote_port_subtype": {
# Need more examples
"Interface": LLDP_PORT_SUBTYPE_NAME,
}[match.group("port_subtype")],
"remote_port": match.group("port_id"),
}
if match.group("port_descr").strip():
p = match.group("port_descr").strip()
neighbor["remote_port_description"] = p
if match.group("sys_name").strip():
p = match.group("sys_name").strip()
neighbor["remote_system_name"] = p
result += [{"local_interface": match.group("interface"), "neighbors": [neighbor]}]
return result
chassis = {} chassis = {}
v = self.cli("show lldp remote") v = self.cli("show lldp remote")
for match in self.rx_lldp.finditer(v): for match in self.rx_lldp.finditer(v):
...@@ -101,12 +134,12 @@ class Script(BaseScript): ...@@ -101,12 +134,12 @@ class Script(BaseScript):
caps = lldp_caps_to_bits( caps = lldp_caps_to_bits(
match.group("caps").strip().split(","), match.group("caps").strip().split(","),
{ {
"Other": LLDP_CAP_OTHER, "other": LLDP_CAP_OTHER,
"Repeater/Hub": LLDP_CAP_REPEATER, "repeater/hub": LLDP_CAP_REPEATER,
"Bridge/Switch": LLDP_CAP_BRIDGE, "bridge/switch": LLDP_CAP_BRIDGE,
"Router": LLDP_CAP_ROUTER, "router": LLDP_CAP_ROUTER,
"Telephone": LLDP_CAP_TELEPHONE, "telephone": LLDP_CAP_TELEPHONE,
"Station": LLDP_CAP_STATION_ONLY, "station": LLDP_CAP_STATION_ONLY,
}, },
) )
neighbor["remote_capabilities"] = caps neighbor["remote_capabilities"] = caps
......
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Orion.NOS.get_mac_address_table # Orion.NOS.get_mac_address_table
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project # Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details # See LICENSE for details
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
...@@ -17,16 +17,15 @@ class Script(BaseScript): ...@@ -17,16 +17,15 @@ class Script(BaseScript):
name = "Orion.NOS.get_mac_address_table" name = "Orion.NOS.get_mac_address_table"
interface = IGetMACAddressTable interface = IGetMACAddressTable
rx_port = re.compile(r"^\s*(?P<port>\d+)", re.MULTILINE)
rx_line = re.compile( rx_line = re.compile(
r"^\s*(?P<mac>\S+)\s+(?:(?P<port>\d+)\s+)?(?P<vlan_id>\d+)\s+\S+\s*\n", re.MULTILINE r"^\s*(?P<mac>\S+)\s+(?:P?(?P<port>\d+)\s+)?(?P<vlan_id>\d+)\s+\S+\s*\n", re.MULTILINE
) )
def execute_cli(self, interface=None, vlan=None, mac=None): def execute_cli(self, interface=None, vlan=None, mac=None):
r = [] r = []
# "show mac address-table" command do not show port name on some cases # "show mac address-table" command do not show port name on some cases
for match in self.rx_port.finditer(self.cli("show port-security")): port_count = self.profile.get_port_count(self)
port = match.group("port") for port in range(1, port_count + 1):
v = self.cli("show mac-address-table l2-address port %s" % port) v = self.cli("show mac-address-table l2-address port %s" % port)
for match1 in self.rx_line.finditer(v): for match1 in self.rx_line.finditer(v):
r += [