From ec77afa605ff8512263288042fa86c9d5c2efe10 Mon Sep 17 00:00:00 2001 From: Ian Letourneau Date: Tue, 28 Oct 2025 15:42:47 -0400 Subject: [PATCH] fix command to find next available port-channel id --- brocade/src/network_operating_system.rs | 9 ++------- .../src/modules/okd/bootstrap_persist_network_bond.rs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/brocade/src/network_operating_system.rs b/brocade/src/network_operating_system.rs index b1100b4..f7f8570 100644 --- a/brocade/src/network_operating_system.rs +++ b/brocade/src/network_operating_system.rs @@ -102,7 +102,7 @@ impl NetworkOperatingSystemClient { }; Some(Ok(InterfaceInfo { - name: format!("{} {}", interface_type, port_location), + name: format!("{interface_type} {port_location}"), port_location, interface_type, operating_mode, @@ -196,8 +196,6 @@ impl BrocadeClient for NetworkOperatingSystemClient { commands.push("exit".into()); } - commands.push("write memory".into()); - self.shell .run_commands(commands, ExecutionMode::Regular) .await?; @@ -212,7 +210,7 @@ impl BrocadeClient for NetworkOperatingSystemClient { let output = self .shell - .run_command("show port-channel", ExecutionMode::Regular) + .run_command("show port-channel summary", ExecutionMode::Regular) .await?; let used_ids: Vec = output @@ -280,8 +278,6 @@ impl BrocadeClient for NetworkOperatingSystemClient { commands.push("exit".into()); } - commands.push("write memory".into()); - self.shell .run_commands(commands, ExecutionMode::Regular) .await?; @@ -298,7 +294,6 @@ impl BrocadeClient for NetworkOperatingSystemClient { "configure terminal".into(), format!("no interface port-channel {}", channel_name), "exit".into(), - "write memory".into(), ]; self.shell diff --git a/harmony/src/modules/okd/bootstrap_persist_network_bond.rs b/harmony/src/modules/okd/bootstrap_persist_network_bond.rs index fd901f1..788f2c8 100644 --- a/harmony/src/modules/okd/bootstrap_persist_network_bond.rs +++ b/harmony/src/modules/okd/bootstrap_persist_network_bond.rs @@ -94,7 +94,7 @@ impl OKDSetupPersistNetworkBondInterpet { #[async_trait] impl Interpret for OKDSetupPersistNetworkBondInterpet { fn get_name(&self) -> InterpretName { - InterpretName::Custom("OKDSetup03ControlPlane") + InterpretName::Custom("OKDSetupPersistNetworkBondInterpet") } fn get_version(&self) -> Version {