Commit 5a59f266 authored by Dmitry Lukhtionov's avatar Dmitry Lukhtionov
Browse files

Merge branch 'onyx_iface' into 'master'

Fix Mellanox.Onyx profile

See merge request noc/noc!6405
parents ea74fd55 9dd502cb
......@@ -41,9 +41,7 @@ class Script(BaseScript):
"vlan_id": match.group("vlan_id"),
"mac": match.group("mac"),
"interfaces": [iface],
"type": {"Dynamic": "D", "Static": "S"}[
match.group("type")
],
"type": {"Dynamic": "D", "Static": "S"}[match.group("type")],
}
)
return r
......@@ -24,3 +24,9 @@ class Profile(BaseProfile):
command_exit = "exit"
command_disable_pager = "terminal length 999"
config_volatile = [r"^## Generated at .+?\n"]
def convert_interface_name(self, s):
s = s.replace("Ethernet ", "Eth")
s = s.replace("port-channel ", "Po")
s = s.replace("Vlan ", "vlan")
return s
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment