pub fn apply(before: FirewallReport) -> FirewallApplyReportExpand description
Run the report’s commands on this host. Refuses — runs nothing — without root and without a backend; every command that runs is recorded with its exit and its output, and the firewall is asked again afterwards so the answer is its word, not the commands’.
use majordomus_cli::mesh::firewall::{apply, report};
// an empty plan is refused before any privilege is needed, and nothing runs
let a = apply(report(None, &[], None));
assert!(a.refused.is_some() && a.applied.is_empty());
assert_eq!(a.observation, a.before.observation);