MCPcopy
hub / github.com/lxc/incus / QueryHotpluggableCPUs

Method QueryHotpluggableCPUs

internal/server/instance/drivers/qmp/commands.go:186–198  ·  view source on GitHub ↗

QueryHotpluggableCPUs returns a list of hotpluggable CPUs.

()

Source from the content-addressed store, hash-verified

184
185// QueryHotpluggableCPUs returns a list of hotpluggable CPUs.
186func (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.
201func (m *Monitor) QueryCPUModel(model string) (*CPUModel, error) {

Callers 2

checkFeaturesMethod · 0.95
setCPUsMethod · 0.80

Calls 2

RunMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected