harikrishna-patnala commented on a change in pull request #548:
URL: https://github.com/apache/cloudstack-primate/pull/548#discussion_r465492758



##########
File path: src/views/infra/AddPrimaryStorage.vue
##########
@@ -475,8 +485,22 @@ export default {
           Object.keys(smbParams).forEach((key, index) => {
             params['details[' + index.toString() + '].' + key] = smbParams[key]
           })
-        } else if (values.protocol === 'PreSetup') {
+        } else if (values.protocol === 'PreSetup' && values.hypervisor !== 
'VMware') {
           url = this.presetupURL(server, path)
+        } else if (values.protocol === 'PreSetup' && values.hypervisor === 
'VMware') {
+          path = values.vCenterDataCenter
+          if (path.substring(0, 1) !== '/') {
+            path = '/' + path
+          }
+          path += '/' + values.vCenterDataStore
+          url = this.presetupURL('dummy', path)
+        } else if (values.protocol === 'datastorecluster' && values.hypervisor 
=== 'VMware') {
+          path = values.vCenterDataCenter
+          if (path.substring(0, 1) !== '/') {
+            path = '/' + path
+          }
+          path += '/' + values.vCenterDataStore
+          url = this.datastoreclusterURL('dummy', path)

Review comment:
       Same here, Please use variable 'server' instead of dummy value.

##########
File path: src/views/infra/AddPrimaryStorage.vue
##########
@@ -475,8 +485,22 @@ export default {
           Object.keys(smbParams).forEach((key, index) => {
             params['details[' + index.toString() + '].' + key] = smbParams[key]
           })
-        } else if (values.protocol === 'PreSetup') {
+        } else if (values.protocol === 'PreSetup' && values.hypervisor !== 
'VMware') {
           url = this.presetupURL(server, path)
+        } else if (values.protocol === 'PreSetup' && values.hypervisor === 
'VMware') {
+          path = values.vCenterDataCenter
+          if (path.substring(0, 1) !== '/') {
+            path = '/' + path
+          }
+          path += '/' + values.vCenterDataStore
+          url = this.presetupURL('dummy', path)

Review comment:
       Please use variable 'server' instead of dummy value. I think this is an 
existing code but let's change it now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to