Search in sources :

Example 1 with ForwardingRulesManagerConfig

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig in project openflowplugin by opendaylight.

the class FRMTest method getConfig.

public ForwardingRulesManagerConfig getConfig() {
    ForwardingRulesManagerConfigBuilder cfgBuilder = new ForwardingRulesManagerConfigBuilder();
    cfgBuilder.setDisableReconciliation(false);
    cfgBuilder.setStaleMarkingEnabled(false);
    cfgBuilder.setReconciliationRetryCount(0);
    cfgBuilder.setBundleBasedReconciliationEnabled(false);
    return cfgBuilder.build();
}
Also used : ForwardingRulesManagerConfigBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfigBuilder)

Example 2 with ForwardingRulesManagerConfig

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig 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)

Aggregations

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