Search in sources :

Example 1 with ConfigurationService

use of org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService in project openflowplugin by opendaylight.

the class FRMTest method getConfigurationService.

public ConfigurationService getConfigurationService() {
    final ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
    final ForwardingRulesManagerConfig config = getConfig();
    Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
    });
    Mockito.when(configurationService.getProperty(Mockito.eq("disable-reconciliation"), Mockito.any())).thenReturn(config.isDisableReconciliation());
    Mockito.when(configurationService.getProperty(Mockito.eq("stale-marking-enabled"), Mockito.any())).thenReturn(config.isStaleMarkingEnabled());
    Mockito.when(configurationService.getProperty(Mockito.eq("reconciliation-retry-count"), Mockito.any())).thenReturn(config.getReconciliationRetryCount());
    Mockito.when(configurationService.getProperty(Mockito.eq("bundle-based-reconciliation-enabled"), Mockito.any())).thenReturn(config.isBundleBasedReconciliationEnabled());
    return configurationService;
}
Also used : ConfigurationService(org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService) ForwardingRulesManagerConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig)

Example 2 with ConfigurationService

use of org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService 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)

Aggregations

ConfigurationService (org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService)2 ForwardingRulesManagerConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig)1 TopologyLldpDiscoveryConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig)1