Skip to content

Commit

Permalink
why decr, why not incr
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Feb 3, 2023
1 parent 656b6fa commit 3502ec4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resource3/plugins/binary/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (p Plugin) SetNodeResourceCapacity(ctx context.Context, nodename string, re
Resource: resource,
ResourceRequest: resourceRequest,
Delta: delta,
Decr: !incr,
Incr: incr,
}

resp := &plugintypes.SetNodeResourceCapacityResponse{}
Expand Down Expand Up @@ -77,7 +77,7 @@ func (p Plugin) SetNodeResourceUsage(ctx context.Context, nodename string, resou
Resource: resource,
ResourceRequest: resourceRequest,
Delta: delta,
Decr: !incr,
Incr: incr,
}

resp := &plugintypes.SetNodeResourceUsageResponse{}
Expand Down
4 changes: 2 additions & 2 deletions resource3/plugins/binary/types/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type SetNodeResourceCapacityRequest struct {
Resource *plugintypes.NodeResource `json:"resource" mapstructure:"resource"`
ResourceRequest *plugintypes.NodeResource `json:"resource_request" mapstructure:"resource_request"`
Delta bool `json:"delta" mapstructure:"delta"`
Decr bool `json:"decr" mapstructure:"decr"`
Incr bool `json:"incr" mapstructure:"incr"`
}

// GetNodeResourceInfoRequest .
Expand All @@ -53,7 +53,7 @@ type SetNodeResourceUsageRequest struct {
Resource *plugintypes.NodeResource `json:"resource" mapstructure:"resource"`
ResourceRequest *plugintypes.NodeResource `json:"resource_request" mapstructure:"resource_request"`
Delta bool `json:"delta" mapstructure:"delta"`
Decr bool `json:"decr" mapstructure:"decr"`
Incr bool `json:"incr" mapstructure:"incr"`
}

// GetMostIdleNodeRequest .
Expand Down

0 comments on commit 3502ec4

Please sign in to comment.