cleanup: reformat generateVolFromSnap() to rbdSnapshot.toVolume()

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2024-03-26 09:51:19 +01:00
committed by mergify[bot]
parent a517290ea7
commit ba05c0f5f1
4 changed files with 25 additions and 24 deletions

View File

@ -1053,7 +1053,7 @@ func genSnapFromSnapID(
// updateSnapshotDetails will copy the details from the rbdVolume to the
// rbdSnapshot. example copying size from rbdVolume to rbdSnapshot.
func updateSnapshotDetails(rbdSnap *rbdSnapshot) error {
vol := generateVolFromSnap(rbdSnap)
vol := rbdSnap.toVolume()
err := vol.Connect(rbdSnap.conn.Creds)
if err != nil {
return err