Commit 6a6ade6f authored by Gerry Gunzenhauser's avatar Gerry Gunzenhauser

add bridge config to crs226 config getn

parent fa48d7fd
Pipeline #59554 passed with stages
in 3 minutes and 4 seconds
......@@ -51,8 +51,14 @@ mod gen_crs226 {
impl Generator for GenCrs226 {
fn build_configuration(&self, device: &Device) -> String {
let mut src = " {\n /interface bridge\n remove [find]\n add name=switch protocol-mode=none\n /interface bridge port\n remove [find]\n".to_owned();
for port in device.ports.iter() {
if port.org_name != "switch1-cpu" {
src += format!(" add bridge=switch interface=\"{}\"\n", port.new_name).as_str();
}
}
let mut src = " {\n /interface ethernet switch egress-vlan-tag\n remove [find where !dynamic]\n".to_owned();
src += " }\n {\n /interface ethernet switch egress-vlan-tag\n remove [find where !dynamic]\n";
for vlan in device.get_tagged_ports().iter() {
src += format!(" add tagged-ports=\"{}\" vlan={}\n", vlan.1.join(","), vlan.0).as_str()
}
......
Markdown is supported
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