mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 10:55:42 +03:00
cli: Add volume type to delete error messages when API call fails. (#25392)
This commit is contained in:
@@ -146,7 +146,7 @@ func (c *VolumeDeleteCommand) deleteCSIVolume(client *api.Client, volID string,
|
||||
Namespace: c.namespace,
|
||||
})
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Could not find existing volume to delete: %s", err))
|
||||
c.Ui.Error(fmt.Sprintf(`Could not find existing CSI volume to delete: %s`, err))
|
||||
return 1
|
||||
}
|
||||
if len(possible) > 0 {
|
||||
@@ -179,7 +179,7 @@ func (c *VolumeDeleteCommand) deleteHostVolume(client *api.Client, volID string)
|
||||
if !helper.IsUUID(volID) {
|
||||
stub, possible, err := getHostVolumeByPrefix(client, volID, c.namespace)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Could not find existing volume to delete: %s", err))
|
||||
c.Ui.Error(fmt.Sprintf(`Could not find existing host volume to delete: %s`, err))
|
||||
return 1
|
||||
}
|
||||
if len(possible) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user