Skip to content

Commit 9ef7355

Browse files
DK101010DK101010
andauthored
ui: show datastore cluster option in vmware zone deployment (apache#5522)
Co-authored-by: DK101010 <dirk.klahre@itelligence.de>
1 parent 37d2264 commit 9ef7355

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

ui/src/views/infra/zone/ZoneWizardAddResources.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ export default {
477477
placeHolder: 'message.error.vcenter.datacenter',
478478
required: true,
479479
display: {
480-
primaryStorageProtocol: 'vmfs'
480+
primaryStorageProtocol: ['vmfs', 'datastorecluster']
481481
}
482482
},
483483
{
@@ -486,7 +486,7 @@ export default {
486486
placeHolder: 'message.error.vcenter.datastore',
487487
required: true,
488488
display: {
489-
primaryStorageProtocol: 'vmfs'
489+
primaryStorageProtocol: ['vmfs', 'datastorecluster']
490490
}
491491
},
492492
{
@@ -861,6 +861,10 @@ export default {
861861
id: 'vmfs',
862862
description: 'vmfs'
863863
})
864+
protocols.push({
865+
id: 'datastorecluster',
866+
description: 'datastorecluster'
867+
})
864868
} else if (hypervisor === 'Hyperv') {
865869
protocols.push({
866870
id: 'SMB',

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,16 +1338,21 @@ export default {
13381338
const rbdid = this.prefillContent.primaryStorageRADOSUser?.value || ''
13391339
const rbdsecret = this.prefillContent.primaryStorageRADOSSecret?.value || ''
13401340
url = this.rbdURL(rbdmonitor, rbdpool, rbdid, rbdsecret)
1341-
} else if (protocol === 'vmfs') {
1342-
let path = this.prefillContent.primaryStorageVmfsDatacenter?.value || ''
1343-
if (path.substring(0, 1) !== '/') {
1344-
path = '/' + path
1345-
}
1346-
path += '/' + this.prefillContent.primaryStorageVmfsDatastore?.value || ''
1347-
url = this.vmfsURL('dummy', path)
13481341
} else if (protocol === 'Linstor') {
13491342
url = this.linstorURL(server)
13501343
params['details[0].resourceGroup'] = this.prefillContent.primaryStorageLinstorResourceGroup.value
1344+
} else if (protocol === 'vmfs' || protocol === 'datastorecluster') {
1345+
let path = this.prefillContent.primaryStorageVmfsDatacenter.value
1346+
if (path.substring(0, 1) !== '/') {
1347+
path = '/' + path
1348+
}
1349+
path += '/' + this.prefillContent.primaryStorageVmfsDatastore.value
1350+
if (protocol === 'vmfs') {
1351+
url = this.vmfsURL('dummy', path)
1352+
}
1353+
if (protocol === 'datastorecluster') {
1354+
url = this.datastoreclusterURL('dummy', path)
1355+
}
13511356
} else {
13521357
let iqn = this.prefillContent.primaryStorageTargetIQN?.value || ''
13531358
if (iqn.substring(0, 1) !== '/') {
@@ -2137,6 +2142,15 @@ export default {
21372142
}
21382143
return url
21392144
},
2145+
datastoreclusterURL (server, path) {
2146+
var url
2147+
if (server.indexOf('://') === -1) {
2148+
url = 'datastorecluster://' + server + path
2149+
} else {
2150+
url = server + path
2151+
}
2152+
return url
2153+
},
21402154
iscsiURL (server, iqn, lun) {
21412155
let url = ''
21422156
if (server.indexOf('://') === -1) {

0 commit comments

Comments
 (0)