Skip to content

Commit 2aed8d6

Browse files
committed
UI: Display NSX Provider only when NSX is the selected Isolation method
1 parent ed7bd5e commit 2aed8d6

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5658,7 +5658,6 @@ private PhysicalNetworkServiceProvider addNSXProviderToPhysicalNetwork(long phys
56585658
}
56595659

56605660
addProviderToPhysicalNetwork(physicalNetworkId, Provider.Nsx.getName(), null, null);
5661-
enableProvider(Provider.Nsx.getName());
56625661
}
56635662
return null;
56645663
}

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ export default {
487487
if (physicalNetwork.isolationMethod === 'NSX' &&
488488
physicalNetwork.traffics.findIndex(traffic => traffic.type === 'public' || traffic.type === 'guest') > -1) {
489489
this.stepData.isNsxZone = true
490-
this.stepData.tungstenPhysicalNetworkId = physicalNetworkReturned.id
491490
}
492491
} else {
493492
this.stepData.physicalNetworkReturned = this.stepData.physicalNetworkItem['createPhysicalNetwork' + index]
@@ -980,7 +979,7 @@ export default {
980979
return
981980
}
982981
983-
if (idx === 0) {
982+
if (idx === 0 && this.stepData.isNsxZone) {
984983
await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
985984
} else {
986985
if (this.stepData.isTungstenZone) {
@@ -1080,6 +1079,7 @@ export default {
10801079
providerParams.transportzone = this.prefillContent?.transportZone || ''
10811080
10821081
await this.addNsxController(providerParams)
1082+
await this.updateNsxServiceProviderStatus()
10831083
this.stepData.stepMove.push('addNsxController')
10841084
}
10851085
this.stepData.stepMove.push('nsx')
@@ -1090,6 +1090,18 @@ export default {
10901090
this.setStepStatus(STATUS_FAILED)
10911091
}
10921092
},
1093+
async updateNsxServiceProviderStatus () {
1094+
const listParams = {}
1095+
listParams.name = 'Nsx'
1096+
const nsxPhysicalNetwork = this.stepData.physicalNetworksReturned.find(net => net.isolationmethods.trim().toUpperCase() === 'NSX')
1097+
const nsxPhysicalNetworkId = nsxPhysicalNetwork?.id || null
1098+
listParams.physicalNetworkId = nsxPhysicalNetworkId
1099+
const nsxProviderId = await this.listNetworkServiceProviders(listParams, 'nsxProvider')
1100+
console.log(nsxProviderId)
1101+
if (nsxProviderId !== null) {
1102+
await this.updateNetworkServiceProvider(nsxProviderId)
1103+
}
1104+
},
10931105
async stepConfigureStorageTraffic () {
10941106
let targetNetwork = false
10951107
this.prefillContent.physicalNetworks.forEach(physicalNetwork => {

0 commit comments

Comments
 (0)