diff --git a/src/locales/en.json b/src/locales/en.json index cedc43102..4cfb26f27 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -2120,6 +2120,12 @@ "label.transportzoneuuid": "Transport Zone Uuid", "label.try.again": "Try Again", "label.tuesday": "Tuesday", +"label.tungsten.provider": "Tungsten provider", +"label.tungsten.provider.name": "Tungsten provider name", +"label.tungsten.provider.hostname": "Tungsten provider hostname", +"label.tungsten.provider.port": "Tungsten provider port", +"label.tungsten.provider.vrouter": "Tungsten provider vrouter", +"label.tungsten.provider.vrouterport": "Tungsten provider vrouter port", "label.type": "Type", "label.type.id": "Type ID", "label.ucs": "UCS", @@ -2863,6 +2869,7 @@ "message.host.dedicated": "Host Dedicated", "message.host.dedication.released": "Host dedication released", "message.info.cloudian.console": "Cloudian Management Console should open in another window", +"message.infra.setup.tungsten.description": "This zone must contain a tungsten provider because the isolation method is TF", "message.installwizard.click.retry": "Click the button to retry launch.", "message.installwizard.copy.whatisacluster": "A cluster provides a way to group hosts. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared storage. Virtual machine instances (VMs) can be live-migrated from one host to another within the same cluster, without interrupting service to the user. A cluster is the third-largest organizational unit within a CloudStack™; deployment. Clusters are contained within pods, and pods are contained within zones.

CloudStack™; allows multiple clusters in a cloud deployment, but for a Basic Installation, we only need one cluster.", "message.installwizard.copy.whatisahost": "A host is a single computer. Hosts provide the computing resources that run the guest virtual machines. Each host has hypervisor software installed on it to manage the guest VMs (except for bare metal hosts, which are a special case discussed in the Advanced Installation Guide). For example, a Linux KVM-enabled server, a Citrix XenServer server, and an ESXi server are hosts. In a Basic Installation, we use a single host running XenServer or KVM.

The host is the smallest organizational unit within a CloudStack™; deployment. Hosts are contained within clusters, clusters are contained within pods, and pods are contained within zones.", @@ -2897,6 +2904,11 @@ "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.configureguesttraffic.name": "A name for your network", +"message.installwizard.tooltip.tungsten.provider.name": "Tungsten provider name is required", +"message.installwizard.tooltip.tungsten.provider.hostname": "Tungsten provider hostname is required", +"message.installwizard.tooltip.tungsten.provider.port": "Tungsten provider port is required", +"message.installwizard.tooltip.tungsten.provider.vrouter": "Tungsten provider vrouter is required", +"message.installwizard.tooltip.tungsten.provider.vrouterport": "Tungsten provider vrouter port is required", "message.instance.scaled.up.confirm": "Do you really want to scale Up your instance ?", "message.instancewizard.notemplates": "You do not have any templates available; please add a compatible template, and re-launch the instance wizard.", "message.interloadbalance.not.return.elementid": "error: listInternalLoadBalancerElements API doesn't return Internal LB Element Id", diff --git a/src/views/infra/zone/ZoneWizard.vue b/src/views/infra/zone/ZoneWizard.vue index 8fd0852c0..bc19182ec 100644 --- a/src/views/infra/zone/ZoneWizard.vue +++ b/src/views/infra/zone/ZoneWizard.vue @@ -115,7 +115,7 @@ export default { }, { title: 'label.network', - step: ['physicalNetwork', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic'], + step: ['physicalNetwork', 'tungsten', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic'], description: this.$t('message.network.description'), hint: this.$t('message.network.hint') }, diff --git a/src/views/infra/zone/ZoneWizardLaunchZone.vue b/src/views/infra/zone/ZoneWizardLaunchZone.vue index 49b91032d..1ea1af302 100644 --- a/src/views/infra/zone/ZoneWizardLaunchZone.vue +++ b/src/views/infra/zone/ZoneWizardLaunchZone.vue @@ -458,6 +458,12 @@ export default { this.stepData.physicalNetworkReturned = physicalNetworkReturned this.stepData.physicalNetworkItem['createPhysicalNetwork' + index] = physicalNetworkReturned this.stepData.stepMove.push('createPhysicalNetwork' + index) + + if (physicalNetwork.isolationMethod === 'TF' && + physicalNetwork.traffics.findIndex(traffic => traffic.type === 'public') > -1) { + this.stepData.isTungstenZone = true + this.stepData.tungstenPhysicalNetworkId = physicalNetworkReturned.id + } } else { this.stepData.physicalNetworkReturned = this.stepData.physicalNetworkItem['createPhysicalNetwork' + index] } @@ -935,7 +941,11 @@ export default { return } - await this.stepConfigureStorageTraffic() + if (this.stepData.isTungstenZone) { + await this.stepCreateTungstenPublicNetwork() + } else { + await this.stepConfigureStorageTraffic() + } } else if (this.isAdvancedZone && this.sgEnabled) { await this.stepConfigureStorageTraffic() } else { @@ -949,6 +959,56 @@ export default { } } }, + async stepCreateTungstenPublicNetwork () { + this.setStepStatus(STATUS_FINISH) + this.currentStep++ + this.addStep('message.create.tungsten.public.network', 'tungsten') + + if (this.stepData.stepMove.includes('tungsten')) { + await this.stepConfigureStorageTraffic() + return + } + + try { + if (!this.stepData.stepMove.includes('configTungsten')) { + const configParams = {} + configParams.zoneid = this.stepData.zoneReturned.id + configParams.physicalnetworkid = this.stepData.tungstenPhysicalNetworkId + + await this.configTungstenService(configParams) + this.stepData.stepMove.push('configTungsten') + } + + if (!this.stepData.stepMove.includes('createTungstenProvider')) { + const providerParams = {} + + providerParams.zoneid = this.stepData.zoneReturned.id + providerParams.tungstenproviderhostname = this.prefillContent.tungstenHostname.value || null + providerParams.name = this.prefillContent.tungstenName.value || null + providerParams.tungstenproviderport = this.prefillContent.tungstenPort.value || null + providerParams.tungstenprovidervrouter = this.prefillContent.tungstenVrouter.value || null + providerParams.tungstenprovidervrouterport = this.prefillContent.tungstenVrouterport.value || null + + await this.createTungstenProvider(providerParams) + this.stepData.stepMove.push('createTungstenProvider') + } + + if (!this.stepData.stepMove.includes('createTungstenNetwork')) { + const params = {} + params.zoneid = this.stepData.zoneReturned.id + + await this.createTungstenPublicNetwork(params) + this.stepData.stepMove.push('createTungstenNetwork') + } + + this.stepData.stepMove.push('tungsten') + 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 => { @@ -2033,6 +2093,36 @@ export default { }) }) }, + configTungstenService (args) { + return new Promise((resolve, reject) => { + api('configTungstenService', {}, 'POST', args).then(json => { + resolve() + }).catch(error => { + const message = error.response.headers['x-description'] + reject(message) + }) + }) + }, + createTungstenProvider (args) { + return new Promise((resolve, reject) => { + api('createTungstenProvider', {}, 'POST', args).then(json => { + resolve() + }).catch(error => { + const message = error.response.headers['x-description'] + reject(message) + }) + }) + }, + createTungstenPublicNetwork (args) { + return new Promise((resolve, reject) => { + api('createTungstenPublicNetwork', args).then(json => { + resolve() + }).catch(error => { + const message = error.response.headers['x-description'] + reject(message) + }) + }) + }, nfsURL (server, path) { let url = null if (path.substring(0, 1) !== '/') { diff --git a/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue b/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue index c7175600d..cfb9c208a 100644 --- a/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue +++ b/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue @@ -56,6 +56,17 @@ :isFixError="isFixError" /> + L3VPN VSP VCS + TF