mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-20 12:33:53 +01:00
Fix ACL rules creation (#8323)
This commit is contained in:
parent
720b794a52
commit
ed48d94e59
@ -98,6 +98,7 @@ import org.springframework.stereotype.Component;
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@ -684,7 +685,7 @@ public class NsxElement extends AdapterBase implements DhcpServiceProvider, Dns
|
||||
.setIcmpType(rule.getIcmpType())
|
||||
.setService(Network.Service.NetworkACL)
|
||||
.build();
|
||||
if (NetworkACLItem.State.Add == rule.getState()) {
|
||||
if (Arrays.asList(NetworkACLItem.State.Active, NetworkACLItem.State.Add).contains(rule.getState())) {
|
||||
nsxAddNetworkRules.add(networkRule);
|
||||
} else if (NetworkACLItem.State.Revoke == rule.getState()) {
|
||||
nsxDelNetworkRules.add(networkRule);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user