diff --git a/resource3/plugins/binary/commands.go b/resource3/plugins/binary/commands.go index 934cacd9e..fecc54f88 100644 --- a/resource3/plugins/binary/commands.go +++ b/resource3/plugins/binary/commands.go @@ -10,14 +10,16 @@ const ( GetNodesDeployCapacityCommand = "get-nodes-deploy-capacity" - SetNodeResourceCapacityCommand = "set-node-capacity" + SetNodeResourceCapacityCommand = "set-node-resource-capacity" GetNodeResourceInfoCommand = "get-node-resource-info" SetNodeResourceInfoCommand = "set-node-resource-info" - SetNodeResourceUsageCommand = "set-node-usage" + SetNodeResourceUsageCommand = "set-node-resource-usage" - GetMostIdleNodeCommand = "get-idle-node" + GetMostIdleNodeCommand = "get-most-idle-node" + + FixNodeResourceCommand = "fix-node-resource" GetMetricsDescriptionCommand = "get-metrics-description" GetMetricsCommand = "get-metrics" diff --git a/resource3/plugins/binary/node.go b/resource3/plugins/binary/node.go index 391bae30b..720e82675 100644 --- a/resource3/plugins/binary/node.go +++ b/resource3/plugins/binary/node.go @@ -102,8 +102,10 @@ func (p Plugin) doGetNodeResourceInfo(ctx context.Context, nodename string, work req := &binarytypes.GetNodeResourceInfoRequest{ Nodename: nodename, WorkloadsResource: workloadsResource, - Fix: fix, } resp := &plugintypes.GetNodeResourceInfoResponse{} - return resp, p.call(ctx, GetNodeResourceInfoCommand, req, resp) + if !fix { + return resp, p.call(ctx, GetNodeResourceInfoCommand, req, resp) + } + return resp, p.call(ctx, FixNodeResourceCommand, req, resp) } diff --git a/resource3/plugins/binary/types/node.go b/resource3/plugins/binary/types/node.go index 71926e28f..a7e1f4152 100644 --- a/resource3/plugins/binary/types/node.go +++ b/resource3/plugins/binary/types/node.go @@ -36,7 +36,6 @@ type SetNodeResourceCapacityRequest struct { type GetNodeResourceInfoRequest struct { Nodename string `json:"nodename" mapstructure:"nodename"` WorkloadsResource []*plugintypes.WorkloadResource `json:"workloads_resource" mapstructure:"workloads_resource"` - Fix bool `json:"fix" mapstructure:"fix"` } // SetNodeResourceInfoRequest .