Search in sources :

Example 1 with IdentifiedInterfaceWithAclBuilder

use of org.opendaylight.netvirt.aclservice.tests.IdentifiedInterfaceWithAclBuilder in project netvirt by opendaylight.

the class AclLiveStatisticsRpcServiceTest method setUp.

@Before
public void setUp() throws Exception {
    aclStatsService = new AclLiveStatisticsRpcServiceImpl(config, dataBroker, odlDirectStatsService);
    singleTransactionDataBroker = new SingleTransactionDataBroker(dataBroker);
    LOG.info("Acl mode: {}", config.getSecurityGroupMode());
    newElan(ELAN, ELAN_TAG);
    newElanInterface(ELAN, PORT_1, true);
    Pair<DataTreeIdentifier<Interface>, Interface> port1 = new IdentifiedInterfaceWithAclBuilder().interfaceName(PORT_1).portSecurity(true).build();
    dataBrokerUtil.put(port1);
    testInterfaceManager.addInterface(port1.getValue());
    putNewStateInterface(dataBroker, "port1", PORT_MAC_1);
    asyncEventsWaiter.awaitEventsConsumption();
}
Also used : DataTreeIdentifier(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier) IdentifiedInterfaceWithAclBuilder(org.opendaylight.netvirt.aclservice.tests.IdentifiedInterfaceWithAclBuilder) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface) StateInterfaceBuilderHelper.putNewStateInterface(org.opendaylight.netvirt.aclservice.tests.StateInterfaceBuilderHelper.putNewStateInterface) ElanInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 DataTreeIdentifier (org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier)1 SingleTransactionDataBroker (org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker)1 IdentifiedInterfaceWithAclBuilder (org.opendaylight.netvirt.aclservice.tests.IdentifiedInterfaceWithAclBuilder)1 StateInterfaceBuilderHelper.putNewStateInterface (org.opendaylight.netvirt.aclservice.tests.StateInterfaceBuilderHelper.putNewStateInterface)1 Interface (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface)1 ElanInterface (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface)1