mirror of https://github.com/apache/cloudstack.git
Merge pull request #2 from shapeblue/ph2-zone-creation-wizard
Add Netris Provider to the zone creation wizard
This commit is contained in:
commit
adb60b211f
|
|
@ -1484,6 +1484,13 @@
|
|||
"label.nat": "BigSwitch BCF NAT enabled",
|
||||
"label.ncc": "NCC",
|
||||
"label.netmask": "Netmask",
|
||||
"label.netris": "Netris",
|
||||
"label.netris.provider": "Netris Provider",
|
||||
"label.netris.provider.name": "Netris provider name",
|
||||
"label.netris.provider.hostname": "Netris provider hostname",
|
||||
"label.netris.provider.port": "Netris provider port",
|
||||
"label.netris.provider.username": "Netris provider username",
|
||||
"label.netris.provider.password": "Netris provider password",
|
||||
"label.netscaler": "NetScaler",
|
||||
"label.netscaler.mpx": "NetScaler MPX LoadBalancer",
|
||||
"label.netscaler.sdx": "NetScaler SDX LoadBalancer",
|
||||
|
|
@ -1763,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",
|
||||
|
|
@ -2226,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",
|
||||
|
|
@ -3190,6 +3199,7 @@
|
|||
"message.import.volume": "Please specify the domain, account or project name. <br>If not set, the volume will be imported for the caller.",
|
||||
"message.info.cloudian.console": "Cloudian Management Console should open in another window.",
|
||||
"message.installwizard.cloudstack.helptext.website": " * Project website:\t ",
|
||||
"message.infra.setup.netris.description": "This zone must contain a Netris provider because the isolation method is Netris",
|
||||
"message.infra.setup.nsx.description": "This zone must contain an NSX provider because the isolation method is NSX",
|
||||
"message.infra.setup.tungsten.description": "This zone must contain a Tungsten-Fabric provider because the isolation method is TF",
|
||||
"message.installwizard.cloudstack.helptext.document": " * Documentation:\t ",
|
||||
|
|
@ -3207,6 +3217,10 @@
|
|||
"message.installwizard.tooltip.configureguesttraffic.guestgateway": "The gateway that the guests should use.",
|
||||
"message.installwizard.tooltip.configureguesttraffic.guestnetmask": "The netmask in use on the subnet that the guests should use.",
|
||||
"message.installwizard.tooltip.configureguesttraffic.gueststartip": "The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.",
|
||||
"message.installwizard.tooltip.netris.provider.name": "Netris Provider name is required",
|
||||
"message.installwizard.tooltip.netris.provider.hostname": "Netris Provider hostname / IP address not provided",
|
||||
"message.installwizard.tooltip.netris.provider.username": "Netris Provider username not provided",
|
||||
"message.installwizard.tooltip.netris.provider.password": "Netris Provider password not provided",
|
||||
"message.installwizard.tooltip.nsx.provider.hostname": "NSX Provider hostname / IP address not provided",
|
||||
"message.installwizard.tooltip.nsx.provider.username": "NSX Provider username not provided",
|
||||
"message.installwizard.tooltip.nsx.provider.password": "NSX Provider password not provided",
|
||||
|
|
|
|||
|
|
@ -34,12 +34,13 @@
|
|||
<template v-if="column.key === 'gateway'">
|
||||
<div> {{ record.gateway }}</div>
|
||||
<div v-if="record.fornsx"> <a-tag color="processing"> {{ $t('label.tag.nsx') }} </a-tag> </div>
|
||||
<div v-else-if="isNsxZone"> <a-tag color="processing"> {{ $t('label.tag.systemvm') }} </a-tag> </div>
|
||||
<div v-else-if="record.fornetris"> <a-tag color="processing"> {{ $t('label.tag.netris') }} </a-tag> </div>
|
||||
<div v-else-if="isNsxZone || isNetrisZone"> <a-tag color="processing"> {{ $t('label.tag.systemvm') }} </a-tag> </div>
|
||||
</template>
|
||||
<template v-if="column.key === 'actions'">
|
||||
<tooltip-button
|
||||
:tooltip="$t('label.delete')"
|
||||
:disabled="(record.fornsx && !forNsx) || (!record.fornsx && forNsx)"
|
||||
:disabled="((record.fornsx && !forNsx) || (!record.fornsx && forNsx)) || ((record.fornetris && !forNetris) || (!record.fornetris && forNetris)) "
|
||||
type="primary"
|
||||
:danger="true"
|
||||
icon="delete-outlined"
|
||||
|
|
@ -76,7 +77,7 @@
|
|||
<a-form-item name="vlan" ref="vlan">
|
||||
<a-input
|
||||
v-model:value="form.vlan"
|
||||
:disabled="forNsx"
|
||||
:disabled="forNsx || forNetris"
|
||||
:placeholder="$t('label.vlan')"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
:isFixError="isFixError"
|
||||
/>
|
||||
<ip-address-range-form
|
||||
v-if="steps && ['publicTraffic', 'nsxPublicTraffic'].includes(steps[currentStep].formKey)"
|
||||
v-if="steps && ['publicTraffic', 'nsxPublicTraffic', 'netrisPublicTraffic'].includes(steps[currentStep].formKey)"
|
||||
@nextPressed="nextPressed"
|
||||
@backPressed="handleBack"
|
||||
@fieldsChanged="fieldsChanged"
|
||||
|
|
@ -62,6 +62,8 @@
|
|||
:isFixError="isFixError"
|
||||
:forNsx="steps[currentStep].formKey === 'nsxPublicTraffic'"
|
||||
:isNsxZone="isNsxZone"
|
||||
:forNetris="steps[currentStep].formKey === 'netrisPublicTraffic'"
|
||||
:isNetrisZone="isNetrisZone"
|
||||
/>
|
||||
|
||||
<static-inputs-form
|
||||
|
|
@ -88,6 +90,18 @@
|
|||
:isFixError="isFixError"
|
||||
/>
|
||||
|
||||
<static-inputs-form
|
||||
v-if="steps && steps[currentStep].formKey === 'netris'"
|
||||
@nextPressed="nextPressed"
|
||||
@backPressed="handleBack"
|
||||
@fieldsChanged="fieldsChanged"
|
||||
@submitLaunchZone="submitLaunchZone"
|
||||
:fields="netrisFields"
|
||||
:prefillContent="prefillContent"
|
||||
:description="netrisSetupDescription"
|
||||
:isFixError="isFixError"
|
||||
/>
|
||||
|
||||
<static-inputs-form
|
||||
v-if="steps && steps[currentStep].formKey === 'pod'"
|
||||
@nextPressed="nextPressed"
|
||||
|
|
@ -101,7 +115,6 @@
|
|||
/>
|
||||
|
||||
<div v-if="guestTrafficRangeMode">
|
||||
<div>{{ isNsxZone }}</div>
|
||||
<static-inputs-form
|
||||
v-if="steps && steps[currentStep].formKey === 'guestTraffic'"
|
||||
@nextPressed="nextPressed"
|
||||
|
|
@ -116,7 +129,7 @@
|
|||
</div>
|
||||
<div v-else>
|
||||
<advanced-guest-traffic-form
|
||||
v-if="steps && steps[currentStep].formKey === 'guestTraffic' && !isNsxZone"
|
||||
v-if="steps && steps[currentStep].formKey === 'guestTraffic' && !isNsxZone && !isNetrisZone"
|
||||
@nextPressed="nextPressed"
|
||||
@backPressed="handleBack"
|
||||
@fieldsChanged="fieldsChanged"
|
||||
|
|
@ -214,8 +227,17 @@ export default {
|
|||
}
|
||||
return isNsx
|
||||
},
|
||||
isNetrisZone () {
|
||||
let isNetris = false
|
||||
if (!this.prefillContent.physicalNetworks) {
|
||||
isNetris = false
|
||||
} else {
|
||||
const netrisIdx = this.prefillContent.physicalNetworks.findIndex(network => network.isolationMethod === 'Netris')
|
||||
isNetris = netrisIdx > -1
|
||||
}
|
||||
return isNetris
|
||||
},
|
||||
allSteps () {
|
||||
console.log(this.isNsxZone)
|
||||
const steps = []
|
||||
steps.push({
|
||||
title: 'label.physical.network',
|
||||
|
|
@ -233,6 +255,12 @@ export default {
|
|||
formKey: 'nsx'
|
||||
})
|
||||
}
|
||||
if (this.isNetrisZone) {
|
||||
steps.push({
|
||||
title: 'label.netris.provider',
|
||||
formKey: 'netris'
|
||||
})
|
||||
}
|
||||
if (this.havingNetscaler) {
|
||||
steps.push({
|
||||
title: 'label.netScaler',
|
||||
|
|
@ -251,11 +279,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',
|
||||
|
|
@ -440,6 +475,42 @@ export default {
|
|||
]
|
||||
return fields
|
||||
},
|
||||
netrisFields () {
|
||||
const fields = [
|
||||
{
|
||||
title: 'label.netris.provider.name',
|
||||
key: 'netrisName',
|
||||
placeHolder: 'message.installwizard.tooltip.netris.provider.name',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
title: 'label.netris.provider.hostname',
|
||||
key: 'netrisHostname',
|
||||
placeHolder: 'message.installwizard.tooltip.netris.provider.hostname',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
title: 'label.netris.provider.port',
|
||||
key: 'netrisPort',
|
||||
placeHolder: 'message.installwizard.tooltip.netris.provider.port',
|
||||
required: false
|
||||
},
|
||||
{
|
||||
title: 'label.netris.provider.username',
|
||||
key: 'username',
|
||||
placeHolder: 'message.installwizard.tooltip.netris.provider.username',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
title: 'label.netris.provider.password',
|
||||
key: 'password',
|
||||
placeHolder: 'message.installwizard.tooltip.netris.provider.password',
|
||||
required: true,
|
||||
password: true
|
||||
}
|
||||
]
|
||||
return fields
|
||||
},
|
||||
guestTrafficFields () {
|
||||
const fields = [
|
||||
{
|
||||
|
|
@ -510,6 +581,7 @@ export default {
|
|||
podSetupDescription: 'message.add.pod.during.zone.creation',
|
||||
tungstenSetupDescription: 'message.infra.setup.tungsten.description',
|
||||
nsxSetupDescription: 'message.infra.setup.nsx.description',
|
||||
netrisSetupDescription: 'message.infra.setup.netris.description',
|
||||
netscalerSetupDescription: 'label.please.specify.netscaler.info',
|
||||
storageTrafficDescription: 'label.zonewizard.traffictype.storage',
|
||||
podFields: [
|
||||
|
|
@ -559,7 +631,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()
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
<a-select-option value="VCS"> VCS </a-select-option>
|
||||
<a-select-option value="TF"> TF </a-select-option>
|
||||
<a-select-option v-if="hypervisor === 'VMware'" value="NSX"> NSX </a-select-option>
|
||||
<a-select-option v-if="hypervisor === 'KVM'" value="Netris"> NETRIS </a-select-option>
|
||||
|
||||
<template #suffixIcon>
|
||||
<a-tooltip
|
||||
|
|
|
|||
Loading…
Reference in New Issue