Skip to content

Commit c260d67

Browse files
Ramkishor ChaladiRamkishor Chaladi
authored andcommitted
removed INTERVAL because it was not available in UI
1 parent f810087 commit c260d67

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

plugin/commands/block/snapshot_disable.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ EXAMPLE:
3838
return thisCmd.Run(args)
3939
},
4040
}
41-
cobraCmd.Flags().StringVarP(&thisCmd.Schedule_type, "schedule-type", "s", "", T("Snapshot schedule [required], options are: INTERVAL,HOURLY,DAILY,WEEKLY"))
41+
cobraCmd.Flags().StringVarP(&thisCmd.Schedule_type, "schedule-type", "s", "", T("Snapshot schedule [required], options are: HOURLY,DAILY,WEEKLY"))
4242
thisCmd.Command = cobraCmd
4343
return thisCmd
4444
}
@@ -50,11 +50,11 @@ func (cmd *SnapshotDisableCommand) Run(args []string) error {
5050
return slErr.NewInvalidSoftlayerIdInputError("Volume ID")
5151
}
5252
if cmd.Schedule_type == "" {
53-
return slErr.NewInvalidUsageError(T("[--schedule-type] is required, options are: INTERVAL, HOURLY, DAILY, WEEKLY."))
53+
return slErr.NewInvalidUsageError(T("[--schedule-type] is required, options are: HOURLY, DAILY, WEEKLY."))
5454
}
5555
scheduleType := cmd.Schedule_type
56-
if scheduleType != "HOURLY" && scheduleType != "DAILY" && scheduleType != "WEEKLY" && scheduleType != "INTERVAL" {
57-
return slErr.NewInvalidUsageError(T("[--schedule-type] must be INTERVAL, HOURLY, DAILY, or WEEKLY."))
56+
if scheduleType != "HOURLY" && scheduleType != "DAILY" && scheduleType != "WEEKLY" {
57+
return slErr.NewInvalidUsageError(T("[--schedule-type] must be HOURLY, DAILY, or WEEKLY."))
5858
}
5959
err = cmd.StorageManager.DisableSnapshots(volumeID, scheduleType)
6060
subs := map[string]interface{}{"ScheduleType": scheduleType, "VolumeID": volumeID}

plugin/managers/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ func (s storageManager) EnableSnapshot(volumeId int, scheduleType string, retent
693693

694694
// Disables snapshots for a specific block volume at a given schedule.
695695
// volumeId: The id of the volume
696-
// scheduleType: 'INTERVAL'|'HOURLY'|'DAILY'|'WEEKLY'
696+
// scheduleType: 'HOURLY'|'DAILY'|'WEEKLY'
697697
func (s storageManager) DisableSnapshots(volumeId int, scheduleType string) error {
698698
_, err := s.StorageService.Id(volumeId).DisableSnapshots(sl.String(scheduleType))
699699
return err

0 commit comments

Comments
 (0)