Skip to content

Commit

Permalink
Merge pull request #68 from domudall/fix-maintenance-typo
Browse files Browse the repository at this point in the history
Fixing Maintenance typo
  • Loading branch information
lfepp authored Apr 11, 2017
2 parents 63a6e47 + f86e1e6 commit 75111a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion command/maintenance_window_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (c *MaintenanceWindowCreate) Run(args []string) int {
return -1
}
log.Debugf("%#v", m)
if _, err := client.CreateMaintaienanceWindows(m); err != nil {
if _, err := client.CreateMaintenanceWindows(m); err != nil {
log.Error(err)
return -1
}
Expand Down
10 changes: 5 additions & 5 deletions maintenance_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ func (c *Client) ListMaintenanceWindows(o ListMaintenanceWindowsOptions) (*ListM
return &result, c.decodeJSON(resp, &result)
}

// CreateMaintaienanceWindows creates a new maintenance window for the specified services.
func (c *Client) CreateMaintaienanceWindows(m MaintenanceWindow) (*MaintenanceWindow, error) {
// CreateMaintenanceWindows creates a new maintenance window for the specified services.
func (c *Client) CreateMaintenanceWindows(m MaintenanceWindow) (*MaintenanceWindow, error) {
data := make(map[string]MaintenanceWindow)
data["maintenance_window"] = m
resp, err := c.post("/mainteance_windows", data)
resp, err := c.post("/maintenance_windows", data)
return getMaintenanceWindowFromResponse(c, resp, err)
}

// DeleteMaintenanceWindow deletes an existing maintenance window if it's in the future, or ends it if it's currently on-going.
func (c *Client) DeleteMaintenanceWindow(id string) error {
_, err := c.delete("/mainteance_windows/" + id)
_, err := c.delete("/maintenance_windows/" + id)
return err
}

Expand All @@ -73,7 +73,7 @@ func (c *Client) GetMaintenanceWindow(id string, o GetMaintenanceWindowOptions)
if err != nil {
return nil, err
}
resp, err := c.get("/mainteance_windows/" + id + "?" + v.Encode())
resp, err := c.get("/maintenance_windows/" + id + "?" + v.Encode())
return getMaintenanceWindowFromResponse(c, resp, err)
}

Expand Down

0 comments on commit 75111a5

Please sign in to comment.