From 6f4fe77d26571b156b61b52efb904a08dafdacbd Mon Sep 17 00:00:00 2001 From: Eoin Bailey Date: Fri, 14 Aug 2020 15:59:22 +0100 Subject: [PATCH] Fix read only cache policy --- src/terraform/providers/terraform-provider-avere/README.md | 2 +- src/terraform/providers/terraform-provider-avere/averevfxt.go | 4 ++-- src/terraform/providers/terraform-provider-avere/constants.go | 4 ++-- .../providers/terraform-provider-avere/resource_vfxt.go | 2 +- .../providers/terraform-provider-avere/restore_backup.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/terraform/providers/terraform-provider-avere/README.md b/src/terraform/providers/terraform-provider-avere/README.md index e716ef9a8..c55e60206 100644 --- a/src/terraform/providers/terraform-provider-avere/README.md +++ b/src/terraform/providers/terraform-provider-avere/README.md @@ -138,7 +138,7 @@ A `core_filer` block supports the following: | "Full Caching" | Use this cache policy with cloud core filers or to optimize for op reduction to the core filer. | | "Isolated Cloud Workstation" | useful for vdi workstations reading and writing to separate locations as described in [Cloud Workstations](../../examples/vfxt/cloudworkstation) | | "Collaborating Cloud Workstation" | useful for vdi workstations reading and writing to the same content as described in [Cloud Workstations](../../examples/vfxt/cloudworkstation) | - | "Read Only High Write Back Delay" | Use this for read heavy content, where changes in the data are infrequent. | + | "Read Only High Verification Time" | Use this for read heavy data, where changes in the data are infrequent. | * [custom_settings](#custom_settings_2) - (Optional) - these are custom settings provided by Avere support to match advanced use case scenarios. They are a list of strings of the form "SETTINGNAME CHECKCODE VALUE". Do not prefix with the mass name as it is automatically detected. * [junction](#junction) - (Required) this specifies the junction block as described below. diff --git a/src/terraform/providers/terraform-provider-avere/averevfxt.go b/src/terraform/providers/terraform-provider-avere/averevfxt.go index 6786e88bb..e15e1bc07 100644 --- a/src/terraform/providers/terraform-provider-avere/averevfxt.go +++ b/src/terraform/providers/terraform-provider-avere/averevfxt.go @@ -592,8 +592,8 @@ func (a *AvereVfxt) EnsureCachePolicy(corefiler *CoreFiler) error { return a.EnsureCachePolicyExists(CachePolicyIsolatedCloudWorkstation, CacheModeReadWrite, CachePolicyIsolatedCloudWorkstationCheckAttributes, WriteBackDelayDefault) case CachePolicyCollaboratingCloudWorkstation: return a.EnsureCachePolicyExists(CachePolicyCollaboratingCloudWorkstation, CacheModeReadWrite, CachePolicyCollaboratingCloudWorkstationCheckAttributes, WriteBackDelayDefault) - case CachePolicyReadOnlyHighWriteBackDelay: - return a.EnsureCachePolicyExists(CachePolicyReadOnlyHighWriteBackDelay, CacheModeReadOnly, "", CachePolicyReadOnlyHighWriteBackDelayValue) + case CachePolicyReadOnlyHighVerificationTime: + return a.EnsureCachePolicyExists(CachePolicyReadOnlyHighVerificationTime, CacheModeReadOnly, CachePolicyReadOnlyHighVerificationTimeCheckAttributes, 0) default: return fmt.Errorf("Error: core filer '%s' specifies unknown cache policy '%s'", corefiler.Name, corefiler.CachePolicy) } diff --git a/src/terraform/providers/terraform-provider-avere/constants.go b/src/terraform/providers/terraform-provider-avere/constants.go index 95547a64b..ff403f897 100644 --- a/src/terraform/providers/terraform-provider-avere/constants.go +++ b/src/terraform/providers/terraform-provider-avere/constants.go @@ -31,11 +31,11 @@ const ( CachePolicyTransitioningClients = "Transitioning Clients Before or After a Migration" CachePolicyIsolatedCloudWorkstation = "Isolated Cloud Workstation" CachePolicyCollaboratingCloudWorkstation = "Collaborating Cloud Workstation" - CachePolicyReadOnlyHighWriteBackDelay = "Read Only High Write Back Delay" + CachePolicyReadOnlyHighVerificationTime = "Read Only High Verification Time" CachePolicyIsolatedCloudWorkstationCheckAttributes = "{}" CachePolicyCollaboratingCloudWorkstationCheckAttributes = "{'checkAttrPeriod':30,'checkDirAttrPeriod':30}" - CachePolicyReadOnlyHighWriteBackDelayValue = 10800 + CachePolicyReadOnlyHighVerificationTimeCheckAttributes = "{'checkAttrPeriod':10800,'checkDirAttrPeriod':10800}" CacheModeReadWrite = "read-write" CacheModeReadOnly = "read" diff --git a/src/terraform/providers/terraform-provider-avere/resource_vfxt.go b/src/terraform/providers/terraform-provider-avere/resource_vfxt.go index afb8e95ec..bc53a6eaa 100644 --- a/src/terraform/providers/terraform-provider-avere/resource_vfxt.go +++ b/src/terraform/providers/terraform-provider-avere/resource_vfxt.go @@ -265,7 +265,7 @@ func resourceVfxt() *schema.Resource { CachePolicyTransitioningClients, CachePolicyIsolatedCloudWorkstation, CachePolicyCollaboratingCloudWorkstation, - CachePolicyReadOnlyHighWriteBackDelay, + CachePolicyReadOnlyHighVerificationTime, }, false), }, custom_settings: { diff --git a/src/terraform/providers/terraform-provider-avere/restore_backup.go b/src/terraform/providers/terraform-provider-avere/restore_backup.go index 26401f5d5..919f6fdb1 100644 --- a/src/terraform/providers/terraform-provider-avere/restore_backup.go +++ b/src/terraform/providers/terraform-provider-avere/restore_backup.go @@ -97,7 +97,7 @@ func getUsageModel(cachePolicy string) string { case CachePolicyClientsBypass, CachePolicyIsolatedCloudWorkstation, CachePolicyCollaboratingCloudWorkstation, CachePolicyTransitioningClients: return UsageModelWriteAround - case CachePolicyReadCaching, CachePolicyReadOnlyHighWriteBackDelay: + case CachePolicyReadCaching, CachePolicyReadOnlyHighVerificationTime: return UsageModelReadHeavyInfreq case CachePolicyReadWriteCaching, CachePolicyFullCaching: