From 6262366d85efb4a9adb01bc89926149d696b209b Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 22 Mar 2021 12:13:21 +0530 Subject: [PATCH] ui: Fix add primary store during Zone Deployment for PreSetup protocol (#4845) Co-authored-by: Pearl Dsilva --- ui/src/views/infra/zone/ZoneWizardAddResources.vue | 2 +- ui/src/views/infra/zone/ZoneWizardLaunchZone.vue | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/src/views/infra/zone/ZoneWizardAddResources.vue b/ui/src/views/infra/zone/ZoneWizardAddResources.vue index ba8cf207f09..4ba878ef7d5 100644 --- a/ui/src/views/infra/zone/ZoneWizardAddResources.vue +++ b/ui/src/views/infra/zone/ZoneWizardAddResources.vue @@ -351,7 +351,7 @@ export default { } }, { - title: 'label.SR.name', + title: 'label.sr.name', key: 'primaryStorageSRLabel', placeHolder: 'message.error.sr.namelabel', required: true, diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue index 49b91032d0d..d456827d8a1 100644 --- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue +++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue @@ -1283,7 +1283,7 @@ export default { } } - const server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null + var server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null let url = '' const protocol = this.prefillContent.primaryStorageProtocol.value @@ -1303,7 +1303,13 @@ export default { params['details[0].password'] = this.prefillContent.primaryStorageSMBPassword.value params['details[0].domain'] = this.prefillContent.primaryStorageSMBDomain.value } else if (protocol === 'PreSetup') { - let path = this.prefillContent.primaryStoragePath.value + let path = '' + if (this.stepData.clusterReturned.hypervisortype === 'XenServer') { + path = this.prefillContent.primaryStorageSRLabel.value + server = 'localhost' + } else { + path = this.prefillContent.primaryStoragePath.value + } if (path.substring(0, 1) !== '/') { path = '/' + path }