rbd: make hasSnapshotFeature() a method of rbdVolume

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2020-06-18 13:33:06 +02:00
committed by mergify[bot]
parent dcbf71dd5d
commit decfc1ae2c
2 changed files with 3 additions and 3 deletions

View File

@ -532,7 +532,7 @@ func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
}
// Check if source volume was created with required image features for snaps
if !hasSnapshotFeature(rbdVol.ImageFeatures) {
if !rbdVol.hasSnapshotFeature() {
return nil, status.Errorf(codes.InvalidArgument, "volume(%s) has not snapshot feature(layering)", req.GetSourceVolumeId())
}