Skip to content

Commit

Permalink
PWX-35451-pt2: NFS-proxy volumes fix (#2394)
Browse files Browse the repository at this point in the history
* adding `VolumeSpec.IsNFSProxyVolume()`

Signed-off-by: Zoran Rajic <[email protected]>
  • Loading branch information
zoxpx authored Dec 22, 2023
1 parent b9e36c3 commit 8e1460c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8e1460c

Please sign in to comment.