This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 1dc134a3ecf UI: Display NSX Provider only when NSX is the selected 
Isolation method (#11142)
1dc134a3ecf is described below

commit 1dc134a3ecf645b743334213aeb35530b8e9c2de
Author: Pearl Dsilva <pearl1...@gmail.com>
AuthorDate: Wed Jul 30 08:11:13 2025 -0400

    UI: Display NSX Provider only when NSX is the selected Isolation method 
(#11142)
---
 .../main/java/com/cloud/network/NetworkServiceImpl.java  |  1 -
 ui/src/views/infra/zone/ZoneWizardLaunchZone.vue         | 16 ++++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java 
b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
index ccafc2da258..254c03c9317 100644
--- a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
@@ -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;
     }
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue 
b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index e479246777f..31e3fadc9f6 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -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 => {

Reply via email to