| 899 | } |
| 900 | |
| 901 | fn update_indexes( |
| 902 | sandbox_name_to_id: &mut std::collections::HashMap<String, String>, |
| 903 | agent_pod_to_id: &mut std::collections::HashMap<String, String>, |
| 904 | sandbox: &Sandbox, |
| 905 | ) { |
| 906 | if !sandbox.name.is_empty() { |
| 907 | sandbox_name_to_id.insert(sandbox.name.clone(), sandbox.id.clone()); |
| 908 | } |
| 909 | if let Some(status) = sandbox.status.as_ref() |
| 910 | && !status.instance_id.is_empty() |
| 911 | { |
| 912 | agent_pod_to_id.insert(status.instance_id.clone(), sandbox.id.clone()); |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | fn remove_indexes( |
| 917 | sandbox_name_to_id: &mut std::collections::HashMap<String, String>, |