2 * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netvirt.aclservice.tests;
10 import org.junit.Rule;
11 import org.junit.rules.MethodRule;
12 import org.opendaylight.genius.datastoreutils.testutils.TestableDataTreeChangeListenerModule;
13 import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.config.rev160806.AclserviceConfig.SecurityGroupMode;
16 public class AclServiceStatelessTest extends AclServiceTestBase {
18 public @Rule MethodRule guice = new GuiceRule(new AclServiceModule(),
19 new AclServiceTestModule(SecurityGroupMode.Stateless),
20 new TestableDataTreeChangeListenerModule());
22 private FlowEntryObjectsStateless ipv4statelessentries = new FlowEntryObjectsStateless();
25 void newInterfaceCheck() {
26 assertFlowsInAnyOrder(ipv4statelessentries.expectedFlows(PORT_MAC_1));
30 void newInterfaceWithEtherTypeAclCheck() {
31 assertFlowsInAnyOrder(ipv4statelessentries.etherFlows());
35 public void newInterfaceWithTcpDstAclCheck() {
36 assertFlowsInAnyOrder(ipv4statelessentries.tcpFlows());
40 public void newInterfaceWithUdpDstAclCheck() {
41 assertFlowsInAnyOrder(ipv4statelessentries.udpFlows());
45 public void newInterfaceWithIcmpAclCheck() {
46 assertFlowsInAnyOrder(ipv4statelessentries.icmpFlows());
50 public void newInterfaceWithDstPortRangeCheck() {
51 assertFlowsInAnyOrder(ipv4statelessentries.dstRangeFlows());
55 public void newInterfaceWithDstAllPortsCheck() {
56 assertFlowsInAnyOrder(ipv4statelessentries.dstAllFlows());
60 public void newInterfaceWithTwoAclsHavingSameRulesCheck() {
61 assertFlowsInAnyOrder(ipv4statelessentries.icmpFlowsForTwoAclsHavingSameRules());
65 void newInterfaceWithAapIpv4AllCheck() {
66 // TODO Auto-generated method stub