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
Description:
DetachDataVolumeFromVm function should only detach the volume from vm instead of delete it.
zstack-sdk-go-v2/pkg/client/other_actions.go
Lines 10390 to 10393 in ad99735
In the previous sdk version. ref It's only detach the volume, not delete it.
Expected Behaviour:
DetachDataVolumeFromVm should only detach the volume
Current Behaviour:
DetachDataVolumeFromVm delete the volume