pub struct ApplyHwConfigurationParams<'a> {
pub mode: HwClusterMode,
pub target_group_name: &'a str,
pub parent_group_name: &'a str,
pub pattern: &'a str,
pub dryrun: bool,
pub create_target_group: bool,
pub delete_empty_parent_group: bool,
}Expand description
Pin or unpin nodes between parent_group_name and
target_group_name so the target group satisfies pattern.
The flow is parse → ensure → score → resolve → apply: the
component pattern is parsed into a counts map, the target group is
created on demand (or refused when create_target_group is false
and the group is missing), parent and target hardware inventories
are fetched, the resource-sufficiency check rejects patterns that
ask for more of a component than exists in the pool, and mode
(Pin / Unpin) picks which selection algorithm runs. dryrun
shortcuts every backend mutation but still returns the would-be
final memberships so the operator sees the plan.
Parameters for apply_hw_configuration.
Fields§
§mode: HwClusterModePin (capacity-aware selection) or Unpin (release all).
target_group_name: &'a strDestination HSM group that will receive nodes matching pattern.
parent_group_name: &'a strSource HSM group nodes are drawn from when honouring pattern.
pattern: &'a strHardware-component request string, e.g. "a100:8,milan:2".
dryrun: boolWhen true, plan the moves but skip every backend mutation; the
returned ApplyHwResult still reflects the would-be membership.
create_target_group: boolCreate target_group_name if it doesn’t already exist.
delete_empty_parent_group: boolDelete the parent group when the move leaves it with no members.
Auto Trait Implementations§
impl<'a> Freeze for ApplyHwConfigurationParams<'a>
impl<'a> RefUnwindSafe for ApplyHwConfigurationParams<'a>
impl<'a> Send for ApplyHwConfigurationParams<'a>
impl<'a> Sync for ApplyHwConfigurationParams<'a>
impl<'a> Unpin for ApplyHwConfigurationParams<'a>
impl<'a> UnwindSafe for ApplyHwConfigurationParams<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more