Search in sources :

Example 1 with Builder

use of org.batfish.datamodel.Flow.Builder in project batfish by batfish.

the class SecurityGroupsTest method setup.

@Before
public void setup() throws JSONException {
    _securityGroups = new JSONObject(CommonUtil.readResource("org/batfish/representation/aws/SecurityGroupTest.json")).getJSONArray(JSON_KEY_SECURITY_GROUPS);
    _rejectSynOnly = IpAccessListLine.builder().setTcpFlags(ImmutableSet.of(TcpFlags.SYN_ONLY)).setAction(LineAction.REJECT).build();
    _allowAllReverseOutboundRule = IpAccessListLine.builder().setAction(LineAction.ACCEPT).setSrcIps(Sets.newHashSet(new IpWildcard("0.0.0.0/0"))).build();
    _region = new Region("test");
    _flowBuilder = new Builder();
    _flowBuilder.setIngressNode("foo");
    _flowBuilder.setTag("TEST");
    _flowBuilder.setIpProtocol(IpProtocol.TCP);
}
Also used : IpWildcard(org.batfish.datamodel.IpWildcard) JSONObject(org.codehaus.jettison.json.JSONObject) Builder(org.batfish.datamodel.Flow.Builder) Before(org.junit.Before)

Aggregations

Builder (org.batfish.datamodel.Flow.Builder)1 IpWildcard (org.batfish.datamodel.IpWildcard)1 JSONObject (org.codehaus.jettison.json.JSONObject)1 Before (org.junit.Before)1