This is an automated email from the ASF dual-hosted git repository. pearl11594 pushed a commit to branch ph2-zone-creation-wizard in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 7239568afcd9f625191ccac5a13798fb7b03a16a Author: Pearl Dsilva <pearl1...@gmail.com> AuthorDate: Mon Sep 23 12:20:38 2024 -0400 Add Netris Provider to the zone creation wizard --- ui/public/locales/en.json | 12 ++++ .../infra/zone/ZoneWizardNetworkSetupStep.vue | 67 +++++++++++++++++++++- .../zone/ZoneWizardPhysicalNetworkSetupStep.vue | 1 + 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index eb1be420b2e..6f21a51305b 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -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", @@ -3190,6 +3197,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 +3215,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", diff --git a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue index 24efe448b25..dc1ec709fb1 100644 --- a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue @@ -88,6 +88,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 +113,6 @@ /> <div v-if="guestTrafficRangeMode"> - <div>{{ isNsxZone }}</div> <static-inputs-form v-if="steps && steps[currentStep].formKey === 'guestTraffic'" @nextPressed="nextPressed" @@ -214,8 +225,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 +253,12 @@ export default { formKey: 'nsx' }) } + if (this.isNetrisZone) { + steps.push({ + title: 'label.netris.provider', + formKey: 'netris' + }) + } if (this.havingNetscaler) { steps.push({ title: 'label.netScaler', @@ -440,6 +466,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 +572,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: [ diff --git a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue index 1117cb6ec01..bb6975f0cce 100644 --- a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue @@ -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