mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
NSX: Cleanup PF rule associated to an expunged VM
This commit is contained in:
parent
35357dc8f9
commit
3c2bf12a93
@ -509,8 +509,7 @@ public class NsxElement extends AdapterBase implements DhcpServiceProvider, Dns
|
||||
for (PortForwardingRule rule : rules) {
|
||||
IPAddressVO publicIp = ApiDBUtils.findIpAddressById(rule.getSourceIpAddressId());
|
||||
UserVm vm = ApiDBUtils.findUserVmById(rule.getVirtualMachineId());
|
||||
if ((vm == null && (rule.getState() != FirewallRule.State.Revoke)) ||
|
||||
(vm != null && networkModel.getNicInNetwork(vm.getId(), network.getId()) == null)) {
|
||||
if (vm == null && rule.getState() != FirewallRule.State.Revoke) {
|
||||
continue;
|
||||
}
|
||||
NsxOpObject nsxObject = getNsxOpObject(network);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user