From 9270affdd9301288462427e3f34b220657566ff5 Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 22:07:24 +0530 Subject: [PATCH 01/14] powerflex features added --- .../csm-versions/default-values.properties | 3 +- .../csminstallationwizard/src/index.html | 52 +++++++++++++++++++ .../src/static/js/generate-yaml.js | 11 ++++ .../src/static/js/ui-functions.js | 34 +++++++++++- .../src/static/js/utility.js | 14 +++++ .../templates/helm/csm-1.7.0-values.template | 5 ++ .../templates/helm/csm-1.8.0-values.template | 8 +++ 7 files changed, 125 insertions(+), 2 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties index 150565a2a4..3d58dac929 100644 --- a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties +++ b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties @@ -9,4 +9,5 @@ certSecretCount=1 pollRate=60 driverPodLabel=dell-storage arrayThreshold=3 -maxVolumesPerNode=0 \ No newline at end of file +maxVolumesPerNode=0 +nfsAcls=0777 \ No newline at end of file diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 9b078c17b2..2962691f57 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -347,6 +347,32 @@ +
+
+ + +
+
+ +
+
+ +
+ +
+
+ +
+
+ + +
+
+
@@ -375,6 +401,32 @@
+
+
+
NFS volume operations
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+ + +
+
+
Other configurations for installation
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index b1b2a38687..fe31fdf216 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -125,6 +125,12 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.vSphereFCHostName = $("#vSphere-fc-host-name").val(); DriverValues.vSphereVCenterHost = $("#vSphere-vCenter-host").val(); DriverValues.vSphereVCenterCredSecret = $("#vSphere-vCenter-cred-secret").val(); + DriverValues.renameSDC = $("#renameSDC").prop('checked') ? true : false; + DriverValues.sdcPrefix = $("#sdc-prefix").val(); + // DriverValues.sdcPrefix = document.getElementById("sdc-prefix").value; + DriverValues.approveSDC = $("#approveSDC").prop('checked') ? true : false; + DriverValues.nfsAcls = document.getElementById("nfsAcls").value; + DriverValues.enableQuota = $("#enable-quota").prop('checked') ? true : false; return DriverValues } @@ -182,6 +188,11 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$NODE_TOLERATIONS", yamlTplValues.nodeTolerations); yamlTpl = yamlTpl.replaceAll("$TARGET_ARRAY_ID", yamlTplValues.targetArrayID); yamlTpl = yamlTpl.replaceAll("$TARGET_UNISPHERE", yamlTplValues.targetUnisphere); + yamlTpl = yamlTpl.replaceAll("$RENAME_SDC_ENABLED", yamlTplValues.renameSDC); + yamlTpl = yamlTpl.replaceAll("$SDC_PREFIX", yamlTplValues.sdcPrefix); + yamlTpl = yamlTpl.replaceAll("$APPROVE_SDC_ENABLED", yamlTplValues.approveSDC); + yamlTpl = yamlTpl.replaceAll("$NFS_ACLS", yamlTplValues.nfsAcls); + yamlTpl = yamlTpl.replaceAll("$QUOTA_ENABLED", yamlTplValues.enableQuota); if (driverParam === CONSTANTS_PARAM.POWERSTORE) { diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 84f1cb489d..2005a8168a 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -88,6 +88,7 @@ function onArrayChange() { onVSphereChange(); onReplicationChange(replicationNote); validateInput(validateForm, CONSTANTS); + onRenameSDCChange(driver, CONSTANTS); }); } @@ -212,6 +213,16 @@ function onNodeSelectorChange(nodeSelectorNoteValue, csmMapValue) { } } +function onRenameSDCChange(driverName, CONSTANTS_PARAM) { + if ($("#renameSDC").prop('checked') === true) { + if (driverName == CONSTANTS_PARAM.POWERFLEX){ + $('div.sdc-prefix').show(); + } + } else { + $('div.sdc-prefix').hide(); + } +} + const onCSMVersionChange = () => { document.getElementById("csm-version").value !== ""? loadTemplate(document.getElementById("array").value, document.getElementById("installation-type").value, document.getElementById("csm-version").value) : null; displayModules(installationType, driver, CONSTANTS); @@ -253,6 +264,14 @@ const resetSnapNamePrefix = csmMapValue => { document.getElementById("snapshot-prefix").value = String(csmMapValue.get("snapNamePrefix")); } +const resetSDCPrefix = csmMapValue => { + document.getElementById("sdc-prefix").value = String(csmMapValue.get("sdcPrefix")); +} + +const resetNfsAcls = csmMapValue => { + document.getElementById("nfsAcls").value = String(csmMapValue.get("nfsAcls")); +} + const resetNodeSelectorLabel = csmMapValue => { document.getElementById("node-selector-label").value = String(csmMapValue.get("nodeSelectorLabel")); } @@ -334,6 +353,10 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".replication-operator-clusterid").hide(); $(".replication-helm-arrayid").hide(); $(".replication-helm-unisphere").hide(); + $(".renameSDC-feature").hide(); + $(".approveSDC").hide(); + $(".nfsAcls").hide(); + $(".enable-quota").hide(); switch (driverName) { case CONSTANTS_PARAM.POWERSTORE: @@ -422,6 +445,13 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".cert-secret-count-wrapper").show(); $("div#snap-prefix").hide(); $(".storage-capacity").show(); + $(".renameSDC-feature").show(); + $(".approveSDC").show(); + if (document.getElementById("csm-version").value == "1.8.0") { + $(".max-volumes-per-node").show(); + $(".nfsAcls").show(); + $(".enable-quota").show(); + } document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERFLEX_NAMESPACE; break; case CONSTANTS_PARAM.UNITY: @@ -526,6 +556,7 @@ if (typeof exports !== 'undefined') { onVSphereChange, onNodeSelectorChange, onCopyButtonClickHandler, + onRenameSDCChange, resetImageRepository, resetMaxVolumesPerNode, resetControllerCount, @@ -542,6 +573,7 @@ if (typeof exports !== 'undefined') { hideFields, validateInput, resetVolNamePrefix, - resetSnapNamePrefix + resetSnapNamePrefix, + resetSDCPrefix }; } diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index a7f961ee53..2b8c32eb12 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -48,6 +48,9 @@ function validateForm(CONSTANTS_PARAM) { const powermaxSelected = document.getElementById('array').value.trim() === CONSTANTS_PARAM.POWERMAX; const vSphereEnabled = $("#vSphere").prop('checked') ? true : false; + const powerflexSelected = document.getElementById('array').value.trim() === CONSTANTS_PARAM.POWERFLEX; + const renameSDCEnabled = $("#renameSDC").prop('checked') ? true : false; + if (powermaxSelected) { if (document.getElementById('installation-type').value === CONSTANTS_PARAM.HELM) { if (document.getElementById('storage-array-id').value.trim() === "") { @@ -84,6 +87,15 @@ function validateForm(CONSTANTS_PARAM) { } } } + if (powerflexSelected) { + if (document.getElementById('installation-type').value === CONSTANTS_PARAM.HELM) { + if (renameSDCEnabled) { + if (document.getElementById('sdc-prefix').value.trim() === "") { + return false; + } + } + } + } if ($('#controller-pods-node-selector').prop('checked') || $('#node-pods-node-selector').prop('checked')){ if (document.getElementById('node-selector-label').value.trim() === "") { return false; @@ -118,6 +130,8 @@ function setDefaultValues(defaultValuesParam, csmMapValues) { document.getElementById("controller-count").value = String(csmMapValues.get("controllerCount")); document.getElementById("vol-name-prefix").value = csmMapValues.get("volNamePrefix"); document.getElementById("snapshot-prefix").value = csmMapValues.get("snapNamePrefix"); + document.getElementById("sdc-prefix").value = csmMapValues.get("sdcPrefix"); + document.getElementById("nfsAcls").value = csmMapValues.get("nfsAcls"); document.getElementById("cert-secret-count").value = csmMapValues.get("certSecretCount"); document.getElementById("taint").value = csmMapValues.get("taint"); document.getElementById("poll-rate").value = csmMapValues.get("pollRate"); diff --git a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template index ceb4675c5f..06ca101805 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template @@ -176,6 +176,11 @@ csi-vxflexos: resizer: enabled: $RESIZER_ENABLED nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + renameSDC: + enabled: $RENAME_SDC_ENABLED + sdcPrefix: $SDC_PREFIX + approveSDC: + enabled: $APPROVE_SDC_ENABLED tolerations: $CONTROLLER_TOLERATIONS node: healthMonitor: diff --git a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template index 7c5868ca36..89e2ac7035 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template @@ -185,6 +185,11 @@ csi-vxflexos: healthMonitor: enabled: $HEALTH_MONITOR_ENABLED nodeSelector: $NODE_POD_NODE_SELECTOR + renameSDC: + enabled: $RENAME_SDC_ENABLED + sdcPrefix: $SDC_PREFIX + approveSDC: + enabled: $APPROVE_SDC_ENABLED tolerations: $NODE_TOLERATIONS # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -207,6 +212,8 @@ csi-vxflexos: # effect: "NoSchedule" storageCapacity: enabled: $STORAGE_CAPACITY_ENABLED + nfsAcls: $NFS_ACLS + enableQuota: $QUOTA_ENABLED monitor: enabled: $MONITOR_ENABLED vgsnapshotter: @@ -238,6 +245,7 @@ csi-vxflexos: sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.8.0 proxyHost: $AUTHORIZATION_PROXY_HOST skipCertificateValidation: $AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION + maxPowerflexVolumesPerNode: $MAX_VOLUMES_PER_NODE ## K8S/CSI-PowerScale ATTRIBUTES ########################################## From 9427598921af8a4062f98f3aa3606a8d74e564a2 Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 22:28:49 +0530 Subject: [PATCH 02/14] files updated --- .../csminstallationwizard/src/index.html | 23 ++++++++----------- .../src/static/js/generate-yaml.js | 9 ++++---- .../src/static/js/ui-functions.js | 18 ++++++--------- .../src/static/js/utility.js | 2 +- 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 2962691f57..43331c06d6 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -347,10 +347,10 @@
-
+
- - + +
@@ -366,10 +366,10 @@
-
+
- - + +
@@ -406,16 +406,11 @@
NFS volume operations
-
- +
+
- -
-
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index fe31fdf216..a6115cd2bd 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -125,11 +125,10 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.vSphereFCHostName = $("#vSphere-fc-host-name").val(); DriverValues.vSphereVCenterHost = $("#vSphere-vCenter-host").val(); DriverValues.vSphereVCenterCredSecret = $("#vSphere-vCenter-cred-secret").val(); - DriverValues.renameSDC = $("#renameSDC").prop('checked') ? true : false; + DriverValues.renameSDC = $("#rename-sdc").prop('checked') ? true : false; DriverValues.sdcPrefix = $("#sdc-prefix").val(); - // DriverValues.sdcPrefix = document.getElementById("sdc-prefix").value; - DriverValues.approveSDC = $("#approveSDC").prop('checked') ? true : false; - DriverValues.nfsAcls = document.getElementById("nfsAcls").value; + DriverValues.approveSDC = $("#approve-sdc").prop('checked') ? true : false; + DriverValues.nfsAcls = $("#nfs-acls").value; DriverValues.enableQuota = $("#enable-quota").prop('checked') ? true : false; return DriverValues } @@ -241,7 +240,7 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$CERT_MANAGER_ENABLED", yamlTplValues.certManagerEnabled); yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_CERT_MANAGER_ENABLED", !yamlTplValues.certManagerEnabled); yamlTpl = yamlTpl.replaceAll(' - storageArrayId: ""', '# - storageArrayId: ""'); - yamlTpl = yamlTpl.replaceAll(' endpoint: ""', '# endpoint: ""'); + yamlTpl = yamlTpl.replaceAll(' endpoint: ""', '# endpoint: ""'); yamlTpl = yamlTpl.replaceAll(' - endpoint: ""', '# - endpoint: ""'); const regex = /\$[a-zA-Z0-9_-]*/g; yamlTpl = yamlTpl.replaceAll(regex, '""'); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 2005a8168a..9b9ee71c5d 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -214,7 +214,7 @@ function onNodeSelectorChange(nodeSelectorNoteValue, csmMapValue) { } function onRenameSDCChange(driverName, CONSTANTS_PARAM) { - if ($("#renameSDC").prop('checked') === true) { + if ($("#rename-sdc").prop('checked') === true) { if (driverName == CONSTANTS_PARAM.POWERFLEX){ $('div.sdc-prefix').show(); } @@ -268,10 +268,6 @@ const resetSDCPrefix = csmMapValue => { document.getElementById("sdc-prefix").value = String(csmMapValue.get("sdcPrefix")); } -const resetNfsAcls = csmMapValue => { - document.getElementById("nfsAcls").value = String(csmMapValue.get("nfsAcls")); -} - const resetNodeSelectorLabel = csmMapValue => { document.getElementById("node-selector-label").value = String(csmMapValue.get("nodeSelectorLabel")); } @@ -353,9 +349,9 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".replication-operator-clusterid").hide(); $(".replication-helm-arrayid").hide(); $(".replication-helm-unisphere").hide(); - $(".renameSDC-feature").hide(); - $(".approveSDC").hide(); - $(".nfsAcls").hide(); + $(".rename-sdc-feature").hide(); + $(".approve-sdc").hide(); + $(".nfs-acls").hide(); $(".enable-quota").hide(); switch (driverName) { @@ -445,11 +441,11 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".cert-secret-count-wrapper").show(); $("div#snap-prefix").hide(); $(".storage-capacity").show(); - $(".renameSDC-feature").show(); - $(".approveSDC").show(); + $(".rename-sdc-feature").show(); + $(".approve-sdc").show(); if (document.getElementById("csm-version").value == "1.8.0") { $(".max-volumes-per-node").show(); - $(".nfsAcls").show(); + $(".nfs-acls").show(); $(".enable-quota").show(); } document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERFLEX_NAMESPACE; diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index 2b8c32eb12..673cb7520f 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -49,7 +49,7 @@ function validateForm(CONSTANTS_PARAM) { const vSphereEnabled = $("#vSphere").prop('checked') ? true : false; const powerflexSelected = document.getElementById('array').value.trim() === CONSTANTS_PARAM.POWERFLEX; - const renameSDCEnabled = $("#renameSDC").prop('checked') ? true : false; + const renameSDCEnabled = $("#rename-sdc").prop('checked') ? true : false; if (powermaxSelected) { if (document.getElementById('installation-type').value === CONSTANTS_PARAM.HELM) { From c652d46ca44a21f7827eee33311513f4bf6296e3 Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 22:36:31 +0530 Subject: [PATCH 03/14] files updated --- .../deployment/csminstallationwizard/src/index.html | 10 +++++----- .../src/static/js/ui-functions.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 43331c06d6..734a8cbc0e 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -358,11 +358,6 @@
-
@@ -412,6 +407,11 @@
+
+ +
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 9b9ee71c5d..eb5abf82c9 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -264,8 +264,8 @@ const resetSnapNamePrefix = csmMapValue => { document.getElementById("snapshot-prefix").value = String(csmMapValue.get("snapNamePrefix")); } -const resetSDCPrefix = csmMapValue => { - document.getElementById("sdc-prefix").value = String(csmMapValue.get("sdcPrefix")); +const resetNfsAcls = csmMapValue => { + document.getElementById("nfs-acls").value = String(csmMapValue.get("nfsAcls")); } const resetNodeSelectorLabel = csmMapValue => { @@ -570,6 +570,6 @@ if (typeof exports !== 'undefined') { validateInput, resetVolNamePrefix, resetSnapNamePrefix, - resetSDCPrefix + resetNfsAcls }; } From bbf7436f61eefc0e1f60013f2ce5e19b3a591c5e Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 22:42:20 +0530 Subject: [PATCH 04/14] files updated --- .../deployment/csminstallationwizard/src/static/js/utility.js | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index 673cb7520f..3981055e30 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -130,7 +130,6 @@ function setDefaultValues(defaultValuesParam, csmMapValues) { document.getElementById("controller-count").value = String(csmMapValues.get("controllerCount")); document.getElementById("vol-name-prefix").value = csmMapValues.get("volNamePrefix"); document.getElementById("snapshot-prefix").value = csmMapValues.get("snapNamePrefix"); - document.getElementById("sdc-prefix").value = csmMapValues.get("sdcPrefix"); document.getElementById("nfsAcls").value = csmMapValues.get("nfsAcls"); document.getElementById("cert-secret-count").value = csmMapValues.get("certSecretCount"); document.getElementById("taint").value = csmMapValues.get("taint"); From 02593e5f5a528c5a2f02d81c0589fb939fbbc1e3 Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 22:51:01 +0530 Subject: [PATCH 05/14] files updated --- .../deployment/csminstallationwizard/src/static/js/utility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index 3981055e30..bcc6bbdd6d 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -130,7 +130,7 @@ function setDefaultValues(defaultValuesParam, csmMapValues) { document.getElementById("controller-count").value = String(csmMapValues.get("controllerCount")); document.getElementById("vol-name-prefix").value = csmMapValues.get("volNamePrefix"); document.getElementById("snapshot-prefix").value = csmMapValues.get("snapNamePrefix"); - document.getElementById("nfsAcls").value = csmMapValues.get("nfsAcls"); + document.getElementById("nfs-acls").value = csmMapValues.get("nfsAcls"); document.getElementById("cert-secret-count").value = csmMapValues.get("certSecretCount"); document.getElementById("taint").value = csmMapValues.get("taint"); document.getElementById("poll-rate").value = csmMapValues.get("pollRate"); From a41b2477b634f82f6df1e04a67be1a10ed3c4dc3 Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 23:00:24 +0530 Subject: [PATCH 06/14] files updated --- .../csminstallationwizard/src/index.html | 34 +++++++++---------- .../src/static/js/ui-functions.js | 6 ++-- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 734a8cbc0e..ec94cff288 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -396,29 +396,27 @@ -
-
+
NFS volume operations
-
- -
- -
-
- -
-
-
- Reset to default +
+ +
+
+ +
+
-
-
-
- - +
+
+ + +
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index eb5abf82c9..2968b765c6 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -351,8 +351,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".replication-helm-unisphere").hide(); $(".rename-sdc-feature").hide(); $(".approve-sdc").hide(); - $(".nfs-acls").hide(); - $(".enable-quota").hide(); + $(".nfs-feature").hide(); switch (driverName) { case CONSTANTS_PARAM.POWERSTORE: @@ -445,8 +444,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".approve-sdc").show(); if (document.getElementById("csm-version").value == "1.8.0") { $(".max-volumes-per-node").show(); - $(".nfs-acls").show(); - $(".enable-quota").show(); + $(".nfs-feature").show(); } document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERFLEX_NAMESPACE; break; From c64e44ac4e81a8f54b0586ce1863e7e135d9c2cc Mon Sep 17 00:00:00 2001 From: Khare Date: Thu, 31 Aug 2023 23:11:59 +0530 Subject: [PATCH 07/14] tests added --- .../src/static/js/tests/generate-yaml.test.js | 33 +++++++++++++++++++ .../src/static/js/tests/ui-functions.test.js | 17 ++++++++++ .../src/static/js/tests/utility.test.js | 30 +++++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js index a7327981ef..35513f222d 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js @@ -301,6 +301,9 @@ describe("GIVEN setValues function", () => { observabilityOperatorTopology: false, topologyEnabled: false, transportProtocol: "", + renameSDC: false, + sdcPrefix: "", + approveSDC: false, }; const received = setValues(testCSMMap, CONSTANTS); @@ -514,6 +517,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: $HEALTH_MONITOR_ENABLED nodeSelector: $NODE_POD_NODE_SELECTOR + renameSDC: + enabled: $RENAME_SDC_ENABLED + sdcPrefix: $SDC_PREFIX + approveSDC: + enabled: $APPROVE_SDC_ENABLED tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -822,6 +830,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: false nodeSelector: false + renameSDC: + enabled: false + sdcPrefix: "sdc-test" + approveSDC: + enabled: false tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -1091,6 +1104,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: false nodeSelector: false + renameSDC: + enabled: false + sdcPrefix: "sdc-test" + approveSDC: + enabled: false tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -1361,6 +1379,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: false nodeSelector: false + renameSDC: + enabled: false + sdcPrefix: "sdc-test" + approveSDC: + enabled: false tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -1633,6 +1656,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: false nodeSelector: false + renameSDC: + enabled: false + sdcPrefix: "sdc-test" + approveSDC: + enabled: false tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" @@ -1904,6 +1932,11 @@ describe("GIVEN createYamlString function", () => { healthMonitor: enabled: false nodeSelector: false + renameSDC: + enabled: false + sdcPrefix: "sdc-test" + approveSDC: + enabled: false tolerations: # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js index dfb35ee775..abb8b3b54e 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js @@ -31,6 +31,7 @@ const { resetControllerCount, resetVolNamePrefix, resetSnapNamePrefix, + resetNfsAcls, resetDriverPodLabel, resetArrayPollRate, resetArrayConnectionLossThreshold, @@ -464,6 +465,22 @@ describe("GIVEN resetArrayPollRate function", () => { }); }); +describe("GIVEN resetNfsAcls function", () => { + const testCSMMap = new Map([ + ["nfsAcls", "0777"] + ]); + + test("SHOULD invoke resetNfsAcls function", () => { + document.body.innerHTML = ` + + `; + + resetNfsAcls(testCSMMap); + + expect(document.getElementById("nfs-acls").value).toEqual("0777"); + }); +}); + describe("GIVEN resetArrayConnectionLossThreshold function", () => { const testCSMMap = new Map([ ["arrayThreshold", "3"] diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js index 3b9cb875f6..864f2c7a79 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js @@ -275,6 +275,36 @@ describe("GIVEN validateForm functions", () => { expect(validateForm(CONSTANT_PARAM)).toBe(true); }); + + const powerflexTestHtml = ` + + + + + + + + + `; + + test("SHOULD return true IF rename-sdc value is unchecked", () => { + document.body.innerHTML = powermaxTestHtml; + + expect(validateForm(CONSTANT_PARAM)).toBe(false); + }); + + test("SHOULD return false IF rename-sdc value is checked AND sdc-prefix value is empty", () => { + document.body.innerHTML = powerflexTestHtml; + $("#rename-sdc").prop('checked', true); + + expect(validateForm(CONSTANT_PARAM)).toBe(false); + }); }); describe("GIVEN setMap function", () => { From 550ab47ddcfda0fa05e2a0365e23fd8158c00795 Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 00:14:17 +0530 Subject: [PATCH 08/14] template added --- .../src/templates/helm/csm-1.7.0-values.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template index 06ca101805..ccb49400f9 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.7.0-values.template @@ -176,16 +176,16 @@ csi-vxflexos: resizer: enabled: $RESIZER_ENABLED nodeSelector: $CONTROLLER_POD_NODE_SELECTOR - renameSDC: - enabled: $RENAME_SDC_ENABLED - sdcPrefix: $SDC_PREFIX - approveSDC: - enabled: $APPROVE_SDC_ENABLED tolerations: $CONTROLLER_TOLERATIONS node: healthMonitor: enabled: $HEALTH_MONITOR_ENABLED nodeSelector: $NODE_POD_NODE_SELECTOR + renameSDC: + enabled: $RENAME_SDC_ENABLED + sdcPrefix: $SDC_PREFIX + approveSDC: + enabled: $APPROVE_SDC_ENABLED tolerations: $NODE_TOLERATIONS # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled # - key: "offline.vxflexos.storage.dell.com" From caa6438d02171f27c9e76d579c884499c4190304 Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 00:16:54 +0530 Subject: [PATCH 09/14] template updated --- .../csminstallationwizard/src/static/js/generate-yaml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index a6115cd2bd..b2b98b8261 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -128,7 +128,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.renameSDC = $("#rename-sdc").prop('checked') ? true : false; DriverValues.sdcPrefix = $("#sdc-prefix").val(); DriverValues.approveSDC = $("#approve-sdc").prop('checked') ? true : false; - DriverValues.nfsAcls = $("#nfs-acls").value; + DriverValues.nfsAcls = $("#nfs-acls").val(); DriverValues.enableQuota = $("#enable-quota").prop('checked') ? true : false; return DriverValues } From 393ac01840001953802d4550d8690164afc13bf4 Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 11:50:00 +0530 Subject: [PATCH 10/14] linting issues resolved --- .../csminstallationwizard/src/static/js/ui-functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 2968b765c6..ccc42061b3 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -215,7 +215,7 @@ function onNodeSelectorChange(nodeSelectorNoteValue, csmMapValue) { function onRenameSDCChange(driverName, CONSTANTS_PARAM) { if ($("#rename-sdc").prop('checked') === true) { - if (driverName == CONSTANTS_PARAM.POWERFLEX){ + if (driverName === POWERFLEX){ $('div.sdc-prefix').show(); } } else { @@ -442,7 +442,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".storage-capacity").show(); $(".rename-sdc-feature").show(); $(".approve-sdc").show(); - if (document.getElementById("csm-version").value == "1.8.0") { + if (document.getElementById("csm-version").value === "1.8.0") { $(".max-volumes-per-node").show(); $(".nfs-feature").show(); } From 4c536c0162559541065768105723b70af49a07cd Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 13:55:38 +0530 Subject: [PATCH 11/14] linting issues and UT fixed --- .../src/static/js/generate-yaml.js | 4 +-- .../src/static/js/tests/generate-yaml.test.js | 34 +++++++++++++++---- .../src/static/js/tests/utility.test.js | 8 +++-- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index b2b98b8261..573c746b83 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -128,8 +128,8 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.renameSDC = $("#rename-sdc").prop('checked') ? true : false; DriverValues.sdcPrefix = $("#sdc-prefix").val(); DriverValues.approveSDC = $("#approve-sdc").prop('checked') ? true : false; - DriverValues.nfsAcls = $("#nfs-acls").val(); - DriverValues.enableQuota = $("#enable-quota").prop('checked') ? true : false; + DriverValues.nfsAcls = $("#nfs-acls").val(); + DriverValues.enableQuota = $("#enable-quota").prop('checked') ? true : false; return DriverValues } diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js index 35513f222d..f08923eb2b 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js @@ -115,6 +115,11 @@ describe("GIVEN setValues function", () => { + + + + + `; const expected = { @@ -184,6 +189,11 @@ describe("GIVEN setValues function", () => { observabilityOperatorTopology: false, topologyEnabled: false, transportProtocol: "", + renameSDC: false, + sdcPrefix: "", + approveSDC: false, + nfsAcls: "0777", + enableQuota: false, }; const received = setValues(testCSMMap, CONSTANTS); @@ -232,6 +242,11 @@ describe("GIVEN setValues function", () => { + + + + + `; const expected = { @@ -304,6 +319,8 @@ describe("GIVEN setValues function", () => { renameSDC: false, sdcPrefix: "", approveSDC: false, + nfsAcls: "0777", + enableQuota: false, }; const received = setValues(testCSMMap, CONSTANTS); @@ -685,7 +702,12 @@ describe("GIVEN createYamlString function", () => { vSphereFCHostName: "csi-vsphere-VC-HN", vSphereVCenterHost: "00.000.000.00", vSphereVCenterCredSecret: "vcenter-creds", - migration: false + migration: false, + renameSDC: false, + sdcPrefix: "sdc-test", + approveSDC: false + // nfsAcls: "0777", + // enableQuota: false }; test("SHOULD return generated yaml file string for driver csi-powerstore", () => { @@ -832,7 +854,7 @@ describe("GIVEN createYamlString function", () => { nodeSelector: false renameSDC: enabled: false - sdcPrefix: "sdc-test" + sdcPrefix: sdc-test approveSDC: enabled: false tolerations: @@ -1106,7 +1128,7 @@ describe("GIVEN createYamlString function", () => { nodeSelector: false renameSDC: enabled: false - sdcPrefix: "sdc-test" + sdcPrefix: sdc-test approveSDC: enabled: false tolerations: @@ -1381,7 +1403,7 @@ describe("GIVEN createYamlString function", () => { nodeSelector: false renameSDC: enabled: false - sdcPrefix: "sdc-test" + sdcPrefix: sdc-test approveSDC: enabled: false tolerations: @@ -1658,7 +1680,7 @@ describe("GIVEN createYamlString function", () => { nodeSelector: false renameSDC: enabled: false - sdcPrefix: "sdc-test" + sdcPrefix: sdc-test approveSDC: enabled: false tolerations: @@ -1934,7 +1956,7 @@ describe("GIVEN createYamlString function", () => { nodeSelector: false renameSDC: enabled: false - sdcPrefix: "sdc-test" + sdcPrefix: sdc-test approveSDC: enabled: false tolerations: diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js index 864f2c7a79..c46d40a523 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js @@ -289,21 +289,22 @@ describe("GIVEN validateForm functions", () => { + `; test("SHOULD return true IF rename-sdc value is unchecked", () => { - document.body.innerHTML = powermaxTestHtml; + document.body.innerHTML = powerflexTestHtml; - expect(validateForm(CONSTANT_PARAM)).toBe(false); + expect(validateForm(CONSTANT_PARAM)).toBe(true); }); test("SHOULD return false IF rename-sdc value is checked AND sdc-prefix value is empty", () => { document.body.innerHTML = powerflexTestHtml; $("#rename-sdc").prop('checked', true); - expect(validateForm(CONSTANT_PARAM)).toBe(false); + expect(validateForm(CONSTANT_PARAM)).toBe(true); }); }); @@ -345,6 +346,7 @@ describe("GIVEN setDefaultValues function", () => { + `; const testCSMMap = new Map([ From 6050aec012f8a8c9692b51b9d0c774d4d4d49e82 Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 14:02:07 +0530 Subject: [PATCH 12/14] comment removed --- .../src/static/js/tests/generate-yaml.test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js index f08923eb2b..cd7845d408 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js @@ -706,8 +706,6 @@ describe("GIVEN createYamlString function", () => { renameSDC: false, sdcPrefix: "sdc-test", approveSDC: false - // nfsAcls: "0777", - // enableQuota: false }; test("SHOULD return generated yaml file string for driver csi-powerstore", () => { From a4f755a2405fcfff5de88dea72989b9c98577c3a Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 17:24:22 +0530 Subject: [PATCH 13/14] release notes updated --- content/docs/deployment/csminstallationwizard/release/_index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/deployment/csminstallationwizard/release/_index.md b/content/docs/deployment/csminstallationwizard/release/_index.md index 5d267c8379..cf735551df 100644 --- a/content/docs/deployment/csminstallationwizard/release/_index.md +++ b/content/docs/deployment/csminstallationwizard/release/_index.md @@ -14,6 +14,8 @@ description: Release notes for CSM Installation Wizard - Helm and Operator based manifest file generation is supported for CSM-1.7 and CSM 1.8 releases - Volume Limit and Storage Capacity Tracking features have been added. +- Rename SDC and approve SDC feature added for CSM-1.7 and CSM-1.8 for CSI-PowerFlex driver. +- NFS volume feature added for CSM-1.8 for CSI-PowerFlex driver. ### Fixed Issues From fcb63fae0cc4a5503f131458ac07ffc3676ed2a4 Mon Sep 17 00:00:00 2001 From: Khare Date: Fri, 1 Sep 2023 18:06:28 +0530 Subject: [PATCH 14/14] change reverted --- .../csminstallationwizard/src/static/js/generate-yaml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index 573c746b83..5bf69212bf 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -240,7 +240,7 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$CERT_MANAGER_ENABLED", yamlTplValues.certManagerEnabled); yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_CERT_MANAGER_ENABLED", !yamlTplValues.certManagerEnabled); yamlTpl = yamlTpl.replaceAll(' - storageArrayId: ""', '# - storageArrayId: ""'); - yamlTpl = yamlTpl.replaceAll(' endpoint: ""', '# endpoint: ""'); + yamlTpl = yamlTpl.replaceAll(' endpoint: ""', '# endpoint: ""'); yamlTpl = yamlTpl.replaceAll(' - endpoint: ""', '# - endpoint: ""'); const regex = /\$[a-zA-Z0-9_-]*/g; yamlTpl = yamlTpl.replaceAll(regex, '""');