Skip to content

Commit

Permalink
Merge pull request #24 from storageos/feature/node-cordon
Browse files Browse the repository at this point in the history
Add cordon field to controllers
  • Loading branch information
JoeReid authored Sep 18, 2017
2 parents c62601b + 6ee45aa commit 5d7bd5d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
func (c *Client) ControllerList(opts types.ListOptions) ([]*types.Controller, error) {
listOpts := doOptions{
fieldSelector: opts.FieldSelector,
labelSelector: opts.LabelSelector,
labelSelector: opts.LabelSelector,
context: opts.Context,
}

Expand Down
2 changes: 1 addition & 1 deletion login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestLoginBadCreds(t *testing.T) {
}

if token != "" {
t.Error("token (%v) incorrectly returned", token)
t.Errorf("token (%v) incorrectly returned", token)
}
}

Expand Down
3 changes: 3 additions & 0 deletions types/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type Controller struct {
VersionInfo map[string]VersionInfo `json:"versionInfo"`
Version string `json:"version"`

// Cordon true if in an unschedulable state
Cordon bool `json:"unschedulable"`

// high level stats that combine info from all driver instances
CapacityStats CapacityStats `json:"capacityStats"`
}
Expand Down
3 changes: 3 additions & 0 deletions types/controller_update_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ type ControllerUpdateOptions struct {
// Labels are user-defined key/value metadata.
Labels map[string]string `json:"labels"`

// Cordon sets the controler into an unschedulable state if true
Cordon bool `json:"unschedulable"`

// Context can be set with a timeout or can be used to cancel a request.
Context context.Context `json:"-"`
}

0 comments on commit 5d7bd5d

Please sign in to comment.