if(cidrList.size()>1 || !r.getSourcePortEnd().equals(r.getSourcePortStart())){ throw new ResourceUnavailableException("One CIDR and one port only please.", Network.class, network.getId());
Integer portStart = rule.getSourcePortStart(); Integer portEnd = rule.getSourcePortEnd(); if (portStart == null) {
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()); }
acl.setIpProto(item.getProtocol()); Integer port = item.getSourcePortStart(); // currently BCF supports single port policy aclCidrList = _aclItemCidrsDao.listByNetworkACLItemId(item.getId()); if(aclCidrList != null){
if (aclItem.getSourcePortStart() != null) { response.setStartPort(Integer.toString(aclItem.getSourcePortStart()));
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(); }