QueryHotpluggableCPUs returns a list of hotpluggable CPUs.
()
| 184 | |
| 185 | // QueryHotpluggableCPUs returns a list of hotpluggable CPUs. |
| 186 | func (m *Monitor) QueryHotpluggableCPUs() ([]HotpluggableCPU, error) { |
| 187 | // Prepare the response. |
| 188 | var resp struct { |
| 189 | Return []HotpluggableCPU `json:"return"` |
| 190 | } |
| 191 | |
| 192 | err := m.Run("query-hotpluggable-cpus", nil, &resp) |
| 193 | if err != nil { |
| 194 | return nil, fmt.Errorf("Failed to query hotpluggable CPUs: %w", err) |
| 195 | } |
| 196 | |
| 197 | return resp.Return, nil |
| 198 | } |
| 199 | |
| 200 | // QueryCPUModel returns a CPUModel for the specified model name. |
| 201 | func (m *Monitor) QueryCPUModel(model string) (*CPUModel, error) { |
no test coverage detected