Skip to content

Commit

Permalink
fix is fix, get is get
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Feb 3, 2023
1 parent af5c120 commit 1683b34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions resource3/plugins/binary/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions resource3/plugins/binary/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
1 change: 0 additions & 1 deletion resource3/plugins/binary/types/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 1683b34

Please sign in to comment.