diff --git a/src/TopoMojo.Hypervisor/vSphere/NetworkManager.cs b/src/TopoMojo.Hypervisor/vSphere/NetworkManager.cs index 2487b3e..7339447 100644 --- a/src/TopoMojo.Hypervisor/vSphere/NetworkManager.cs +++ b/src/TopoMojo.Hypervisor/vSphere/NetworkManager.cs @@ -35,7 +35,7 @@ public async Task Initialize() foreach (var pg in existing) pg.Timestamp = ts; - _pgAllocation = existing.ToDictionary(p => p.Net); + _pgAllocation = existing.DistinctBy(p => p.Net).ToDictionary(p => p.Net); _vlanManager.Activate( _pgAllocation.Values.Select(p => new Vlan diff --git a/src/TopoMojo.Hypervisor/vSphere/NsxNetworkManager.cs b/src/TopoMojo.Hypervisor/vSphere/NsxNetworkManager.cs index 04dd0f4..c97c4c7 100644 --- a/src/TopoMojo.Hypervisor/vSphere/NsxNetworkManager.cs +++ b/src/TopoMojo.Hypervisor/vSphere/NsxNetworkManager.cs @@ -295,6 +295,9 @@ config.defaultPortConfig is VMwareDVSPortSetting setting } } + string info = string.Join('\n', [.. list.Select(p => $"{p.Net}::{p.Key}")]); + _logger.LogDebug("{info}", info); + return [.. list]; }