UI: Display NSX Provider only when NSX is the selected Isolation method (#11142)

This commit is contained in:
Pearl Dsilva 2025-07-30 08:11:13 -04:00 committed by GitHub
parent 2d025bd074
commit 1dc134a3ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View File

@ -5658,7 +5658,6 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
}
addProviderToPhysicalNetwork(physicalNetworkId, Provider.Nsx.getName(), null, null);
enableProvider(Provider.Nsx.getName());
}
return null;
}

View File

@ -487,7 +487,6 @@ 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
}
} else {
this.stepData.physicalNetworkReturned = this.stepData.physicalNetworkItem['createPhysicalNetwork' + index]
@ -980,7 +979,7 @@ export default {
return
}
if (idx === 0) {
if (idx === 0 && this.stepData.isNsxZone) {
await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
} else {
if (this.stepData.isTungstenZone) {
@ -1080,6 +1079,7 @@ export default {
providerParams.transportzone = this.prefillContent?.transportZone || ''
await this.addNsxController(providerParams)
await this.updateNsxServiceProviderStatus()
this.stepData.stepMove.push('addNsxController')
}
this.stepData.stepMove.push('nsx')
@ -1090,6 +1090,18 @@ export default {
this.setStepStatus(STATUS_FAILED)
}
},
async updateNsxServiceProviderStatus () {
const listParams = {}
listParams.name = 'Nsx'
const nsxPhysicalNetwork = this.stepData.physicalNetworksReturned.find(net => net.isolationmethods.trim().toUpperCase() === 'NSX')
const nsxPhysicalNetworkId = nsxPhysicalNetwork?.id || null
listParams.physicalNetworkId = nsxPhysicalNetworkId
const nsxProviderId = await this.listNetworkServiceProviders(listParams, 'nsxProvider')
console.log(nsxProviderId)
if (nsxProviderId !== null) {
await this.updateNetworkServiceProvider(nsxProviderId)
}
},
async stepConfigureStorageTraffic () {
let targetNetwork = false
this.prefillContent.physicalNetworks.forEach(physicalNetwork => {