2 * Copyright (c) 2020 Ericsson India Global Services Pvt Ltd. 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.hwvtepsouthbound;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
15 * Helper to let Blueprint XML configure {@link HwvtepSouthboundProvider}.
17 * @author Chandra Shekar S
19 public class HwvtepSouthboundProviderConfigurator {
21 private static final Logger LOG = LoggerFactory.getLogger(HwvtepSouthboundProviderConfigurator.class);
23 private static final String SHARD_STATUS_CHECK_RETRY_COUNT = "shard-status-check-retry-count";
25 private final HwvtepSouthboundProvider hwvtepSouthboundProvider;
27 public HwvtepSouthboundProviderConfigurator(HwvtepSouthboundProvider hwvtepSouthboundProvider) {
28 this.hwvtepSouthboundProvider = hwvtepSouthboundProvider;
31 public void setShardStatusCheckRetryCount(int retryCount) {
32 hwvtepSouthboundProvider.setShardStatusCheckRetryCount(retryCount);
37 public void updateConfigParameter(Map<String, Object> configParameters) {
38 if (configParameters != null && !configParameters.isEmpty()) {
39 LOG.debug("Config parameters received : {}", configParameters.entrySet());
40 for (Map.Entry<String, Object> paramEntry : configParameters.entrySet()) {
41 if (paramEntry.getKey().equalsIgnoreCase(SHARD_STATUS_CHECK_RETRY_COUNT)) {
42 hwvtepSouthboundProvider
43 .setShardStatusCheckRetryCount(Integer.parseInt((String) paramEntry.getValue()));