mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): host model add api stats (#24956)
This commit is contained in:
@@ -77,6 +77,7 @@ func init() {
|
||||
stats, _ := data.GetArray("workers")
|
||||
printList(&printutils.ListResult{Data: stats}, nil)
|
||||
}, &options.BaseIdOptions{})
|
||||
cmd.Get("api-stats", &options.BaseIdOptions{})
|
||||
cmd.Get("tap-config", &options.BaseIdOptions{})
|
||||
cmd.GetWithCustomShow("nics", func(data jsonutils.JSONObject) {
|
||||
results := printutils.ListResult{}
|
||||
|
||||
@@ -8197,6 +8197,10 @@ func (h *SHost) GetDetailsWorkerStats(ctx context.Context, userCred mcclient.Tok
|
||||
return h.Request(ctx, userCred, httputils.GET, "/worker_stats", nil, nil)
|
||||
}
|
||||
|
||||
func (h *SHost) GetDetailsApiStats(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
return h.Request(ctx, userCred, httputils.GET, "/stats", nil, nil)
|
||||
}
|
||||
|
||||
func (hh *SHost) GetDetailsIsolatedDeviceNumaStats(ctx context.Context, userCred mcclient.TokenCredential, input *api.HostIsolatedDeviceNumaStatsInput) (jsonutils.JSONObject, error) {
|
||||
if !utils.IsInStringArray(input.DevType, api.VALID_PASSTHROUGH_TYPES) {
|
||||
return nil, httperrors.NewInputParameterError("dev_type %s is invalid", input.DevType)
|
||||
|
||||
Reference in New Issue
Block a user