if(cidrList.size()>1 || !r.getSourcePortEnd().equals(r.getSourcePortStart())){ throw new ResourceUnavailableException("One CIDR and one port only please.", Network.class, network.getId());
Integer portEnd = rule.getSourcePortEnd(); if (portStart == null) { portStart = 0;
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()); }
if(aclCidrList.size()>1 || !item.getSourcePortEnd().equals(port)){ continue; } else {
if (aclItem.getSourcePortEnd() != null) { response.setEndPort(Integer.toString(aclItem.getSourcePortEnd()));
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(); }