mirror of https://github.com/apache/cloudstack.git
NSX: Cleanup PF rule associated to an expunged VM
This commit is contained in:
parent
70c0a40a81
commit
702a2cb2d4
|
|
@ -535,8 +535,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…
Reference in New Issue