diff --git a/src/views/infra/AddPrimaryStorage.vue b/src/views/infra/AddPrimaryStorage.vue index 379b375a1..2191429e0 100644 --- a/src/views/infra/AddPrimaryStorage.vue +++ b/src/views/infra/AddPrimaryStorage.vue @@ -249,16 +249,41 @@
- - - - + + + {{ $t('label.powerflex.gateway') }} + + + + + - - + + + {{ $t('label.powerflex.gateway.username') }} + + + + + + + + + {{ $t('label.powerflex.gateway.password') }} + + + + + - - + + + {{ $t('label.powerflex.storage.pool') }} + + + + +
@@ -570,6 +595,11 @@ export default { } return url }, + powerflexURL (gateway, username, password, pool) { + var url = 'powerflex://' + encodeURIComponent(username) + ':' + encodeURIComponent(password) + '@' + + gateway + '/' + encodeURIComponent(pool) + return url + }, closeModal () { this.$parent.$parent.close() }, @@ -662,7 +692,7 @@ export default { url = this.iscsiURL(server, iqn, lun) } params.url = url - if (values.provider !== 'DefaultPrimary') { + if (values.provider !== 'DefaultPrimary' && values.provider !== 'PowerFlex') { if (values.managed) { params.managed = true } else { @@ -678,11 +708,17 @@ export default { params.url = values.url } } + + if (values.provider === 'PowerFlex') { + params.url = this.powerflexURL(values.powerflexGateway, values.powerflexGatewayUsername, + values.powerflexGatewayPassword, values.powerflexStoragePool) + } + if (this.selectedTags.length > 0) { params.tags = this.selectedTags.join() } this.loading = true - api('createStoragePool', params).then(json => { + api('createStoragePool', {}, 'POST', params).then(json => { this.$notification.success({ message: this.$t('label.add.primary.storage'), description: this.$t('label.add.primary.storage')