rbd: remove redundant util.Credentials arg from flattenRbdImage()

With introduction of go-ceph rbd admin task api, credentials are
no longer required to be passed as cli cmd is not invoked.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2021-11-10 15:08:32 +05:30
committed by mergify[bot]
parent 7b0f051fd4
commit 9adb25691c
7 changed files with 59 additions and 63 deletions

View File

@ -375,7 +375,7 @@ func (ns *NodeServer) stageTransaction(
volOptions.readOnly = true
}
err = flattenImageBeforeMapping(ctx, volOptions, cr)
err = flattenImageBeforeMapping(ctx, volOptions)
if err != nil {
return transaction, err
}
@ -527,8 +527,7 @@ func resizeEncryptedDevice(ctx context.Context, volID, stagingTargetPath, device
func flattenImageBeforeMapping(
ctx context.Context,
volOptions *rbdVolume,
cr *util.Credentials) error {
volOptions *rbdVolume) error {
var err error
var feature bool
var depth uint
@ -550,7 +549,7 @@ func flattenImageBeforeMapping(
return err
}
if feature || depth != 0 {
err = volOptions.flattenRbdImage(ctx, cr, true, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth)
err = volOptions.flattenRbdImage(ctx, true, rbdHardMaxCloneDepth, rbdSoftMaxCloneDepth)
if err != nil {
return err
}