Skip to content

Commit bf6dbf0

Browse files
committed
bond: Add back removed function and marked as deprecated
The commit 9b67c97 was removed these functions: * `BondAddRequest::active_slave()` * `BondAddRequest::all_slaves_active()` Let's just add it back and mark as deprecated, so we do not need to increase major version number so frequent. Signed-off-by: Gris Ge <fge@redhat.com>
1 parent 78a58db commit bf6dbf0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/link/add.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ impl BondAddRequest {
4949
self
5050
}
5151

52+
#[deprecated(note = "Please use `active_port` instead")]
53+
pub fn active_slave(mut self, active_port: u32) -> Self {
54+
self.info_data.push(InfoBond::ActivePort(active_port));
55+
self
56+
}
57+
5258
/// Adds the `active_port` attribute to the bond, where `active_port`
5359
/// is the ifindex of an interface attached to the bond.
5460
/// This is equivalent to `ip link add name NAME type bond active_slave
@@ -164,6 +170,13 @@ impl BondAddRequest {
164170
self
165171
}
166172

173+
#[deprecated(note = "Please use `all_ports_active` instead")]
174+
pub fn all_slaves_active(mut self, all_ports_active: u8) -> Self {
175+
self.info_data
176+
.push(InfoBond::AllPortsActive(all_ports_active));
177+
self
178+
}
179+
167180
/// Adds the `all_ports_active` attribute to the bond
168181
/// This is equivalent to `ip link add name NAME type bond all_slaves_active
169182
/// ALL_PORTS_ACTIVE`.

0 commit comments

Comments
 (0)