public NetworkACLTO(NetworkACLItem rule, String vlanTag, NetworkACLItem.TrafficType trafficType) { this(rule.getId(), vlanTag, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState() == NetworkACLItem.State.Revoke, rule.getState() == NetworkACLItem.State.Active, rule.getSourceCidrList(), rule.getIcmpType(), rule.getIcmpCode(), trafficType, rule.getAction() == NetworkACLItem.Action.Allow, rule.getNumber()); }
List<String> cidrList; for(NetworkACLItem r: rules){ if(r.getState()==NetworkACLItem.State.Revoke){ continue;
public VspAclRule buildVspAclRule(NetworkACLItem networkAcl) { return new VspAclRule.Builder() .uuid(networkAcl.getUuid()) .protocol(networkAcl.getProtocol()) .startPort(networkAcl.getSourcePortStart()) .endPort(networkAcl.getSourcePortEnd()) .sourceIpAddress(null) .sourceCidrList(networkAcl.getSourceCidrList()) .priority(networkAcl.getNumber()) .type(VspAclRule.ACLType.NetworkACL) .state(getEnumValue(networkAcl.getState(), VspAclRule.ACLState.class)) .trafficType(getEnumValue(networkAcl.getTrafficType(), VspAclRule.ACLTrafficType.class)) .action(getEnumValue(networkAcl.getAction(), VspAclRule.ACLAction.class)) .build(); }
NetworkACLItem.State state = aclItem.getState(); String stateToSet = state.toString(); if (state.equals(NetworkACLItem.State.Revoke)) {