Skip to content

[BUG] DetachDataVolumeFromVm shouldn't delete the volume #1

Description

@ahmadnurus

Description:

DetachDataVolumeFromVm function should only detach the volume from vm instead of delete it.

// DetachDataVolumeFromVm operates on DataVolumeFromVm
func (cli *ZSClient) DetachDataVolumeFromVm(uuid string, deleteMode param.DeleteMode) error {
return cli.Delete("v1/volumes", uuid, string(deleteMode))
}

In the previous sdk version. ref It's only detach the volume, not delete it.

func (cli *ZSClient) DetachDataVolumeFromVm(uuid, vmUuid string) (*view.VolumeView, error) {
	volume := view.VolumeView{}
	return &volume, cli.DeleteWithSpec("v1/volumes", uuid, "vm-instances", fmt.Sprintf("vmUuid=%s", vmUuid), &volume)
}

Expected Behaviour:

DetachDataVolumeFromVm should only detach the volume

Current Behaviour:

DetachDataVolumeFromVm delete the volume

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions