From 48c7df00ba4089268a585edd46fc632537fd60f3 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 23 Jul 2024 10:58:38 +0200 Subject: [PATCH] NSX: add back removed code for NSX This code snippet has been removed in the merge forward of PR #9240 in commit 90fe1d5fdcc2909130b5de6803b57feeff194f54 --- .../engine/orchestration/NetworkOrchestrator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index ea34f62ecd58..5c01bb4f288a 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -1072,6 +1072,12 @@ private NicVO checkForRaceAndAllocateNic(final NicProfile requested, final Netwo return null; } + if (isNicAllocatedForNsxPublicNetworkOnVR(network, profile, vm)) { + String guruName = "NsxPublicNetworkGuru"; + NetworkGuru nsxGuru = AdapterBase.getAdapterByName(networkGurus, guruName); + nsxGuru.allocate(network, profile, vm); + } + if (isDefaultNic != null) { profile.setDefaultNic(isDefaultNic); }