| 14 | namespace fs = std::filesystem; |
| 15 | |
| 16 | std::string VmStateToString(VmState state) { |
| 17 | switch (state) { |
| 18 | case VmState::kStopped: return "stopped"; |
| 19 | case VmState::kStarting: return "starting"; |
| 20 | case VmState::kRunning: return "running"; |
| 21 | case VmState::kStopping: return "stopping"; |
| 22 | case VmState::kCrashed: return "crashed"; |
| 23 | case VmState::kRebooting: return "rebooting"; |
| 24 | } |
| 25 | return "unknown"; |
| 26 | } |
| 27 | |
| 28 | VmState VmStateFromString(const std::string& value) { |
| 29 | if (value == "starting") return VmState::kStarting; |
no outgoing calls
no test coverage detected