api/maintenance.go
func (a *API) DeleteMaintenanceWindowByCID(cid CIDType) (bool, error) {
	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid maintenance window CID [none]")
	}

	maintenanceCID := string(*cid)

	matched, err := regexp.MatchString(config.MaintenanceCIDRegex, maintenanceCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid maintenance window CID [%s]", maintenanceCID)
	}

	_, err = a.Delete(maintenanceCID)
	if err != nil {
		return false, err
	}

	return true, nil
}
func (a *API) DeleteMaintenanceWindowByCID(cid CIDType) (bool, error) {
	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid maintenance window CID [none]")
	}

	maintenanceCID := string(*cid)

	matched, err := regexp.MatchString(config.MaintenanceCIDRegex, maintenanceCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid maintenance window CID [%s]", maintenanceCID)
	}

	_, err = a.Delete(maintenanceCID)
	if err != nil {
		return false, err
	}

	return true, nil
}
// DeleteMaintenanceWindowByCID deletes maintenance [window] with passed cid.