2 * Copyright (c) 2019 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.ovsdb.southbound;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
15 * Helper to let Blueprint XML configure {@link SouthboundProvider}.
17 * @author Michael Vorburger.ch
19 public class SouthboundProviderConfigurator {
21 private static final Logger LOG = LoggerFactory.getLogger(SouthboundProviderConfigurator.class);
23 private static final String SKIP_MONITORING_MANAGER_STATUS_PARAM = "skip-monitoring-manager-status";
25 private final SouthboundProvider southboundProvider;
27 public SouthboundProviderConfigurator(SouthboundProvider southboundProvider) {
28 this.southboundProvider = southboundProvider;
31 public void setSkipMonitoringManagerStatus(boolean flag) {
32 southboundProvider.setSkipMonitoringManagerStatus(flag);
35 public void updateConfigParameter(Map<String, Object> configParameters) {
36 if (configParameters != null && !configParameters.isEmpty()) {
37 LOG.debug("Config parameters received : {}", configParameters.entrySet());
38 for (Map.Entry<String, Object> paramEntry : configParameters.entrySet()) {
39 if (paramEntry.getKey().equalsIgnoreCase(SKIP_MONITORING_MANAGER_STATUS_PARAM)) {
41 .setSkipMonitoringManagerStatus(Boolean.parseBoolean((String) paramEntry.getValue()));