Snapshot view of an instance's port-policy state for inspection.
(&self, instance_id: &str)
| 973 | |
| 974 | /// Snapshot view of an instance's port-policy state for inspection. |
| 975 | pub(crate) fn instance_port_policy_view(&self, instance_id: &str) -> Option<PortPolicyView> { |
| 976 | let info = self.state.instances.get(instance_id)?; |
| 977 | Some(PortPolicyView { |
| 978 | instance_reported: info.port_policy.clone(), |
| 979 | admin_override: info.admin_port_policy.clone(), |
| 980 | }) |
| 981 | } |
| 982 | |
| 983 | /// Set an admin override. Errors if the instance is not registered. |
| 984 | pub(crate) fn set_admin_port_policy( |
no test coverage detected