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;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
16 * Helper to let Blueprint XML configure {@link HwvtepSouthboundProvider}.
18 * @author Chandra Shekar S
20 public class HwvtepSouthboundProviderConfigurator {
22 private static final Logger LOG = LoggerFactory.getLogger(HwvtepSouthboundProviderConfigurator.class);
24 private static final String SHARD_STATUS_CHECK_RETRY_COUNT = "shard-status-check-retry-count";
26 private final HwvtepSouthboundProvider hwvtepSouthboundProvider;
28 public HwvtepSouthboundProviderConfigurator(HwvtepSouthboundProvider hwvtepSouthboundProvider) {
29 this.hwvtepSouthboundProvider = hwvtepSouthboundProvider;
32 public void setShardStatusCheckRetryCount(int retryCount) {
33 hwvtepSouthboundProvider.setShardStatusCheckRetryCount(retryCount);
38 public void updateConfigParameter(Map<String, Object> configParameters) {
39 if (configParameters != null && !configParameters.isEmpty()) {
40 LOG.debug("Config parameters received : {}", configParameters.entrySet());
41 for (Map.Entry<String, Object> paramEntry : configParameters.entrySet()) {
42 if (paramEntry.getKey().equalsIgnoreCase(SHARD_STATUS_CHECK_RETRY_COUNT)) {
43 hwvtepSouthboundProvider
44 .setShardStatusCheckRetryCount(Integer.parseInt((String) paramEntry.getValue()));