From 4cabfae6bb158cd70fc7d073adcfcb4d9746222a Mon Sep 17 00:00:00 2001 From: Zoran Rajic Date: Wed, 20 Dec 2023 11:10:59 -0800 Subject: [PATCH] PWX-35451-pt2: NFS-proxy volumes fix * adding `VolumeSpec.IsNFSProxyVolume()` Signed-off-by: Zoran Rajic --- api/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/api.go b/api/api.go index 202bff52e..3a5443f79 100644 --- a/api/api.go +++ b/api/api.go @@ -1324,6 +1324,11 @@ func (v *VolumeSpec) IsPureBlockVolume() bool { return v.GetProxySpec() != nil && v.GetProxySpec().IsPureBlockBackend() } +// IsNFSProxyVolume returns true if this is a nfs reflection volume +func (v *VolumeSpec) IsNFSProxyVolume() bool { + return v.GetProxySpec() != nil && v.GetProxySpec().NfsSpec != nil +} + // GetCloneCreatorOwnership returns the appropriate ownership for the // new snapshot and if an update is required func (v *VolumeSpec) GetCloneCreatorOwnership(ctx context.Context) (*Ownership, bool) {