in src/terraform/providers/terraform-provider-avere/averevfxt.go [890:915]
func (a *AvereVfxt) EnsureCachePolicy(corefiler *CoreFiler) error {
switch corefiler.CachePolicy {
case CachePolicyClientsBypass:
return nil
case CachePolicyReadCaching:
return nil
case CachePolicyReadWriteCaching:
return nil
case CachePolicyFullCaching:
return nil
case CachePolicyTransitioningClients:
return nil
case CachePolicyIsolatedCloudWorkstation:
return a.EnsureCachePolicyExists(CachePolicyIsolatedCloudWorkstation, CacheModeReadWrite, CachePolicyIsolatedCloudWorkstationCheckAttributes, WriteBackDelayDefault)
case CachePolicyCollaboratingCloudWorkstation:
return a.EnsureCachePolicyExists(CachePolicyCollaboratingCloudWorkstation, CacheModeReadWrite, CachePolicyCollaboratingCloudWorkstationCheckAttributes, WriteBackDelayDefault)
case CachePolicyReadOnlyHighVerificationTime:
return a.EnsureCachePolicyExists(CachePolicyReadOnlyHighVerificationTime, CacheModeReadOnly, CachePolicyReadOnlyHighVerificationTimeCheckAttributes, 0)
default:
if cachePolicyClientsBypassCustom, timeout := isCachePolicyClientsBypassCustom(corefiler.CachePolicy); cachePolicyClientsBypassCustom {
return a.EnsureCachePolicyExists(corefiler.CachePolicy, CacheModeReadOnly, getCachePolicyClientsBypassCustomCheckAttributes(timeout), 0)
} else {
return fmt.Errorf("Error: core filer '%s' specifies unknown cache policy '%s'", corefiler.Name, corefiler.CachePolicy)
}
}
}