1040
1039
// SetVolumeStatus sets the status of the specified volume.
1041
1040
func (st *State) SetVolumeStatus(tag names.VolumeTag, volumeStatus status.Status, info string, data map[string]interface{}, updated *time.Time) error {
1043
case status.StatusAttaching, status.StatusAttached, status.StatusDetaching, status.StatusDetached, status.StatusDestroying:
1042
case status.Attaching, status.Attached, status.Detaching, status.Detached, status.Destroying:
1046
1045
return errors.Errorf("cannot set status %q without info", volumeStatus)
1049
1048
// If a volume is not yet provisioned, we allow its status
1050
1049
// to be set back to pending (when a retry is to occur).