/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
package org.opendaylight.openflowplugin.applications.frm;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
+import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationListener;
import org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeConnectorInventoryTranslatorImpl;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
- * forwardingrules-manager
- * org.opendaylight.openflowplugin.applications.frm
- *
- * ForwardingRulesManager
- * It represents a central point for whole module. Implementation
- * Flow Provider registers the link FlowChangeListener} and it holds all needed
- * services for link FlowChangeListener}.
+ * It represent a central point for whole module. Implementation Flow Provider
+ * registers the link FlowChangeListener} and it holds all needed services for
+ * link FlowChangeListener}.
*
* @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
- *
- * Created: Aug 25, 2014
*/
-public interface ForwardingRulesManager extends AutoCloseable {
+public interface ForwardingRulesManager extends ConfigurationListener, AutoCloseable {
void start();
/**
- * Method returns information :
- * "is Node with send InstanceIdentifier connected"?
+ * Method returns information : "is Node with send InstanceIdentifier
+ * connected"?.
*
- * @param ident - the key of the node
+ * @param ident
+ * - the key of the node
* @return boolean - true if device is connected
*/
boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
/**
- * Method returns information :
- * "is Node with send InstanceIdentifier present in operational data store"?
+ * Method returns information : "is Node with send InstanceIdentifier present in
+ * operational data store"?.
*
- * @param ident - the key of the node
+ * @param ident
+ * - the key of the node
* @return boolean - true if device is present in operational data store
*/
boolean checkNodeInOperationalDataStore(InstanceIdentifier<FlowCapableNode> ident);
/**
- * Method add new {@link FlowCapableNode} to active Node Holder.
- * ActiveNodeHolder prevent unnecessary Operational/DS read for identify
- * pre-configure and serious Configure/DS transactions.
- *
- * @param ident - the key of the node
- */
- void registrateNewNode(InstanceIdentifier<FlowCapableNode> ident);
-
- /**
- * Method remove disconnected {@link FlowCapableNode} from active Node
- * Holder. And all next flows or groups or meters will stay in Config/DS
- * only.
- *
- * @param ident - the key of the node
- */
- void unregistrateNode(InstanceIdentifier<FlowCapableNode> ident);
-
- /**
- * Method returns generated transaction ID, which is unique for
- * every transaction. ID is composite from prefix ("DOM") and unique number.
+ * Method returns generated transaction ID, which is unique for every
+ * transaction. ID is composite from prefix ("DOM") and unique number.
*
* @return String transactionID for RPC transaction identification
*/
String getNewTransactionId();
/**
- * Method returns Read Transacion. It is need for Node reconciliation only.
+ * Method returns Read Transaction. It is need for Node reconciliation only.
*
* @return ReadOnlyTransaction
*/
ReadOnlyTransaction getReadTranaction();
/**
- * Flow RPC service
+ * Flow RPC service.
*
- * @return
*/
SalFlowService getSalFlowService();
/**
- * Group RPC service
+ * Group RPC service.
*
- * @return
*/
- public SalGroupService getSalGroupService();
+ SalGroupService getSalGroupService();
/**
- * Meter RPC service
+ * Meter RPC service.
*
- * @return
*/
SalMeterService getSalMeterService();
/**
- * Table RPC service
+ * Table RPC service.
*
- * @return
*/
SalTableService getSalTableService();
/**
- * Content definition method and prevent code duplicity in Reconcil
- * @return ForwardingRulesCommiter<Flow>
+ * Bundle RPC service.
+ *
+ * @return salBundleService
+ */
+ SalBundleService getSalBundleService();
+
+ /**
+ * Content definition method and prevent code duplicity in Reconcil.
+ *
+ * @return ForwardingRulesCommiter<Flow>.
*/
ForwardingRulesCommiter<Flow> getFlowCommiter();
/**
- * Content definition method and prevent code duplicity in Reconcil
+ * Content definition method and prevent code duplicity in Reconcil.
+ *
* @return ForwardingRulesCommiter<Group>
*/
ForwardingRulesCommiter<Group> getGroupCommiter();
/**
- * Content definition method and prevent code duplicity
+ * Content definition method and prevent code duplicity.
+ *
* @return ForwardingRulesCommiter<Meter>
*/
ForwardingRulesCommiter<Meter> getMeterCommiter();
/**
- * Content definition method and prevent code duplicity
+ * Content definition method and prevent code duplicity.
+ *
* @return ForwardingRulesCommiter<Table>
*/
ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
/**
- * Content definition method
- * @return FlowNodeReconciliation
+ * Check if reconciliation is disabled by user.
+ *
+ * @return true if reconciliation is disabled, else false
*/
- FlowNodeReconciliation getFlowNodeReconciliation();
+ boolean isReconciliationDisabled();
/**
- * Returns the config-subsystem/fallback configuration of FRM
- * @return ForwardingRulesManagerConfig
+ * Check if stale marking is enabled for switch reconciliation.
+ *
+ * @return true if stale marking is enabled, else false
*/
- ForwardingRulesManagerConfig getConfiguration();
+ boolean isStaleMarkingEnabled();
/**
- * Method checks if *this* instance of openflowplugin is owner of
- * the given openflow node.
+ * Return number of reconciliation retry are allowed.
+ *
+ * @return number of retries.
+ */
+ int getReconciliationRetryCount();
+
+ /**
+ * Method checks if *this* instance of openflowplugin is owner of the given
+ * openflow node.
+ *
* @return True if owner, else false
*/
boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);
/**
- * Content definition method and prevent code duplicity
+ * Content definition method and prevent code duplicity.
+ *
* @return FlowNodeConnectorInventoryTranslatorImpl
*/
FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl();
+ /**
+ * holds the value read from the configuration file openflowplugin.cfg file.
+ *
+ * @return True if user enables bundle-based-reconciliation-enabled field in
+ * config file or False
+ */
+ boolean isBundleBasedReconciliationEnabled();
}
-