diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index 6f21a51305b..43e8407fe9c 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -1770,6 +1770,7 @@
"label.public.ips": "Public IP addresses",
"label.public.lb": "Public LB",
"label.public.traffic": "Public traffic",
+"label.public.traffic.netris": "Netris Public traffic",
"label.public.traffic.nsx": "NSX Public traffic",
"label.publicinterface": "Public interface",
"label.publicip": "IP address",
@@ -2233,6 +2234,7 @@
"label.systemvm": "System VM",
"label.systemvmtype": "System VM type",
"label.tag": "Tag",
+"label.tag.netris": "netris",
"label.tag.nsx": "nsx",
"label.tag.key": "Tag key",
"label.tag.systemvm": "systemvm",
diff --git a/ui/src/views/infra/zone/IpAddressRangeForm.vue b/ui/src/views/infra/zone/IpAddressRangeForm.vue
index c39534d7b93..04d7ad4152f 100644
--- a/ui/src/views/infra/zone/IpAddressRangeForm.vue
+++ b/ui/src/views/infra/zone/IpAddressRangeForm.vue
@@ -34,12 +34,13 @@
{{ record.gateway }}
{{ $t('label.tag.nsx') }}
- {{ $t('label.tag.systemvm') }}
+ {{ $t('label.tag.netris') }}
+ {{ $t('label.tag.systemvm') }}
@@ -175,6 +176,14 @@ export default {
isNsxZone: {
type: Boolean,
default: false
+ },
+ forNetris: {
+ type: Boolean,
+ default: false
+ },
+ isNetrisZone: {
+ type: Boolean,
+ default: false
}
},
data () {
@@ -271,7 +280,8 @@ export default {
startIp: values.startIp,
endIp: values.endIp,
fornsx: this.forNsx,
- forsystemvms: this.isNsxZone && !this.forNsx
+ fornetris: this.forNetris,
+ forsystemvms: (this.isNsxZone && !this.forNsx) || (this.isNetrisZone && !this.forNetris)
})
this.formRef.value.resetFields()
}).catch(error => {
diff --git a/ui/src/views/infra/zone/ZoneWizard.vue b/ui/src/views/infra/zone/ZoneWizard.vue
index 9211aed92a5..a580da9ba36 100644
--- a/ui/src/views/infra/zone/ZoneWizard.vue
+++ b/ui/src/views/infra/zone/ZoneWizard.vue
@@ -139,7 +139,7 @@ export default {
{
name: 'network',
title: 'label.network',
- step: ['physicalNetwork', 'nsx', 'tungsten', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic', 'nsxPublicTraffic'],
+ step: ['physicalNetwork', 'nsx', 'netris', 'tungsten', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic', 'nsxPublicTraffic', 'netrisPublixTraffic'],
description: this.$t('message.network.description'),
hint: this.$t('message.network.hint')
},
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index e562fb33d72..91b884072a7 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -125,6 +125,7 @@ export default {
launching: 'message.please.wait.while.zone.is.being.created'
},
nsx: false,
+ netris: false,
isLaunchZone: false,
processStatus: null,
messageError: '',
@@ -218,6 +219,7 @@ export default {
const index = this.steps.findIndex(step => step.index === this.currentStep)
this.steps[index].status = status
this.nsx = false
+ this.netris = false
},
handleBack (e) {
this.$emit('backPressed')
@@ -487,7 +489,10 @@ export default {
if (physicalNetwork.isolationMethod === 'NSX' &&
physicalNetwork.traffics.findIndex(traffic => traffic.type === 'public' || traffic.type === 'guest') > -1) {
this.stepData.isNsxZone = true
- this.stepData.tungstenPhysicalNetworkId = physicalNetworkReturned.id
+ }
+ if (physicalNetwork.isolationMethod === 'NETRIS' &&
+ physicalNetwork.traffics.findIndex(traffic => traffic.type === 'public' || traffic.type === 'guest') > -1) {
+ this.stepData.isNetrisZone = true
}
} else {
this.stepData.physicalNetworkReturned = this.stepData.physicalNetworkItem['createPhysicalNetwork' + index]
@@ -909,6 +914,8 @@ export default {
this.addStep(message, trafficType)
if (trafficType === 'nsxPublicTraffic') {
this.nsx = false
+ } else if (trafficType === 'netrisPublicTraffic') {
+ this.netris = false
}
let stopNow = false
@@ -937,7 +944,7 @@ export default {
params.zoneId = this.stepData.zoneReturned.id
if (publicVlanIpRange.vlan && publicVlanIpRange.vlan.length > 0) {
params.vlan = publicVlanIpRange.vlan
- } else if (publicVlanIpRange.fornsx) {
+ } else if (publicVlanIpRange.fornsx) { // TODO: should this be the same for Netris?
params.vlan = null
} else {
params.vlan = 'untagged'
@@ -987,6 +994,8 @@ export default {
await this.stepCreateTungstenFabricPublicNetwork()
} else if (this.stepData.isNsxZone) {
await this.stepAddNsxController()
+ } else if (this.stepData.isNetrisZone) {
+ await this.stepAddNetrisController()
} else {
await this.stepConfigureStorageTraffic()
}
@@ -1090,6 +1099,35 @@ export default {
this.setStepStatus(STATUS_FAILED)
}
},
+ async stepAddNetrisController () {
+ this.setStepStatus(STATUS_FINISH)
+ this.currentStep++
+ this.addStep('message.add.netris.controller', 'netris')
+ if (this.stepData.stepMove.includes('netris')) {
+ await this.stepConfigureStorageTraffic()
+ return
+ }
+ try {
+ if (!this.stepData.stepMove.includes('addNetrisProvider')) {
+ const providerParams = {}
+ providerParams.name = this.prefillContent?.netrisName || ''
+ providerParams.netrisproviderhostname = this.prefillContent?.netrisHostname || ''
+ providerParams.netrisproviderport = this.prefillContent?.netrisPort || ''
+ providerParams.username = this.prefillContent?.username || ''
+ providerParams.password = this.prefillContent?.password || ''
+ providerParams.zoneid = this.stepData.zoneReturned.id
+
+ await this.addNetrisProvider(providerParams)
+ this.stepData.stepMove.push('addNetrisController')
+ }
+ this.stepData.stepMove.push('netris')
+ await this.stepConfigureStorageTraffic()
+ } catch (e) {
+ this.messageError = e
+ this.processStatus = STATUS_FAILED
+ this.setStepStatus(STATUS_FAILED)
+ }
+ },
async stepConfigureStorageTraffic () {
let targetNetwork = false
this.prefillContent.physicalNetworks.forEach(physicalNetwork => {
@@ -2247,6 +2285,16 @@ export default {
})
})
},
+ addNetrisPovider (args) {
+ return new Promise((resolve, reject) => {
+ api('addNetrisProvider', {}, 'POST', args).then(json => {
+ resolve()
+ }).catch(error => {
+ const message = error.response.headers['x-description']
+ reject(message)
+ })
+ })
+ },
configTungstenFabricService (args) {
return new Promise((resolve, reject) => {
api('configTungstenFabricService', {}, 'POST', args).then(json => {
diff --git a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue
index dc1ec709fb1..79d50495576 100644
--- a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue
+++ b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue
@@ -51,7 +51,7 @@
:isFixError="isFixError"
/>
network.isolationMethod === 'NETRIS')
+ const netrisIdx = this.prefillContent.physicalNetworks.findIndex(network => network.isolationMethod === 'Netris')
isNetris = netrisIdx > -1
}
return isNetris
@@ -277,11 +280,18 @@ export default {
trafficType: 'public'
})
}
+ if (this.isNetrisZone) {
+ steps.push({
+ title: 'label.public.traffic.netris',
+ formKey: 'netrisPublicTraffic',
+ trafficType: 'public'
+ })
+ }
steps.push({
title: 'label.pod',
formKey: 'pod'
})
- if (!this.isTungstenZone && !this.isNsxZone) {
+ if (!this.isTungstenZone && !this.isNsxZone && !this.isNetrisZone) {
steps.push({
title: 'label.guest.traffic',
formKey: 'guestTraffic',
@@ -296,6 +306,15 @@ export default {
return steps
},
+ providersDetails () {
+ console.log(this.currentStep)
+ return {
+ forNsx: this.steps[this.currentStep].formKey === 'nsxPublicTraffic',
+ isNsxZone: this.isNsxZone,
+ forNetris: this.steps[this.currentStep].formKey === 'netrisPublicTraffic',
+ isNetrisZone: this.isNetrisZone
+ }
+ },
stepScales () {
if (!this.isMobile() && this.steps.length > 4) {
return { width: 'calc(100% / ' + this.steps.length + ')' }
@@ -622,7 +641,7 @@ export default {
}
this.scrollToStepActive()
if (this.zoneType === 'Basic' ||
- (this.zoneType === 'Advanced' && (this.sgEnabled || this.isNsxZone))) {
+ (this.zoneType === 'Advanced' && (this.sgEnabled || this.isNsxZone || this.isNetrisZone))) {
this.skipGuestTrafficStep = false
} else {
this.fetchConfiguration()