Search in sources :

Example 1 with TopologyLldpDiscoveryConfig

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig in project openflowplugin by opendaylight.

the class LLDPLinkAgerTest method getConfigurationService.

private ConfigurationService getConfigurationService() {
    final ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
    final TopologyLldpDiscoveryConfig config = getConfig();
    Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
    });
    Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-interval"), Mockito.any())).thenReturn(config.getTopologyLldpInterval());
    Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-expiration-interval"), Mockito.any())).thenReturn(config.getTopologyLldpExpirationInterval());
    return configurationService;
}
Also used : TopologyLldpDiscoveryConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig) ConfigurationService(org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService)

Example 2 with TopologyLldpDiscoveryConfig

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig in project openflowplugin by opendaylight.

the class LLDPLinkAgerTest method getConfig.

private TopologyLldpDiscoveryConfig getConfig() {
    TopologyLldpDiscoveryConfigBuilder cfgBuilder = new TopologyLldpDiscoveryConfigBuilder();
    cfgBuilder.setTopologyLldpInterval(new NonZeroUint32Type(LLDP_INTERVAL));
    cfgBuilder.setTopologyLldpExpirationInterval(new NonZeroUint32Type(LINK_EXPIRATION_TIME));
    return cfgBuilder.build();
}
Also used : NonZeroUint32Type(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.NonZeroUint32Type) TopologyLldpDiscoveryConfigBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfigBuilder)

Aggregations

ConfigurationService (org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService)1 NonZeroUint32Type (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.NonZeroUint32Type)1 TopologyLldpDiscoveryConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig)1 TopologyLldpDiscoveryConfigBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfigBuilder)1